manually-unpacking-a-packed-binary
Manually unpacks a runtime-packed Windows binary by finding the original entry point
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/manually-unpacking-a-packed-binaryWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Packageec3d28e7…eb3caf92
ec3d28e7a7e6…bd0ceb3caf924 files · 3.3 KBScanMedium2 findings
- Executable script shipped with the skillscripts/analyst.py
- Links to outside domains
Sourcegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/manually-unpacking-a-packed-binary@da7600a
On this page
When to Use
- A sample is runtime-packed by a custom/unknown packer that UPX and generic unpackers cannot handle.
- You need to locate the original entry point (OEP) and dump the unpacked image for static analysis.
Do not use generic auto-unpackers here — this is the manual path for cases where they fail. Run the sample only inside an isolated, instrumented debugger VM.
Prerequisites
- A debugger (x64dbg) on an isolated VM and the packed sample.
Safety & Handling
- The sample executes during unpacking; do this only in a disposable, isolated VM with snapshots.
Workflow
Step 1: Characterize the packer statically
python scripts/analyst.py inspect packed.exeReports section entropy, suspicious section names (UPX, .vmp, random), small import tables,
and a write-then-execute section (classic unpacker stub).
Step 2: Find candidate OEP heuristics
Set a memory breakpoint on the unpacked code section's execution; the packer's tail jump (a far
jmp/ret into a different section) typically transfers control to the OEP.
Step 3: Dump at OEP
When stopped at OEP, dump the process image and proceed to import reconstruction (see the dump-and-rebuild skill).
Step 4: Verify the dump
Confirm the dumped image has a sane entry point, restored imports, and readable code.
Validation
- The unpacking stub is identified by a write→execute section transition.
- The tail jump lands in a different section than the stub (OEP candidate).
- The dumped image disassembles cleanly with recognizable runtime startup code.
Pitfalls
- Stopping at a stage-2 stub rather than the true OEP in multi-layer packers.
- Hardware-breakpoint detection by the packer — vary the breakpoint strategy.
- Dumping before the import table is fully resolved.
References
- See
references/api-reference.mdfor the inspector. - ATT&CK T1027.002 and the PE format spec (linked in frontmatter).
Files in this version
references/11.2 KB
- api-reference.md1.2 KB
scripts/12.9 KB
- analyst.py2.9 KB
- LICENSE340 B
- SKILL.md2.8 KB
Permissions
| Permission | Declared | Found by the scan |
|---|---|---|
| Reads files | No | No |
| Writes files | Yes | Yes |
| 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 | ec3d28e7 | 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