A worm is a special kind of computer virus that propagates by self-replication over a computer network. This propagation can be either via e-mail or other means such as files being copied over a network.

Comparison chart

Computer Virus versus Computer Worm comparison chart
Edit this comparison chartComputer VirusComputer Worm
How does it infect a computer system? It inserts itself into a file or executable program. It exploits a weakness in an application or operating system by replicating itself.
How can it spread? It has to rely on users transferring infected files/programs to other computer systems. It can use a network to replicate itself to other computer systems without user intervention.
Does it infect files? Yes, it deletes or modifies files. Sometimes a virus also changes the location of files. Usually not. Worms usually only monopolize the CPU and memory.
whose speed is more? virus is slower than worm. worm is faster than virus. E.g.The code red worm affected 3 lack PCs in just 14 Hrs.
Definition The virus is the program code that attaches itself to application program and when application program run it runs along with it. The worm is code that replicate itself in order to consume resources to bring it down.

Working principle

Worms normally move via the network and infect other machines through the computer's that are connected in the network. This way, a worm can expand from a single copy to many at a very fast rate. When a worm gets installed, it opens a back door into the computer, adds the infected machine to a botnet and installs codes to hide itself. Then the worm may start its work. It may delete some system files; it may send junk mails to the user, it may install other adware or spyware, through which the author is able to know important information about the user. This may include the users' password etc.

A virus needs a host program, for example, a forwarded mail, through which it comes as an attachment. After the user, downloads the attachment, the virus gets installed in the users computer. After that, it might corrupt or delete data on the computer, use e-mail program to spread itself to other computers, or even erase everything on the hard disk. Viruses use computer memory used by legitimate programs. As a result, it causes erratic behavior and can result in system crashes. Apart from that many viruses are bug-ridden, and these bugs may lead to system crashes and data loss.

Examples and damage

On the whole, worms are considered more dangerous because of their ability to spread rapidly through the network. A virus harms an individual PC and so its damage is more localized.  On July 19, 2001, The Code Red worm replicated itself more than 250,000 times within nine hours. Code Red worm, slowed down Internet traffic when it began to replicate itself. Each copy of the worm scanned the Internet for Windows NT or Windows 2000 servers that did not have the Microsoft security patch installed. Each time it found an unsecured server, the worm copied itself to that server. The new copy then scanned for other servers to infect. Depending on the number of unsecured servers, a worm can create hundreds of thousands of copies.

The ILOVEYOU bug is a virus, which is also known as VBS/Loveletter and Love Bug, and written in VBScript. It started in the Philippines on May 4, 2000, and spread across the whole world in one day, as most computers are connected with the Internet and email systems. It infected 10% of all computers connected to the Internet causing about 5.5 billion dollars in damage. The damage was mainly done due to getting rid of the virus and explaining the receiver that the sender didn't mean to say "I LOVE YOU". The Pentagon, CIA, and the British Parliament all had to shut down their E-mail systems to get rid of the virus. Elk Cloner was the one of the first microcomputer virus and also affects the boot sector of a storage disk. Thus it was able to erase data from the system files, and cause crashing of the computer.

Melissa is a famous worm which was first started on March 26, 1999. Melissa was spread through word processors Microsoft Word 97 and Word 2000. Then it started to mass-mail itself from the e-mail client Microsoft Outlook 97 or Outlook 98. It didn’t affect other versions of word processors or mail systems. As it spread through word documents, the document got corrupted and started to mass mail itself to other networks. At the same time it collected 50 other email ids and again started to mass mail.


Computer worms or viruses spread through vulnerabilities in network services, email, storage media such as pen drive etc. The system can best be protected against by keeping up-to-date and installing security patches provided by operating systems and application vendors.

Computer worms which spread through emails can best be defended against by not opening attachments in e-mail, especially .exe files and from unknown sources. Though the infected attachments are not limited to .EXE files; Microsoft Word and Excel files can contain macros which spread infection. Anti-virus and anti-spyware software must be used but they need to be kept up-to-date with new pattern files each time a new media is inserted in a system, it must be checked with antivirus software. Also while downloading a file from the internet; many other pop-ups appear which might have spyware. So it is advisable not to click or install such a toolbar, unless the user is sure about the working of the toolbar.


Share this comparison:

If you read this far, you should follow us:

"Computer Virus vs Computer Worm." Diffen.com. Diffen LLC, n.d. Web. 23 Sep 2016. < >