- Foundation
- About 12 min
- 5 practice questions
Malware: viruses, worms, trojans and more
Tell apart the main kinds of malicious software and how each spreads or harms.
If something looks wrong, please tell us.
Many threats arrive as harmful programs. Exams ask you to match a description to the right name, so the differences matter.
Malware
Malware (malicious software) is any program designed to harm a computer or steal data.
| Type | How it behaves |
|---|---|
| Virus | Attaches itself to a file or program and spreads when that file is run or shared |
| Worm | Spreads by itself across networks without needing a host file |
| Trojan horse | Pretends to be useful software but hides harmful code; does not copy itself |
| Spyware | Secretly watches what you do and sends information away |
| Adware | Shows unwanted adverts |
| Ransomware | Locks or encrypts your files and demands payment to unlock them |
| Keylogger | Records what you type, such as passwords |
| Rootkit | Hides deep in the system so other malware stays unseen |
How malware gets in
- Email attachments and links.
- Downloads from untrusted sites and pirated software.
- Infected pen drives.
- Outdated software with known weaknesses.
Worked examples
Example 1. A free game installs fine but also steals saved passwords. It is a Trojan, since it looked useful but hid a harmful function.
Example 2. A program copies itself to every computer on the office network without any user action. This is a worm.
Example 3. All your documents suddenly become unreadable and a message asks for money. This is ransomware; the best protection is regular backups kept offline.
Virus needs a host, worm spreads alone, Trojan disguises itself, ransomware demands payment.
Key takeaways
- Virus, worm, Trojan, spyware, adware, ransomware and keylogger each have a distinct behaviour.
- Avoid untrusted downloads and attachments; keep backups.
Check your understanding
-
1. Which malware attaches itself to a file or program and spreads when that file is run or shared?
- Virus
- Worm
- Adware
- Rootkit
Show answer
Answer: A. A virus needs a host file; a worm spreads by itself without one.
-
2. Which malware locks or encrypts your files and demands payment to unlock them?
- Adware
- Keylogger
- Rootkit
- Ransomware
Show answer
Answer: D. Ransomware holds files to ransom by locking or encrypting them.
-
3. Software whose main behaviour is showing unwanted adverts is
- Ransomware
- Adware
- Worm
- Keylogger
Show answer
Answer: B. Adware shows unwanted advertisements.
-
4. Which malware hides deep in the system so that other malware stays unseen?
- Adware
- Rootkit
- Keylogger
- Ransomware
Show answer
Answer: B. A rootkit hides deep in the system to keep malware hidden.
-
5. Which of these is a common way for malware to get into a computer?
- Turning on a firewall
- Keeping software updated
- Keeping an offline backup
- An infected pen drive
Show answer
Answer: D. Infected pen drives, untrusted downloads, email attachments and outdated software let malware in; the other three are defences.
Sign in to keep track of the lessons you finish.