rogue computer program, typically a short program designed to disperse copies of itself to other computers and disrupt those computers' normal operations. A computer virus usually attaches to or inserts itself in an executable file or the boot sector (the area that contains the first instructions executed by a computer when it is started or restarted) of a disk; those that infect both files and boot records are called bimodal viruses. Although some viruses are merely disruptive, others can destroy or corrupt data or cause an operating system or applications program to malfunction.
Millions of computer malware programs are known; they can be spread via removable disks or drives, networks, or Internet websites and services. Although the term virus is commonly used for almost all computer malware, a distinction should be made between a true virus—which must attach itself to another program to be transmitted—and a bomb, a worm, and a trojan (or Trojan horse). A bomb is a program that resides silently in a computer's memory until it is triggered by a specific condition, such as a date. A worm is a destructive program that propagates itself over a network, reproducing as it goes. A trojan is a malicious program that passes itself off as a benign application; it cannot reproduce itself and, like a virus, must be distributed by a USB drive, an external disk, Internet downloads, electronic mail, or the like. Ransomware is a type of malware that encrypts or threatens to encrypt the files on a computer until money is paid, and has become a lucrative form of extortion for organized crime. Malware can also infect advanced cellular telephones (smartphones) and other devices using software. Computer malware has been used since the early 21st cent. to steal sensitive information from government, business, and personal computers and to blackmail computer users. Virus programs that patch programs with security defects that are exploited by malicious computer viruses also exist.
Antivirus programs and hardware have been developed to combat malware. These search for evidence of a malware program (by checking for appearances or behavior that are characteristic of viruses, trojans, and the like), isolate infected files, and remove malware from a computer's software. Researchers are working to sidestep the tedious process of manually analyzing malware and creating protections against each program by developing an automated immune system for computers patterned after biological processes. In 1995 Israel became the first country to legislate penalties both for those who write malware and those who spread the programs.