Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Metamorphic Malware?

Metamorphic malware rewrites its own instructions for every new copy. Two samples of the same family can share no code at all and still do precisely the same thing.

Illustration for the cybersecurity term Metamorphic Malware
Home / Blog / Cybersecurity Terms / What Is Metamorphic Malware?
17 November 2026

What Is Metamorphic Malware?

What Is Metamorphic Malware?

Metamorphic malware rewrites its own body each time it propagates, so that every copy is a different sequence of instructions with identical behaviour. There is no encrypted payload sitting underneath, no key, and no decryption routine to catch. The code is in plain view and still matches nothing, because the version on this machine was never the version on the last one.

It is the most technically ambitious form of evasion ever built into malware, and in commercial terms it lost. Understanding why is more instructive than the technique itself.

How an Engine Rewrites Code

A metamorphic engine carries a miniature compiler toolchain: it disassembles its own body, transforms the resulting representation, and reassembles working machine code with all offsets corrected. The transformations are individually simple.

The engine must also rewrite itself, which is the hard part. A bug that corrupts one generation propagates into every descendant, and the family dies quietly.

The Canonical Examples

W32/Simile, also called Etap, appeared in 2002 and remains the reference implementation. Roughly 90 per cent of its 14,000 lines of assembly were engine rather than payload, and it could expand, shrink, and relocate its own code across generations. Zmist, released a year earlier, went further still: it disassembled the host program it infected and inserted its own instructions throughout the legitimate code, so the malicious body was not a contiguous block anywhere in the file. W32/Evol and a handful of others followed, then the lineage effectively stopped.

It stopped because the economics changed. Writing a correct metamorphic engine takes months of specialist assembly work. Renting a crypter that produces an equally unique file costs a few pounds per build and requires no skill at all. Server-side generation, where a fresh sample is compiled for every download, achieves the same result as metamorphism with none of the engineering risk. Attackers are rational about cost, and metamorphism never paid.

Metamorphic Against Polymorphic

Polymorphic malware encrypts a constant body and mutates only the decryption stub. The original code is recoverable in full as soon as the stub has run, which is why emulation defeats it: let the sample decrypt itself in a controlled environment, then match the plaintext. Metamorphic malware has no such moment. There is no plaintext body to wait for, because the body genuinely differs. Detection has to work on what the code means rather than what it contains.

Detecting Something With No Constant Bytes

In practice, a defender today is far more likely to meet server-side polymorphism than a genuine metamorphic engine. The lesson carries across regardless: detection anchored to file content is fragile, detection anchored to what the code does is durable, and that distinction shapes how an endpoint estate should be configured and measured. At Privia Security, our endpoint security solutions prioritise behavioural coverage for exactly this reason.

FAQ – Frequently Asked Questions

What Is the Difference Between Polymorphic and Metamorphic Malware?

Polymorphic malware keeps one constant body, encrypted, and varies only the decryption routine that unwraps it. Metamorphic malware has no encrypted body at all; it rewrites its own instructions so that each generation differs structurally while behaving identically. Polymorphic code can be recovered by letting it decrypt itself, whereas metamorphic code never reduces to a single recoverable form.

Is Metamorphic Malware Still Being Written?

Very rarely as a full self-rewriting engine. The engineering cost is high, bugs are fatal to the family, and cheaper methods achieve the same evasion. Attackers now generate unique builds on the server for each download, or run payloads through commercial crypters. The outcome for a defender is the same, which is why detection must not depend on matching file contents.

Can Antivirus Software Detect Metamorphic Malware?

Not through byte signatures, which is the whole point of the technique. Detection comes from emulating the sample and observing behaviour, comparing control flow structure rather than content, and applying machine learning models to structural features. Endpoint detection platforms that alert on actions such as persistence creation and credential access are effective regardless of how the code was arranged.

Does Metamorphism Change What the Malware Does?

No, and that constraint is what makes detection possible. Every variant must perform the same operations to achieve the same objective, so the observable behaviour stays constant even when no two files share a byte. Rewriting is an evasion technique applied to the representation of the code, not a change to its purpose or its effects on a system.

Related Terms

You May Be Interested In These

What Are YARA Rules?

Cybersecurity Terms

17 November 2026

What Are YARA Rules?

Read More
What Is DevSecOps?

Cybersecurity Terms

17 November 2026

What Is DevSecOps?

Read More
What Is a Data Diode?

Cybersecurity Terms

17 November 2026

What Is a Data Diode?

Read More