A computer virus is a program that spreads malicious code by copying itself and infecting host computers. Although some viruses are latent, others can corrupt data or impede system performance. The term is specific, distinguished by how viruses are distributed (through downloads, email attachments, or removable media such as CDs, DVDs, or USB drives), but is often used as a catchall, much like the word “malware.” It should be noted that adware and spyware are actually not viruses as they do not have the same reproductive ability.
Many viruses attach themselves to legitimate executable files on a host computer that allow the virus to be loaded when the user opens the file. A virus generally will be activated when it is loaded into a computer’s memory, and then it may continue to spread its viral code into a number of other programs and files stored on the host computer. The computer’s programs may still continue to work normally, but also spread the virus’ code to other machines on the same network, or machines that use the same storage devices. Some viruses use polymorphic code to avoid detection by antivirus software, modifying their decryption modules so that the virus changes each time it infects a new host. Software developers that produce programs with large numbers of bugs are prime targets for viruses because they exploit these bugs in order to spread. Since viruses are built to avoid detection, antivirus software can create bait files that get the virus to infect it in order to study the virus or to discover and remove it. It is always a good idea to keep antivirus software up to date for protection against new viruses.