extracting-encryption-keys-from-binaries
Locates candidate encryption keys in a binary by finding high-entropy fixed-size
v1.0.03 installs+3 in 7 days24 StarsApache-2.0synced 10 hours ago
Install
No NotHoly CLI yet? Install it first.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/extracting-encryption-keys-from-binariesWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Package7b99166b…8e5d517c
7b99166b17aa…23808e5d517c4 files · 3.1 KBScanMedium2 findings
- Executable script shipped with the skillscripts/analyst.py
- Links to outside domains
Sourcegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/extracting-encryption-keys-from-binaries@da7600a
On this page
When to Use
- You have a sample with hardcoded crypto and want to surface candidate keys/IVs (16/24/32-byte high-entropy blocks) and passphrase strings.
- You are recovering material to decrypt config, C2 traffic, or ransomware test vectors.
Do not use entropy alone as proof a region is a key — corroborate with proximity to crypto constants/APIs and by attempting decryption. This skill reads the binary statically and executes nothing.
Prerequisites
- The binary (read inertly). Pairs well with the crypto-constant scanner.
Safety & Handling
- Read bytes statically; handle recovered keys as sensitive and store securely.
Workflow
Step 1: Find high-entropy key-sized regions
python scripts/analyst.py keys sample.binSlides a window of 16/24/32 bytes and reports regions whose entropy exceeds a threshold (likely random key material), with offsets.
Step 2: Surface printable secrets
Extract printable strings that look like passphrases/hex keys (e.g., 32/64-hex, base64 of 16/32 bytes).
Step 3: Corroborate
Rank candidates by proximity to crypto constants/API references and confirm by decrypting a known ciphertext.
Step 4: Document
Record candidate keys, sizes, offsets, and the corroborating evidence.
Validation
- Candidate regions are exactly key-sized (16/24/32 bytes) and high-entropy.
- Hex/base64 key strings are length-consistent with a real key size.
- A candidate is confirmed only by successful decryption, not entropy alone.
Pitfalls
- Compressed/packed data producing many false high-entropy regions — unpack first.
- Keys derived at runtime (KDF) not present statically.
- Endianness/encoding of the key (raw vs hex vs base64) before use.
References
- See
references/api-reference.mdfor the extractor. - FIPS 197 and ATT&CK T1573 (linked in frontmatter).
Files in this version
references/11.3 KB
- api-reference.md1.3 KB
scripts/12.5 KB
- analyst.py2.5 KB
- LICENSE340 B
- SKILL.md2.8 KB
Permissions
| Permission | Declared | Found by the scan |
|---|---|---|
| Reads files | No | No |
| Writes files | No | No |
| Runs shell commands | Yes | Yes |
| Uses the network | Yes | Yes |
| Uses connectors | No | No |
| Drives a browser | No | No |
Scan findings
Reviewed on Nov 13, 2026
- MediumFile · Executable script shipped with the skillscripts/analyst.py
- InfoLink · Links to outside domains
A clean scan lowers the risk but does not prove a package is safe. Read what you install.
| Version | Published | Commit | SHA-256 | Signature | Permission change |
|---|---|---|---|---|---|
| v1.0.0 | Nov 13, 2026 | da7600a | 7b99166b | Signed | – |
More from meltedinhex
All from this publisher- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-sigma-detection-rulesmeltedinhex/writing-sigma-detection-rules3
More in Reverse engineering and fuzzing
See the categoryAsk anything your scope allows.
Create an account, add credits and ask the first question in the chat or the terminal.
- 1/3
Create the account
Individual or company. You can switch to a company later without losing balance or keys.
IndividualCompany - 2/3
Add credits
By card. Pay per token, no subscription.
$5.00minimum deposit - 3/3
Ask
In the chat, or install the CLI and run notholy login in your terminal.
$ notholy login