SecSIGSecurity Special Interest Group of US MensaCuriosity. Perspective. Security.

Research Library · Idea

Malware detection

Whether malicious software can be detected exactly is a question in computability theory as well as engineering. The foundational result is Fred Cohen's. His paper "Computer Viruses - Theory and Experiments", whose online text carries a 1984 copyright notice, defines a virus as "a program that can 'infect' other programs by modifying them to include a possibly evolved copy of itself". Its abstract states that "in general, detection of a virus is shown to be undecidable both by a-priori and runtime analysis".1

Cohen's argument is his own diagonal construction. To determine that a program P is a virus, one must determine that P infects other programs. He says this is undecidable since P could invoke the decision procedure D and infect other programs if and only if D determines that P is not a virus. His pseudo-program "contradictory-virus" infects only when D says it is not a virus. If D reports it as a virus it does not infect and so is not one, and if D reports it as not a virus it infects and is one. He concludes that precise determination of a virus by its appearance is undecidable.1 He then argues that equivalence of two evolutions of a virus is undecidable, and that detection by behaviour is also undecidable, because detecting a trigger requires detecting a virus by the appearance of the inputs.1

The result is stated for Cohen's definition of a virus. His definition covers programs that are not harmful, and he gives a compression virus that asks permission before acting.1 Infection is a property of what a program does to other programs, not of the function it computes, so Rice's theorem does not apply to it directly, and Cohen's own argument does the work. The result does not by itself extend to malware in general or to other properties such as vulnerabilities; each would need its own argument with a stated model of execution.

Cohen draws a practical conclusion in his own words: "Precise detection is undecidable, however statistical methods may be used to limit undetected spreading either in time or in extent." He adds that limited forms of detection and prevention could offer limited protection.1

Source · Computer Viruses - Theory and Experiments (opens in a new tab) · Fred Cohen; Internet Archive copy of the University of Michigan course handout

References

  1. Computer Viruses - Theory and Experiments (opens in a new tab) · Fred Cohen; Internet Archive copy of the University of Michigan course handout · Cohen, online text with a 1984 copyright notice; journal version in Computers & Security, 1987, DOI 10.1016/0167-4048(87)90122-2. ↩ ↩ ↩ ↩ ↩

Research articles

See what connects to it on the map of ideas →

See also