# Malware Packer Triage Upx And Common Packers

> Use when Detect It Easy names a known packer (UPX, ASPack, MPRESS, FSG, MEW, Petite) and you need to unpack it quickly and validate the result. Covers per-packer unpacking commands and tools, modified UPX variants that resist stock unpackers, validating unpacked output (strings, imports, compiler detection), and handling multi-layer packing. Use when triage reports a known packer signature, when automatic unpacking fails on a supposedly known packer, or when processing bulk samples efficiently.

- Skill: `mizazhaider-ceh/malware-packer-triage-upx-and-common-packers` (Agent Skill)
- Install (CLI): `npx get-skill add mizazhaider-ceh/malware-packer-triage-upx-and-common-packers`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mizazhaider-ceh/malware-packer-triage-upx-and-common-packers/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: mizazhaider-ceh (https://skillmd.com/u/mizazhaider-ceh)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/mizazhaider-ceh/malware-packer-triage-upx-and-common-packers

---


Most packed malware in the wild uses a handful of well-known packers, and
most of those unpack with one command. This sub-skill is the quick
reference for the common packers: what DIE reports, which tool unpacks
it, and how to confirm the output is real. Scope: unpack only samples
you are authorized to handle, in an isolated lab, during authorized DFIR
or malware research.

## Quick Workflow

1. Run DIE and record the exact packer name and version string.
2. Look up the matching unpacker below and run it on a copy.
3. Validate the output: DIE should now report a compiler, strings and
   imports should explode in count.
4. If validation fails, check for modified variants or nested layers.
5. Hash and archive both the packed original and the unpacked payload.
6. Route the unpacked payload through static triage (strings, imports,
   capa) and record the packer in the case notes for the YARA rule.

## 1. UPX and its variants

```bash
# Standard UPX
upx -d packed.exe -o unpacked.exe

# What success looks like
diec unpacked.exe
# -> PE32, compiler: Microsoft Visual C++ 19.x, linker 14.x
strings -n 8 unpacked.exe | wc -l   # thousands, up from dozens
```

Modified UPX (attackers tweak the stub to break `upx -d`): symptoms are
"not packed by UPX" errors on a file DIE calls UPX. Fixes: try `upx -d`
with `--force`, use an older UPX version matching the stub, or fall back
to manual OEP dumping (parent skill section 4). The UPX0/UPX1/UPX2
section names usually survive modification and confirm the diagnosis.

## 2. ASPack, MPRESS, FSG, MEW, Petite

```bash
# ASPack (aspackdie / unASPack tools)
aspackdie packed.exe -o unpacked.exe

# MPRESS (the tool unpacks its own format)
mpress -d packed.exe -o unpacked.exe

# FSG, MEW, Petite: dedicated unpackers exist per family;
# when no unpacker is available, manual OEP dumping works well
# because these are simple single-layer packers
```

DIE version strings matter: ASPack 2.12 and 2.28 need different unpacker
builds. When the dedicated tool fails, check the DIE version string
first before assuming a custom packer.

## 3. Validation checklist

Every unpacked output must pass all of these before analysis:

```bash
diec unpacked.exe | head -5
# expect: compiler named, no packer named

# Import table sanity in PE-bear: dozens to hundreds of imports,
# entry point in .text, sections with normal names

# Behavior parity: detonate packed vs unpacked in the sandbox;
# the unpacked payload should show the same behavior profile
# (or a superset, since nothing is hidden anymore)
```

Validation output shape:

```text
packed.exe:    14 imports, 62 strings,  DIE: UPX 5.0.2
unpacked.exe:  212 imports, 4800 strings, DIE: MSVC 19.40
sandbox:       both beacon to the same domain -> parity confirmed
```

If parity fails (unpacked behaves differently), the unpacker corrupted
the image: try another tool or go manual.

## 4. Multi-layer packing

```bash
# Unpack outside-in, checking DIE after each layer
diec layer0.exe   # -> custom packer
# ... manual unpack -> layer1.exe
diec layer1.exe   # -> UPX
upx -d layer1.exe -o layer2.exe
diec layer2.exe   # -> MSVC compiler: done
```

Keep every layer hashed and archived; incident responders encounter the
outer layer and your notes must map each layer to its unpack method.
Name files clearly: sample.l0.packed, sample.l1.upx, sample.l2.clean.

## Edge cases

- Fake packer signatures: some stubs mimic UPX section names without
  being UPX; the unpacker failing is the signal to go manual.
- UPX --brute variants: stock `upx -d` may fail; UPX built from source
  with brute support sometimes succeeds.
- Packers that strip the overlay: unpackers that do not preserve
  overlays lose appended data; check file size before/after.
- .NET "packers" (ConfuserEx): native unpackers do not apply; use
  .NET dumpers after the assembly loads.
- Unpackers that execute the stub: prefer static unpackers; if the
  unpacker runs code, run it in the lab VM, not on your workstation.

## Escalation

- If two different unpackers produce different outputs, escalate to
  manual dumping; one of them is corrupting the image.
- If layers exceed three, treat as a custom packer case and escalate to
  the parent skill's manual workflow.

- If the same modified UPX stub appears across many samples, invest in a scripted unpacker once; manual repetition does not scale.
- If an unpacker executes the stub as part of unpacking, run it only in the lab VM and hash-verify the output before analysis.

## Detection and defender view

Known-packer unpacking belongs in the automated pipeline: every
incoming sample gets DIE-scanned, known packers get auto-unpacked, and
the unpacked payload feeds YARA and capa automatically. Write a YARA
rule for the stub only when the stub is family-specific; generic UPX
stubs are too common to alert on alone. Track packer prevalence in your
intake: a spike in one packer often precedes a campaign using a shared
builder.

## Key references

- UPX documentation:
  https://upx.github.io/
- Detect It Easy:
  https://github.com/horsicq/Detect-It-Easy
- PE-bear:
  https://github.com/hasherezade/pe-bear
- MITRE ATT&CK: T1027.002 (Software Packing)
- Unpacker collections (use vetted builds in the lab):
  https://github.com/topics/unpacker

