- Practice
- About 15 min
- 5 practice questions
Identifying malware from its behaviour: case practice
Name the type of malware from what it does and how it spread, and choose the right first response to each.
If something looks wrong, please tell us.
Malware questions give you symptoms and ask for a name, or give a name and ask for its behaviour. Two questions decide almost every case: how did it spread? and what does it do? Answer those two and the type follows.
The two-question grid
| Malware | How did it spread? | What does it do? |
|---|---|---|
| Virus | Attached to a file; a person opened or shared it | Damages or deletes files; spreads to other files |
| Worm | On its own through the network | Copies itself quickly, uses up resources |
| Trojan | User installed it, thinking it was useful | Opens a back door, steals data; does not copy itself |
| Ransomware | Phishing attachment, bad download or unpatched system | Encrypts or locks files and demands payment |
| Spyware | Hidden in other software or a malicious link | Secretly collects activity and data |
| Keylogger | As spyware | Records keystrokes |
| Adware | Bundled with free software | Floods the screen with adverts |
| Rootkit | Installed by other malware or an attacker | Hides itself and the attacker's access deep in the system |
| Bot / botnet | Any of the above routes | Device is remote-controlled, often used in DDoS attacks |
Worked example 1
Case: A clerk opens an email attachment called 'Invoice'. Soon a message fills the screen: 'Your files are encrypted. Pay to get the key.' Documents will not open. Working: what it does - encrypts and demands payment. Answer: ransomware. Response: disconnect the computer from the network at once so it cannot reach shared drives, inform the IT team, do not pay, and restore from an offline backup after the system is cleaned.
Worked example 2
Case: Several computers in a college lab become slow at the same time. Nobody opened any file; the network is jammed with traffic between the machines. Working: spread by itself across the network. Answer: worm. Response: isolate the affected computers, apply the missing security update that the worm exploits, and scan all machines.
Worked example 3
Case: Kiran installed a free 'battery saver' app from a link in a message. His phone works normally, but a friend tells him that someone logged in to his email from another city. Working: installed by the user because it looked useful, then gave the attacker access - Trojan; if it recorded his typing, it also acted as a keylogger. Response: uninstall the app, scan the phone, change passwords from a clean device, and turn on 2FA.
Traps to avoid
- 'A Trojan copies itself to other computers' - wrong; that is a worm or virus.
- 'A worm needs a user to open a file' - wrong; that describes a virus.
- 'Antivirus is a type of malware' - wrong; it is the defence.
- 'Paying the ransom guarantees your files back' - wrong; there is no guarantee, and paying encourages more attacks.
- 'Adware is harmless' - it is unwanted and can lead to more dangerous downloads.
First response for any infection
- Disconnect from the internet and the office network.
- Do not enter passwords or banking details on the affected device.
- Run a full scan with updated antivirus or anti-malware software.
- Change important passwords from a different, clean device.
- Restore lost files from a backup; report to the IT team or the organisation's security contact.
Ask two questions: how did it spread, and what does it do? Then isolate, scan, change passwords from a clean device, and restore from backup.
Key takeaways: the spread route separates virus (needs a user and a file), worm (spreads itself) and Trojan (installed by a fooled user). The action separates ransomware (locks and demands), spyware and keyloggers (watch and record) and adware (shows adverts). The first response is always to isolate the device.
Check your understanding
-
1. Computers on a network become infected one after another though no one opened any file. The malware is most likely a:
- Virus
- Trojan
- Worm
- Adware
Show answer
Answer: C. Spreading across a network by itself without user action is the defining behaviour of a worm.
-
2. Your screen shows a message demanding payment to unlock your encrypted files. What should you do first?
- Pay at once
- Disconnect the device from the network and inform IT
- Restart it repeatedly
- Email the attacker your password
Show answer
Answer: B. Disconnecting stops ransomware from reaching other machines and shared drives. Paying gives no guarantee.
-
3. Which statement about a Trojan is correct?
- It spreads by itself across networks
- It is a type of antivirus
- It only shows adverts
- It is disguised as useful software and does not copy itself
Show answer
Answer: D. A Trojan depends on a user installing it because it looks harmless or useful; it does not self-replicate.
-
4. Malware that hides itself and an attacker's access deep inside the operating system is a:
- Rootkit
- Firewall
- Patch
- Cookie
Show answer
Answer: A. A rootkit conceals itself and other malicious activity deep in the system.
-
5. After a suspected infection, from where should you change your important passwords?
- From the infected device, immediately
- From a public computer at a café
- From a different, clean device
- There is no need to change them
Show answer
Answer: C. If spyware or a keylogger is present, typing new passwords on the infected device could reveal them. Use a clean device.
Sign in to keep track of the lessons you finish.