A program that replicates itself, and in so doing resembles a biological virus, by attaching to other programs and carrying out unwanted and sometimes damaging operations. Although some viruses are relatively benign and are little more than pranks, most are written with malicious intent; at the extreme, they can wipe out all the contents on a computer’s hard disk.
Viruses fall into three general categories: boot sector viruses, file viruses, and macro viruses. Boot sector viruses attach themselves to the hidden boot sector of a floppy or hard disks so that they can enter the computer’s memory when the system boots. File viruses attach themselves to executable files so that they can spread when the infected program is launched. Macro viruses take advantage of the scripting languages built into popular applications, especially Microsoft Office. See boot sector virus, macro virus, Trojan horse.