A computer virus is a small program written to alter the way a computer operates, without the permission or knowledge of the user. A computer virus must meet two criteria:
- It must execute itself. It often places its own code in the path of execution of another program.
- It must replicate itself. For example, it may replace other executable files with a copy of the virus infected file. Viruses can infect desktop computers and network servers alike.
Most viruses are purposely programmed to damage the computer by destroying programs, deleting files, or reformatting the entire hard disk. Others are not designed to do any damage, but simply to replicate themselves and make their presence known by presenting text, video, and audio messages. Although these benign viruses do not create notable problems for the computer user, but they typically take up computer memory used by legitimate programs. As a result, they often cause abnormal behavior and can result in system crashes. In addition, many viruses are bug-ridden, and these bugs may lead to system crashes and data loss. There are five recognized types of viruses: file infector viruses, boot sector viruses, master boot record viruses, polypartite viruses and macro viruses. Some viruses are called Trojan horses. Trojan horses are impostors that claim to be something desirable but, in fact, are malicious. A very important distinction between Trojan horse programs and true viruses is that they do not replicate themselves. Trojan horses contain malicious code that when triggered cause loss, or even theft, of data. For a Trojan horse to spread, users must invite these programs onto their computers; for example, by opening an email attachment or downloading and running a file from the Internet.
Worms are programs that replicate themselves from system to system without the use of a host file. This is in contrast to viruses, which requires the spreading of an infected host file. Although worms generally exist inside of other files, often Microsoft Word or Excel documents, there is a difference between how worms and viruses use the host file. Usually the worm will release a document that already has the “worm” macro inside the document. The entire document will travel from computer to computer, so the entire document should be considered the worm.
Worms are considered more dangerous because of their ability to spread rapidly through the network without any human action. In fact, a computer virus harms an individual PC and so its damage is more localized. Due to the copying nature of a worm and its capability to travel across networks the end result in most cases is that the worm consumes too much system memory or network bandwidth, causing web servers, network servers and individual computers to stop responding.