Virus vs. Worm: What's The Difference?

Understanding the difference will help you protect yourself

Image of a virus spelled out on a keyboard

Image Source\Getty Images 

Do know the difference between a virus vs worm? Before you can fully protect yourself from these forms of malware, it's important to know the difference.

It's important to understand that both viruses and worms are a form of malware. Malware is a term used for all types of software that can infect and adversely effect computer systems. A worm is actually a type of virus, but it behaves differently than a standard virus.

Virus Vs. Worm: Understanding the Difference

The main difference between a standard virus and a computer worm is how the software replicates to additional computers.

A computer virus is an application that needs to be downloaded or otherwise transferred onto the host computer before the infection can take place. Usually this also requires executing the program before the infection can actually happen.

Image of a computer virus being detected
cnythzl\Getty Images

The most common source of computer viruses like this include:

  • Clicking on an email attachment, downloading the file, and opening it.
  • Downloading and running files from a malicious web page or FTP link.
  • Running a file received in a random IM from a stranger.
  • Streaming and opening files from a peer-to-peer tool like Torrent.
  • Clicking a malicious social media ad and downloading a host file.

In all these cases, the infection only occurs when you open the file. This makes standard viruses far less dangerous than a computer worm.

What Is a Computer Worm?

A computer worm is especially dangerous, because it doesn't require any action from the user to infect a system.

A computer worm is an application that accesses a computer over a network. That network could be an internal corporate network, or over the internet. It doesn't require the user to download or open any host application.

Image of a computer virus
 bluebay2014\Getty Images

The most common method computer worms use to infect computers include:

  • Connecting to a network that has an infected computer, with a computer that has minimum security settings.
  • Sharing a drive or folder to a network or the internet without any security permissions.
  • Connecting to a peer-to-peer network with P2P software that doesn't have appropriate security protection.
  • Connecting to any network with a computer that isn't properly updated with the latest security patches.

A computer worm typically takes advantage of computers on a network that are running outdated operating systems, antivirus software that hasn't been updated, or have open ports or network protocols (like SMB network shares) that are unpatched.

Image of a hacker
 Vasily Pindyurin\Getty Images

The source of worm infections are other computers on the internet or a network. Worms constantly scan all devices connected to a network to identify a vulnerable system. It then invades the system using the following steps.

  1. It accesses the drive or folder that lacks security protections.
  2. It installs a "backdoor" code, usually inside the system folder where a user will have difficulty locating it.
  3. The backdoor code downloads the rest of the worm code and executes itself on the system.

A computer worm can sometimes run in the background on a computer without the user ever realizing it's there. Such computers are called "bots", since they're like robots that do the bidding of remote hackers.

Both viruses and worms are extremely dangerous. At best, they can destroy your computer performance. At worst, they can spy on your computer activities, capture images from your webcam, turn your computer into a relay for spammers to send spam emails, or even completely destroy your system files and make your computer unusable.

How to Protect Yourself From a Virus or Worm

Protecting yourself from a standard virus is much easier than preventing a computer worm infection.

Most importantly, follow all guidelines for safe computing. This means not clicking on attachments in emails, not downloading free software from unknown sources, and not using peer-to-peer file sharing networks.

The following steps will protect you from both viruses and worms.

  1. If you aren't already running antivirus software, there are plenty of high quality free antivirus programs to choose from. Install one, make sure the virus definitions are updated, and run a full system scan. If you already have a virus or a worm, this will identify it and remove it from your system.

    Screenshot of running a full antivirus scan
  2. Removing the virus is important, but keeping new viruses from infecting your system is just as important. Go into the settings of your antivirus software and make sure that all security protections that are available in the free version are enabled.

    Screenshot of enabling antivirus components
  3. The primary method computer worms use to infect computers is through open ports. This is why it's a good ideal to run a port scan tool on your computer to identify any ports that are open that you might be unaware of. DNSTools offers an online scanner you can run on your computer to check for open ports. If you find any open ports and don't have any software that needs those ports open, then you should close them to protect your system.

    Screenshot of running a port scan
  4. To close individual ports:

    1. Select the Start menu, type Windows Firewall, and select Windows Defender Firewall.
    2. Select Advanced Settings from the left menu, and select New Rule on the Advanced Security window.
    3. In the Rule Wizard, select Port, then select Ports, and type the port number in the Specific local ports field.
    4. Select Next and then select Block the connection.
    5. Complete the Wizard to close that port.
    Screenshot of blocking a port in Windows Defender firewall
  5. Another security vulnerability that can let computer worms get into your home network from the internet is when any port forwarding is enabled in your router. To check this, log into your home router as an administrator. Port forwarding is usually under the Advanced menu. If you see any port forwarding enabled, it's a good idea to disable it unless it's absolutely necessary for software on your network to work.

    Screenshot of port forwarding in a router

The only protection from a computer worm is blocking it from accessing your network in the first place. And if you're connecting to a public network, your only protection from other infected computers is running good security software and enabling your Windows firewall so that no computer work can make it's way onto your system.