Cyber security: threats and defences
IGCSE Computer Science · The Internet and Its Uses
Attacks that target the person
Social engineering means manipulating people rather than breaking software — using fear, urgency or authority to make someone hand over information or click something.
- Phishing — a fake email or message pretending to be from a bank or service, containing a link to a fake site. The user must click the link and enter details;
- Pharming — malicious code installed on the user's computer or on a DNS server redirects them to a fake site. The user needs to do nothing wrong at all.
This pair is the most confused in the whole syllabus. The distinguishing test: does the user have to click anything? Phishing needs a click; pharming works even when the user types the correct address themselves.
That makes pharming far harder to defend against by being careful — which is exactly why it is examined.
Attacks that target the system
- Brute force attack — trying huge numbers of password combinations until one works. Defence: long, complex passwords and locking the account after several failed attempts;
- Data interception — capturing data as it travels, for example on unsecured wireless. Defence: encryption;
- Denial of service — flooding a server with so many requests that it cannot respond to genuine users. Note it does not steal data; it makes the service unavailable;
- Hacking — gaining unauthorised access to a system.
Malware
| virus | attaches itself to a file and replicates when that file is run |
| worm | self-replicates without attaching to a file and spreads across networks by itself |
| trojan | disguised as legitimate software, so the user installs it willingly |
| spyware | records what the user does, for example keystrokes, and sends it back |
| ransomware | encrypts the user's files and demands payment for the key |
| adware | floods the machine with unwanted advertising |
The virus / worm distinction is the one to get right: a virus needs a host file and a user to run it; a worm spreads on its own, which is why worms move so much faster.
Defences, and what each one actually does
- Firewall — monitors traffic between the network and the internet and blocks what does not meet its rules. It is a gatekeeper;
- Anti-malware software — scans for and removes malware already on the machine;
- Authentication — passwords, biometrics (fingerprint, face), and two-step verification, where a code is sent to a second device;
- Access levels — each user sees only the data their role needs, so one compromised account exposes less;
- Automatic software updates — close security holes as soon as they are found;
- SSL / TLS — encrypts data in transit;
- Proxy server — sits between user and internet, filtering requests and hiding the user's IP address;
- Checking a link before clicking — hovering to see the real address, and being suspicious of spelling errors and urgent tone.
Note carefully that a firewall does not remove malware. It controls what crosses the boundary; anything already inside is the job of anti-malware. Naming the wrong defence for a threat is a marked error.
Worked example: distinguishing phishing from pharming
Two users both lose their online banking login details. The first clicked a link in an email. The second typed the bank's correct address into the browser themselves. Identify the type of attack in each case, explain, and state the appropriate defence.
Solution
The first user — PHISHING.
The attacker sends an email impersonating the bank, often in an urgent tone: “your account will be locked within $24$ hours”.
The email contains a link to a fake site that looks identical to the real one. The user clicks it themselves and enters their username and password themselves, and that information is sent straight to the attacker.
The key point: this attack only succeeds when the user performs an action — clicking the link.
The second user — PHARMING.
This user did nothing wrong. They typed the bank's correct real address.
But malicious code had already been installed beforehand on their machine, or on a domain name server. That code altered the domain lookup, so when the browser asked “what is the bank's IP address?”, it received the address of the attacker's server.
The browser displays the fake site, and the address bar still shows the correct real domain — so the user has no reason to be suspicious.
How to tell them apart. Ask: “does the user have to click on anything?” Yes → phishing. No → pharming.
Defence for the first case.
- hover the mouse over the link to see the real address before clicking;
- watch for spelling mistakes and an urgent tone — two typical signs;
- never log in through a link in an email; type the bank's address yourself.
Defence for the second case — and this is the important difference.
Care cannot save the user here, because they did everything right. Technical measures are needed:
- anti-malware software to detect and remove code already installed on the machine;
- checking the security certificate — a fake site usually lacks a valid $\text{https}$ certificate, so the browser warns;
- automatic software updates to patch the vulnerabilities that let the malware in in the first place.
Worked example: matching the right defence to the right threat
For each of the following threats, state the most suitable defence and explain: (a) a brute-force password attack; (b) interception of data on a public wireless network; (c) ransomware that has encrypted the files on a machine. Then state why a firewall is not the answer to part (c).
Solution
(a) Brute-force password attack → a STRONG PASSWORD with ACCOUNT LOCKOUT.
How the attack works. The attacker uses software to try a huge number of combinations until one hits.
Why a long password helps. Each extra character increases the number of combinations to try exponentially. A password that is long enough and contains uppercase letters, lowercase letters, digits and special characters would take so long to crack that it is infeasible.
An even stronger measure: lock the account after a few wrong attempts. It stops the attack even if the password is weak, because the attacker cannot try many times.
(b) Interception of data on a public wireless network → ENCRYPTION.
How the attack works. On an unsecured wireless network, the attacker can capture the packets travelling through the air.
Why encryption is the right answer. We cannot prevent packets being captured — radio waves spread in every direction. But if the data has been encrypted with $\text{SSL/TLS}$, whoever captures it only gets meaningless ciphertext.
This is exactly what encryption does: it does not prevent the taking, it makes what is taken useless.
(c) Ransomware that has encrypted files → ANTI-MALWARE SOFTWARE, and more importantly a BACKUP.
Anti-malware software scans for and removes malware already on the machine.
But removing the malware does not decrypt the files. That is why the most important measure here is having a backup available — the victim restores the data from the backup and does not have to pay the ransom.
Why a firewall is not the answer to (c).
A firewall is a gatekeeper: it monitors traffic crossing the boundary between the internal network and the Internet, and blocks whatever does not satisfy its rules.
But in situation (c), the malware is already inside. The gate has already been passed — perhaps because the user downloaded an attachment themselves.
A firewall cannot scan or remove anything already on the machine. That is the job of anti-malware software.
General principle: a firewall deals with what is coming in; anti-malware software deals with what is already in. Assigning the wrong defence to a threat is an error that loses marks.