packer-unpacking
What it does
It explains how to detect common packers that compress or hide program code and how to unpack them. It is for reverse engineers who need to read a packed program.
When to use it
- ✓When an analyst finds a program with high entropy that seems compressed or hidden.
- ✓When a researcher sees packer section names like UPX or VMProtect in a file.
- ✓When an analyst needs to unpack a file before analyzing it further.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/reverser/packer-unpacking/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“This program looks packed and I cannot read its code. How do I unpack it?”
5 new skills a week. 1 minute to read.
How it works
The skill tells the AI to check entropy and section names, identify the packer with detection tools, then use the matching unpacker or a manual method.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Packer Unpacking Playbook
Packers compress and/or obfuscate binaries to defeat static analysis. The first job: identify which packer, then dispatch the right unpacker (or manual unpacking strategy if no automated tool exists).
1. Detect packing
# Entropy quick-check (>7.0 across the binary = likely packed)
ent /tmp/sample
# or
python3 -c "
import sys, math
d = open('/tmp/sample','rb').read()
f = [0]*256
for b in d: f[b] += 1
h = -sum((c/len(d))*math.log2(c/len(d)) for c in f if c)
print(f'entropy={h:.3f}')
"
# Section-level entropy via radare2
r2 -qc "iSj" /tmp/sample | jq '.[] | "\(.name): \(.entropy)"'
# Tool-based detection
detect-it-easy /tmp/sample # most reliable, GUI + CLI
diec /tmp/sample # CLI for DIE
yara -r /opt/yara-rules/packers/ /tmp/sample
Decepticon helper:
bin_packer("/tmp/sample")
2. Common packer signatures
| Packer | Signature |
|---|---|
| UPX | UPX! magic at section header, sections named UPX0, UPX1 |
| ASPack | .aspack section, jump after entry to packed code |
| Themida | .themida section, anti-debug, anti-VM heavy |
| VMProtect | .vmp0, .vmp1 sections; obfuscated EP w/ virtualized handlers |
| MPRESS | .MPRESS1, .MPRESS2 sections |
| PECompact | pec1 section, encrypted sections |
| Enigma | .enigma1, .enigma2 sections |
| Petite | small overlay, .petite section |
| FSG | tiny imports, packed sections |
| MEW | MEW magic in section name |
| Armadillo | runtime decryption, anti-debug (older) |
3. Automated unpacking
UPX (easy)
upx -d /tmp/sample -o /tmp/unpacked
file /tmp/unpacked
If upx -d fails with "not packed by UPX", the version field has been
tampered with (anti-unpack trick). Fix:
# Patch the version byte back
python3 -c "
d = bytearray(open('/tmp/sample','rb').read())
# Find UPX! magic, fix version
import re
for m in re.finditer(b'UPX!', d):
d[m.end()] = 0x0d # set version field
open('/tmp/patched','wb').write(d)
"
upx -d /tmp/patched -o /tmp/unpacked
ASPack
unaspack /tmp/sample # or use ASPackDie / ASPack Stripper
Manual: ASPack's OEP jump is JMP <reg> at the end of unpack stub.
Set breakpoint there in x64dbg, dump from Scylla (PE only).
MPRESS
quickunpack /tmp/sample
# Or load in x64dbg, set BP on tail jump (E9 to OEP), dump w/ Scylla
PECompact / FSG
Use unpacme (uploads to UnpacMe service if engagement permits cloud
processing), or run in monitored sandbox + memory-dump strategy.
4. Manual unpacking strategy (Themida / VMProtect / Enigma)
These are commercial-grade and don't have reliable auto-unpackers. Approach:
Themida
- Static: identify anti-debug checks, patch them or rewrite
- Dynamic: x64dbg +
ScyllaHideplugin → bypass anti-debug - Set hardware breakpoint on
VirtualProtect(Themida unpacks via this) - When hit, walk back to find decrypted code regions
- Dump w/
Scyllaafter OEP is reached - Themida often has multiple layers — repeat per layer
VMProtect
VMProtect translates code into bytecode for a custom VM. No simple "unpack" — you must either:
- Devirtualize (extract VM handlers + write a translator). Tools:
VTIL(Vladimir's tools),vmpfix, manual w/ IDA + bytecode trace - Trace + symbolic execute via
Tritonorangr - Skip RE and treat as black-box (fuzz the interfaces)
Enigma Protector
Similar to Themida. ScyllaHide handles many checks. The license / virt machine layer is hardest. Some Enigma variants:
- v3-v5: scriptable unpack via
Enigma Static Unpacker - v6+: manual w/ x64dbg + Scylla, multiple decryption passes
5. Manual unpack technique (universal)
For any packer:
- Disable ASLR / DEP if needed (ScyllaHide /
setdllchar) - Set BP on entry point
- Step through unpack stub; watch for:
- Large
VirtualAlloc(decryption region) memsetfollowed by decrypted code being written- Tail jump to OEP (often
JMP <reg>orRETafter PUSHAD/POPAD)
- Large
- At suspected OEP, dump process w/
Scylla(PE) orr2 -d - Fix imports (Scylla auto-rebuild IAT), save dumped PE
- Re-run static analysis on the dumped file
6. Anti-anti-unpacking tricks
| Anti-unpack | Counter |
|---|---|
IsDebuggerPresent |
ScyllaHide, or patch w/ NOP |
NtQueryInformationProcess(ProcessDebugPort) |
ScyllaHide |
Timing checks (rdtsc measure) |
x64dbg "timing" plugin or patch |
| INT3 detection (BP byte scan) | hardware BPs only |
| Self-checksum | identify check l |
FAQ
What is a packer?
A packer compresses or hides a program's code so it is harder to read.
Which packers does it cover?
It covers UPX, ASPack, Themida, VMProtect, MPRESS, PECompact and Enigma.
Does unpacking always work?
No. Some protectors need manual unpacking, which the skill describes as a fallback.
Details
Original description by the author
Identify and unpack common binary packers — UPX, ASPack, Themida, VMProtect, MPRESS, PECompact, Enigma.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14172
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.