Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
A packer wraps an executable in a compressed or encrypted shell that unwraps itself in memory. The file on disk and the code that runs are no longer the same thing.

What Is a Malware Packer?
A packer takes a compiled executable, compresses or encrypts it, and wraps the result in a small program called a stub. When the file runs, the stub allocates memory, reconstructs the original code, repairs the import table, and transfers execution to the real entry point. Everything a scanner reads on disk belongs to the stub. Everything that matters appears only after the program has started.
This is not inherently malicious. Packing began as a way to reduce file size and to protect commercial software from casual copying, and UPX is still used legitimately for both. The technique became a security problem because it does one thing extremely well: it breaks the relationship between the bytes stored in a file and the behaviour of the program.
The vocabulary overlaps, but the distinctions are useful in a report:
Packing is often confused with obfuscation. A packer treats the original binary as opaque data and restores it intact; obfuscation transforms the code itself and survives unpacking. Serious families use both, which is why a successfully unpacked sample can still be unreadable.
No single indicator settles it, but a handful together are conclusive.
Tools such as Detect It Easy identify common packers by signature, and PE parsing libraries give you entropy and section data in a few lines of script. For bulk triage, entropy plus import count is a cheap and surprisingly reliable filter.
Known packers often have a documented switch, and UPX decompresses with one. Custom and commercial protectors do not, so the practical method is to let the sample unpack itself and then capture the result.
In a debugger, that means running the stub, breaking at the moment memory is made executable or at the jump to the original entry point, and dumping the process image. The import table then has to be rebuilt, since it was reconstructed in memory and the dump has no valid directory. Automated sandboxes do much of this unprompted, and scanning process memory with YARA rules written for the unpacked family is often faster than a manual unpack, because it does not matter how many layers preceded it.
This is the central argument for memory-based detection generally. A crypter can produce a thousand unique files from one payload, and signatures against those files are worthless, while a rule matching the decrypted code in memory matches all thousand.
Do not block packed files outright: legitimate installers and plenty of commercial software are packed, and the false positive rate would be unworkable. Treat packing as a scoring factor instead. A packed executable, unsigned, running from a user profile directory, with an empty import table and an outbound connection within seconds of launch, is a strong detection without needing to know the family. Entropy and import characteristics make good hunting queries across a software inventory, and anything in your own estate that looks packed but is not a recognised commercial product is worth a question to whoever deployed it.
At Privia Security, our endpoint security solutions focus on behaviour after execution precisely because the file on disk tells you so little once a packer is involved.
No. Commercial software is packed to reduce size and to deter copying, and many legitimate installers use the same techniques. Packing raises suspicion rather than settling it. What makes a packed file notable is the company it keeps: no digital signature, execution from a temporary or profile directory, no entry in software inventory, and network activity immediately after launch.
Because a signature written against the file never matches. A crypter encrypts the same payload with a fresh key for every build, producing endlessly unique files from unchanged code. Vendors respond with emulation, unpacking engines, and memory scanning after the payload is reconstructed, which is why detection increasingly happens at runtime rather than when the file is written to disk.
Where the packer is known, a documented decompression switch may be enough. Otherwise the sample is run under a debugger until it reconstructs the original code, typically caught by breaking when memory is made executable, and the process image is then dumped and its import table rebuilt. Automated sandboxes handle common cases, and scanning process memory often avoids manual unpacking altogether.
Shannon entropy is measured from 0 to 8 bits per byte. Ordinary compiled code sits around 5.5 to 6.5, while compressed or encrypted data approaches 7.5 and above. A value over roughly 7.2 in an executable section strongly suggests packing, though compressed resources such as images can produce similar readings, so entropy should be combined with import and section analysis.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.