GCSE Computer Science
Malware, phishing and SQL injection, compared
Last updated October 2026
Malware attacks a computer, phishing attacks the person using it, and SQL injection attacks a website's database. Different targets mean different defences, and that split is what most exam questions are really testing.
The three threats, side by side
- Malware is harmful software that ends up on your device. It's an umbrella term covering viruses, worms, trojans, ransomware and spyware.
- Phishing is a trick, not a program. An email or text pretends to be from a bank or a delivery firm and steers you to a fake site to hand over your password or card details.
- SQL injection is an attacker typing database code into an ordinary input box, like a login form. If the site doesn't check the input, the database runs it, and the attacker may read or change data they shouldn't see.
Malware types you must tell apart
- Virus: attaches itself to a file and spreads when the file is opened.
- Worm: spreads by itself across a network, with no one needing to open anything.
- Trojan: looks like useful software, but hides something harmful inside.
- Ransomware: encrypts your files, then demands payment for the key.
- Spyware: secretly records what you do, such as keystrokes, and sends it to the attacker.
How to stop each one
Match the defence to the threat, and you'll pick up the marks:
- Malware: anti-malware software, a firewall, regular updates, and not installing things from untrusted sources.
- Phishing: user training. Check the sender's address, be suspicious of urgency, and don't click links you didn't expect. Software helps a bit, but the weak point is human.
- SQL injection: validate and sanitise everything a user types before it reaches the database.
A frequent slip is suggesting a firewall for phishing. A firewall filters network traffic. It can't stop you choosing to type your password into a fake page.
Security terms are easy to mix up the night before an exam. They stay put better when you're tested on them over several weeks, which is why we built the games this way, and why our free GCSE revision games bring back the ones you miss.
Questions students actually ask
Is a virus the same as malware? No. A virus is one kind of malware. All viruses are malware, but not all malware is a virus.
Is phishing a type of malware? No. Phishing is social engineering: it works on people, not on software. A phishing email can, however, link to a download that contains malware.
THE REVISION