- Practice
- About 12 min
- 5 practice questions
Malware: viruses, worms, trojans and more
Tell the common types of malware apart by how they spread and what they do.
If something looks wrong, please tell us.
Malware is any software built to harm a computer, steal data or disturb work. Exams give a behaviour and ask the matching malware, so memorise each type by its signature behaviour.
Types of malware
| Type | Behaviour |
|---|---|
| Virus | Attaches 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 carries a harmful hidden function; does not copy itself |
| Spyware | Secretly watches activity and collects information |
| Ransomware | Locks or encrypts files and demands payment to restore them |
| Adware | Shows unwanted advertisements |
| Keylogger | Records what is typed |
Worked examples
Example 1. A harmful program spreads from computer to computer over a network on its own. Which type? A worm.
Example 2. A free game secretly gives an attacker access to your computer. Which type? A trojan, because it looks useful while hiding a harmful function.
Virus needs a host file. Worm spreads alone. Trojan pretends to be useful. Ransomware demands payment.
Key takeaways: link each malware to its behaviour, and remember that a virus needs a host while a worm does not.
Check your understanding
-
1. Malware that spreads by itself across networks without needing a host file is a
- Virus
- Worm
- Trojan horse
- Adware
Show answer
Answer: B. A worm spreads alone; a virus needs a host file.
-
2. Malware that records what is typed, such as passwords, is a
- Adware
- Worm
- Ransomware
- Keylogger
Show answer
Answer: D. A keylogger records keystrokes.
-
3. Which malware pretends to be useful software, carries a hidden harmful function and does not copy itself?
- Trojan horse
- Computer worm
- Computer virus
- Adware program
Show answer
Answer: A. A Trojan disguises itself as useful software and does not replicate.
-
4. Which malware secretly watches your activity and collects information?
- Adware
- Ransomware
- Spyware
- Worm
Show answer
Answer: C. Spyware secretly watches activity and collects information.
-
5. What does a virus need in order to spread that a worm does not?
- An internet connection
- A payment from the user
- A host file or program
- A second keyboard
Show answer
Answer: C. A virus attaches to a file or program and spreads when it is run or shared; a worm needs no host file.
Sign in to keep track of the lessons you finish.