The goal of this ticket is to give a few hints about how to know if a binary it is packaged or not.

A packed binary hides its real code inside a compressed or encrypted blob, plus a small stub that unpacks it at run time.
Analyse it as-is and you are reading the wrapper, not the program. Seven static checks that tells you which one you have, without running it.
The seven checks
| # | Check | Tool | Packed if |
|---|---|---|---|
| 1 | Signature and entropy | Detect It Easy (DIE) | A packer is named, or a section is at 7.2+ bits/byte |
| 2 | Section names | PEview | Packer names (UPX0, .MPRESS1), only 2 to 3 sections, or names that do not fit the content |
| 3 | Sizes and permissions | PEview | Raw size 0 with a large virtual size, or any RWX section |
| 4 | Imports | pestudio | A handful, mostly LoadLibraryA, GetProcAddress, VirtualProtect |
| 5 | Entry point | PEiD | Outside .text: a packer section, a data-named section. |
| 6 | Unpack | upx -t, upx -d | Unpacks, or refuses while 1 to 5 still look packed |
Each check below is shown on three training samples: 02_upx.exe (plain UPX), 03_upx_renamed.exe (UPX with its names and signature wiped) and 04_xor_stub.exe (a home-made XOR crypter).
Check 1: Signature and entropy
Open the file in DIE, read the detection list, then open the entropy view. Compressed or encrypted data sits near 8.0 bits per byte; normal code sits around 5 to 6.5.


- 02_upx: DIE names UPX. UPX1 is at 7.84.
Check 2: Section names
List the sections in PEview. Compilers produce a predictable set (.text, .data, .rdata, .idata, .reloc), usually 4 to 8 of them. Watch for packer names, very few sections, or names that do not fit what is inside.

- 02_upx: only 3 sections, UPX0, UPX1, UPX2. Instant giveaway.
Names are just labels and are trivial to change, so treat this as weak evidence.
Check 3: Sizes and permissions
In PEview, compare each section’s Virtual Size with its Size of Raw Data, and read its Characteristics. A packer reserves empty memory to unpack into, then writes code there and runs it, so it needs sections that are both writable and executable (RWX).


- 03_upx_renamed: identical under new names: .code has raw size 0, .code and .rdat are RWX.
Check 4: Imports
Count the imported functions and ask whether they explain what the program does. A packer only needs enough to unpack and rebuild the real import table at run time: LoadLibraryA, GetProcAddress, VirtualProtect, sometimes VirtualAlloc.

- 02_upx: 6 functions. Four are the unpacker kit, plus one leftover each from msvcrt and USER32.

- 04_xor_stub: only 4, all from KERNEL32.
[Screenshot 4a] Import list for 04_xor_stub: four functions, no USER32.
Check 5: Entry point
Read AddressOfEntryPoint in PEiD and find which section contains it. A compiler starts the program in .text. A packer starts it in its own stub.

- 01_baseline: RVA 0x0013E0, in .text.

- 04_xor_stub: RVA 0x8000, in .boot, the last section in the table. A stub added at the end is a classic layout.
Check 6: Unpack
On a copy, run upx -t to test, then upx -d to unpack. A clean unpack settles the question. A refusal only means UPX does not recognize the file, so fall back on checks 1 to 5.

- 02_upx:
upx -drestores the original program.

- 03_upx_renamed:
upx -treports “Tested 0 files” because the UPX! magic was wiped. Checks 1 to 6 still say packed, so restore the magic by hand or dump it from memory.

- 04_xor_stub: “not packed by UPX”, which is true. It is a custom packer, so reverse the stub or dump the decrypted data from memory.
Side by side
| Check | 02_upx | 03_upx_renamed | 04_xor_stub |
|---|---|---|---|
| 1. Signature, top entropy | UPX; 7.84 | none; 7.84 | none; 7.96 |
| 2. Sections | UPX0/1/2 | 3, misnamed | 8, odd .enc/.boot |
| 3. Sizes, RWX | raw 0, 2 RWX | raw 0, 2 RWX | 0x10-byte .text |
| 4. Imports | 6 | 6 | 4 |
| 5. Entry point | UPX1 | .rdat | .boot (last) |
| 6. upx -d | unpacks | refused | not UPX |
| Verdict | UPX | UPX, tampered | Custom |
Takeaways
- No signature does not mean clean. 03_upx_renamed and 04_xor_stub beat both shortcuts.
- Entropy, imports and entry point are the hardest signs to hide.
- When you can, compare against a clean build of the same program: a drop in imports and strings is hard to miss.




The goal of this ticket is to present the different technological components of WebAssembly in comparison with the Java technological stack.

You must be logged in to post a comment.