What’s the Difference Between a “Trojan Horse”, a “Worm”, and a “Virus”?

There’s no shortage of confusing terminology in the computer biz. With the advent of malicious software, more terminology has been created that only make things less clear.

The good news is that it’s not really that difficult; in fact, you needn’t understand most of the details (besides, not everyone agrees on the exact meaning of each definition).

Let’s run down a few terms.

Malware

The most important term to know is malware, which is short for malicious software.

The name says it all: malware is any software that has malicious intent — destroy data, send spam, hold your data for ransom, steal your information — it doesn’t matter. It’s all malicious, it’s all software; thus, it’s all malware.

You’ll find malware used as a catch-all term for all flavors and varieties of software that intend some kind of harm.

Virus

In the human body, a virus is an organism that replicates, or makes copies of, itself and overwhelms the body’s defenses, making it sick.

When applied to computers, the term “virus” is very similar.

  • A computer virus replicates itself in some way so as to spread within the computer, usually injecting itself into other programs within the computer.
  • A computer virus makes the infected computer “sick”. In the computer sense, “sick” can mean poor performance, crashes, lost files and data, or more.

Very technically, the term virus does not necessarily imply that a piece of malicious software will replicate itself to other systems. In general use, it’s assumed.

Spyware

Spyware is a type of malicious software intended not to do damage, but to collect information, or “spy”, on you. Spyware might monitor and report back on your browsing habits and the programs you run, or access and send other information stored on your machine. One canonical form of spyware is the keystroke logger, which, as its name implies, records your keystrokes (and often more) and uploads this information to a third party.

Worm

A worm is a program that replicates itself to other computers. It does so by infecting media, such as USB drives, that make contact with multiple systems, transmitting itself over a network somehow, or otherwise copying itself from one computer to another.

Very technically, again, the term worm does not necessarily imply malicious intent or behavior, other than the replication. In practice, malicious intent is generally assumed.

Trojan Horse

A Trojan horse — often just a “trojan” — is a program that claims to be one thing but is, in fact, another. It uses that deception to gain access to a system that would not be given, were the true intent known.

A trojan horse is not a virus per se, but it may carry them. For example, there are trojans that claim to be patches for various problems, but instead (or in addition) install malware. Software obtained from many download sites is often a type of trojan, using the promise of the software that is desired to install additional malicious software that is not.

Phishing

I think of phishing as a kind of email-based trojan horse. It’s email that looks like it comes from some official site, such as your bank, PayPal, or eBay, but actually comes from someone pretending to be them. They typically use some technique to fool you into thinking they are an official site of some sort, so you hand over sensitive information, like your username and password. Once you do so, they steal your other information, often leading to hacked accounts, identity theft, or worse.

Regardless of the terms used, protect yourself

The terms are important, but they’re less important than being aware that malicious software — malware — exists, and taking the steps you need to take to keep yourself safe.

We shouldn’t have to, of course. Hackers shouldn’t exist, and operating systems and other software should be designed to perfectly protect us. The pragmatic reality, however, is that it remains our responsibility to keep our guard up.

What does that mean? As outlined in what I consider my most important article — Internet Safety: 7 Steps to Keeping Your Computer Safe on the Internet — it all boils down to using common sense, keeping your software as up-to-date as possible, and running up-to-date anti-malware tools regularly.