computer virus

term

security

Kept in this browser · My desk

A program that copies itself into other programs, documents or boot sectors, so that it runs, and spreads further, whenever its host is run.

Fred Cohen's 1984 definition still holds: a program that can infect other programs by modifying them to include a possibly evolved copy of itself, spreading with the rights of every user who runs an infected program. RFC 4949 adds that a virus cannot run by itself, which is what separates it from a worm, and the trojan horse differs again because it does not copy itself at all. In everyday speech every piece of malware is a virus; in the strict sense true viruses have become rare, and Kaspersky called KBOT, in 2020, the first living virus it had seen in the wild for years.

What the definitions say. Fred Cohen's 1984 paper defines a virus as a program that can infect other programs by modifying them to include a possibly evolved copy of itself, and the standards have kept that core. The glossary of the National Institute of Standards and Technology (NIST) carries the Committee on National Security Systems Instruction (CNSSI) 4009-2022 wording, taken from the ISO/IEC 2382:2015 vocabulary of the International Organization for Standardization and the International Electrotechnical Commission: software that propagates itself by modifying other programs to include a possibly changed copy of itself and that runs when the infected program is invoked, often causing damage and sometimes triggered by an event such as a predetermined date. RFC 4949, the Internet Security Glossary (Request for Comments), adds what separates it from a worm: a virus cannot run by itself and needs its host program to be run. NIST's 2005 malware guide, Special Publication (SP) 800-83, gives the anatomy: an infection mechanism, a payload that carries the virus's objective, and often a trigger, the condition that makes the payload run.

The word came from an experiment. Cohen conceived the first virus on 3 November 1983 for a weekly security seminar, Len Adleman suggested the name, and after eight hours of work on a heavily loaded VAX 11/750 running Unix it was demonstrated on 10 November. His account says the infection was planted in vd, a new program that drew Unix file structures, announced on the system bulletin board; every infection was made by hand, with traces and access controls, and nothing was damaged. In five attacks it obtained all system rights in under an hour, the fastest in under five minutes and the average under 30, and the half second it added to each run went unnoticed. The administrators then banned further experiments. In July 1984 a prototype on a Univac 1108 running a Bell-LaPadula system crossed user boundaries and moved up a security level after 18 hours of connect time, with five lines of assembly code, about 200 of Fortran and 50 of command files, and no bug involved: the model itself allowed the flow. His paper also proved that deciding whether a program is a virus is undecidable, both by looking at it and by watching it run, which is the formal reason no scanner can be complete. The Center for Education and Research in Information Assurance and Security (CERIAS) at Purdue University catalogues the paper as July 1984; a SANS Internet Storm Center diary dates it to February 1984 and notes that Gregory Benford's short story The Scarred Man had already used the word for a malicious program in 1970.

The kinds follow the host. NIST divides viruses into compiled ones, run by the operating system, and interpreted ones, run by an application. File infectors live in executables: Jerusalem, first seen at the Hebrew University in October 1987 (F-Secure dates a first version to as early as 1986), stayed in memory, infected .COM and .EXE programs and deleted the programs run on any Friday the 13th; NIST names it and Cascade as the best known. Boot sector viruses live in the code a machine runs before its operating system, the master boot record or the boot sector of a diskette, which need not even be bootable: an infected disk left in the drive at start-up is enough. Brain, Stoned and Ping-Pong were of this kind (see boot sector virus). Multipartite viruses use both, as Tequila did, infecting the master boot record and then executables from memory. Interpreted viruses live in documents and scripts (see macro virus), and polymorphic ones change their code with every copy (see polymorphic virus). NIST's 2013 revision notes that most modern samples blend virus, worm and trojan behaviour.

A file infector at its worst. Kaspersky describes CIH, also called Chernobyl, as a Windows 95 and 98 virus of about 1 KB that infected Portable Executable files, found in the wild in Taiwan in June 1998, released by its author while he was a student there; within a month infected files on United States game sites had made it global. Its time bomb went off on 26 April 1999 and, by Kaspersky's count, damaged about half a million computers: all lost the data on their hard drives, and many had their flash basic input/output system (BIOS) overwritten. The date marked the first version's release on 26 April 1998, not the 1986 disaster its nickname recalls.

How vendors name and test. Microsoft names detections by the Computer Antivirus Research Organization (CARO) scheme, type, platform, family, variant letter and suffix, and keeps Virus and Worm as separate types beside Trojan, Backdoor and Ransom; variant letters run in sequence, so .AF follows .AE. Kaspersky's classification says a virus does not use network services: a copy reaches another computer only when an infected object is carried there, on a network share, removable media or an email attachment. To check a scanner without a live sample, the European Institute for Computer Antivirus Research (EICAR) and CARO publish the EICAR test file, a 68-byte .COM file that products detect as if it were a virus.

The law treats spreading one as damage. The United States Computer Fraud and Abuse Act, in section 1030(a)(5)(A) of title 18 of the United States Code, punishes whoever knowingly causes the transmission of a program, information, code or command and thereby intentionally causes damage without authorization to a protected computer. In Brazil, Lei 12.737 of 30 November 2012 created article 154-A of the Penal Code, whose first paragraph gives the same penalty to whoever produces, offers, distributes, sells or spreads a program meant to allow the invasion; Lei 14.155 of 27 May 2021 raised the penalty from three months to a year of detention to one to four years of imprisonment, with a fine in both versions.

Rare in the strict sense, common in speech. A SANS diarist wrote in 2024 that calling any malicious code a virus is quite incorrect and that real viruses are mostly a thing of the past; the last to make an impact was KBOT, which Kaspersky described in February 2020 as arriving over the internet, a local network or infected external media, injecting its code into Windows executables and stealing banking data through web injects.

The defences grew from the same history: inoculation and scanners in the 1980s, integrity checking after the AIDS disk of 1989 showed that only checksums noticed a change, emulation against polymorphism, and today application control and least privilege, because a virus can only use the rights of the person who runs its host. Cohen's measurements of 1984 pointed the same way: a few highly connected users carried most of the sharing, and protecting them would slow a virus greatly. The history from the first experiments to today is in the Learn article on viruses and trojan horses.

Also known as: computer virus, file infector, file virus, multipartite virus, vírus de computador, vírus de arquivo

Sources

← Back to C Back to the glossary