Sub topic 5
Malware types: viruses, worms, trojans, ransomware, and spyware
This chapter assumes you know basic Windows file and process concepts and the CIA triad from the fundamentals chapter. The A+ exam usually describes symptoms and asks you to name the malware type, so focus on how each type spreads and what it does.
The working model
Malware is software written to harm a system or its data, or to steal from it. Each type is defined by two things: how it gets onto a machine and what it does once there.
| Type | How it spreads | Typical behavior |
|---|---|---|
| Virus | Attaches to a file and runs when the user opens it | Corrupts files, replicates into other files |
| Worm | Spreads on its own across a network | Consumes bandwidth, drops other malware |
| Trojan | Disguised as useful software; the user installs it | Opens a backdoor, steals data |
| Ransomware | Phishing, trojans, or exploits | Encrypts files, demands payment |
| Spyware | Bundled with software or dropped by a trojan | Logs activity, captures keystrokes |
Distinguishing the types
The key difference between a virus and a worm is user action. A virus needs someone to run the infected file. A worm needs no one. A sudden network slowdown across many machines points to a worm.
A trojan does not replicate. It relies on the user trusting it, such as a "free PDF converter" that also installs a remote access tool. Remote access trojans (RATs) give an attacker control of the machine.
Ransomware attacks availability. Files become unreadable until the victim pays for the key. The best defense is a tested backup stored offline, since paying does not guarantee recovery.
Spyware attacks confidentiality. A keylogger is a common form. It records keystrokes to capture passwords. Slow performance, unexpected toolbars, and changed browser home pages are common signs.
Related threats to recognize
- Rootkit: Hides malware by modifying the operating system, often at a low level. Standard scans can miss it, so removal may need a bootable scanning tool.
- Botnet: A group of infected machines controlled remotely, often used for denial of service attacks.
- Cryptominer: Uses your CPU or GPU to mine cryptocurrency. High CPU use and overheating are the symptoms.
- Fileless malware: Runs in memory using built-in tools such as PowerShell, so it leaves few files to scan.
Common errors
- Calling any malware a "virus." The exam separates the types by spread and behavior.
- Confusing a worm with a trojan. Ask whether the user had to install or open something.
- Assuming antivirus alone is enough. Signature-based scanning misses new threats, so patching and user training also matter.
Exercise
Users report that several PCs on one subnet became slow at the same time. A scan shows the same unknown process on each, and no one opened an attachment. Which malware type is most likely, and why?
Show answer
A worm. It spread across the network without user action, which a virus or trojan would not do.
Exercise
A user installs a free screen saver. Afterward, the browser home page changes and ads appear. The screen saver also installed a program that records typed text. Name the two malware types involved.
Show answer
The screen saver is a trojan, because it was disguised as useful software. The program that records keystrokes is spyware, specifically a keylogger.