Main malware families
| Type | How it spreads or works | Remember it as |
| Virus | Attaches itself to a file or program and spreads when that file is run or shared | Needs a host file and usually a user action |
| Worm | Copies itself across networks on its own, exploiting flaws, without needing a host file | Self-spreading |
| Trojan | Pretends to be useful software but hides a harmful function | Disguise |
| Spyware and keyloggers | Secretly record activity or keystrokes, such as passwords | Silent watcher |
| Ransomware | Encrypts (locks) files and demands payment for the key; many gangs also threaten to leak copied data | Digital kidnapping |
| Botnet malware | Turns infected devices into a network of 'bots' controlled remotely | Zombie army |
Virus needs a host, worm spreads itself, trojan wears a disguise, ransomware locks and extorts, DDoS floods, SQL injection smuggles commands through input boxes.
- Malware is any harmful software; its families differ in how they spread and what they do.
- DDoS attacks use many devices, often a botnet, to block access.
- SQL injection exploits websites that do not check user input.
- A zero-day has no patch yet; known flaws are closed by updating.