encyclopegia.org

Metamorphic code

Metamorphic code is code that when run outputs a logically equivalent version of its own code under some interpretation. This is similar to a quine, except that a quine's source code is exactly equivalent to its own output. Metamorphic code also usually outputs machine code and not its own source code.

Metamorphic code is code that when run outputs a logically equivalent version of its own code under some interpretation. This is similar to a quine, except that a quine's source code is exactly equivalent to its own output. Metamorphic code also usually outputs machine code and not its own source code. ==Overview== Metamorphic code is used by computer viruses to avoid the pattern recognition of anti-virus software. Metamorphic viruses often translate their own binary code into a temporary representation, editing the temporary representation of themselves and then translate the edited form back to machine code again. This procedure is done with the virus itself, and thus also the metamorphic engine itself undergoes changes, which means that no part of the virus stays the same. This differs from polymorphic code, where the polymorphic engine can not rewrite its own code. Metamorphic code is used by some viruses when they are about to infect new files, and the result is that the next generation will never look like current generation. The mutated code will do exactly the same thing (under the interpretation used), but the child's binary representation will typically be completely different from the parent's. Mutation can be achieved using techniques like inserting NOP instructions (brute force), changing what registers to use, changing flow control with jumps, changing machine instructions to equivalent ones or reordering independent instructions. Metamorphism does not protect a virus against heuristic analysis. Metamorphic code can also mean that a virus is capable of infecting executables from two or more different operating systems (such as Windows and Linux) or even different computer architectures. Often, the virus does this by carrying several viruses within itself. The beginning of the virus is then coded so that it translates to correct machine-code for all of the platforms that it is supposed to execute in. This is used primarily in remote exploit injection code where the target platform is unknown. ==Metamorphic viruses== Simile ZMist Lacrimae ==See also== Self-modifying code Strange loop Polymorphic code Timeline of notable computer viruses and worms ==References== ==External links== Hunting for Metamorphic

References

No reference rows published for this article.

Cite this article

MLA

"Metamorphic code." encyclopegia.org, 2024, https://encyclopegia.org/wiki/metamorphic-code. Accessed 24 November 2026.

Chicago

"Metamorphic code." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/metamorphic-code.

APA

encyclopegia.org. (2024). Metamorphic code. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/metamorphic-code

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Internet traffic

enwiki · references available

History of Toulouse

enwiki · references available

List of unreleased songs recorded by Madonna

enwiki · references available

History of Quebec French

enwiki · references available

Communist Party of Australia (1971)

enwiki · references available

WDRV

enwiki · references available

Soyuz TM-34

enwiki · references available

Soyuz TM-33

enwiki · references available

Red Shift (novel)

enwiki · references available

New Internationalist

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1193466879 · 0.5 · snapshot enwiki-001193466879

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.