Glossary Forensics

Packer

A packer compresses or encrypts an executable and adds a small stub that restores the original code in memory when the program runs.

Last reviewed:

AdSense Placeholder
Slot: header_reference_page

In more detail

Legitimate software uses packers to shrink files, and malware uses them to hide from scanners. Tell-tale signs are sections with very high Entropy (close to 8 bits per byte), few imports and unusual section names; UPX is a common packer. When a packed program starts, the stub unpacks the real code into memory and jumps to it, so the code that a scanner reads from disk is only compressed or scrambled data. Packers differ in effort: simple ones such as UPX can be reversed with their own tool, while custom packers add anti-analysis tricks.

Why it matters

Signature-based scanners match known bytes, and packing changes every byte of the file, so one malicious program can look different in each build. Packing is not proof of malice, though: installers, game protection and commercial software pack their programs too, and compressed or encrypted resources also have high entropy. Treat it as a reason to dig deeper, then confirm by unpacking the file or watching what it does in a safe sandbox.

Example

Compressed data is almost as random as it can be. As a rough demonstration, the entropy of a common Linux program, /usr/bin/ls, is 6.29 bits per byte; compress the very same bytes with zlib and the entropy rises to 7.99, near the 8.0 ceiling. In a packed Windows program, the section holding the compressed payload shows that kind of figure, the import list often shrinks to a loader such as LoadLibraryA and GetProcAddress (see Import table), and UPX-packed files typically carry sections named UPX0 and UPX1. Inspect sections and entropy in a Portable Executable (PE) file with the Executable Forensics, or scan any file with the Binary & Archive Forensics.

Common confusion

A packer is not an installer, and it is not the same as a plain archive: it makes a program that still runs on its own.

AdSense Placeholder
Slot: footer_leaderboard