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.

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

Malware

virusattaches itself to a file and replicates when that file is run
wormself-replicates without attaching to a file and spreads across networks by itself
trojandisguised as legitimate software, so the user installs it willingly
spywarerecords what the user does, for example keystrokes, and sends it back
ransomwareencrypts the user's files and demands payment for the key
adwarefloods 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

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.

The distinguishing question: DOES THE USER HAVE TO CLICK? PHISHING 1. receives an email faking a bank 2. the user CLICKS the link 3. reaches a fake site, enters details themselves preventable with CARE PHARMING 1. malicious code already installed 2. the user TYPES the correct real address 3. still REDIRECTED to a fake site care CANNOT save you Both lead the victim to the SAME fake site — they differ in HOW they get there. Because pharming needs the user to do nothing wrong, it must be defended against with ANTI-MALWARE SOFTWARE and checking for HTTPS certificates, not by vigilance.
The only difference is how the victim reaches the fake site. But it determines how to defend: care can stop the first, but cannot stop the second.

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.

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:

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.

Common mistake

Mixing up phishing and pharming. Both lead the victim to the same kind of fake site to harvest login details, so they look identical in outcome. The difference lies in how the victim gets there. Phishing needs the user to click a link in a fake email themselves. Pharming does not — malicious code has already altered the domain lookup beforehand, so a user who types the correct real address is still taken to the fake site, and the address bar still shows the correct domain. The test: ask “does the user have to click on anything?” The consequence is very practical: care can stop the first but cannot save you at all from the second, which must be defended against with anti-malware software and checking security certificates. The accompanying trap: saying a firewall destroys malware. A firewall is a gatekeeper that filters traffic crossing the boundary; what is already inside is the job of anti-malware software.

Key takeaway

Phishing needs a click; pharming does not — so care only stops the first. A denial of service attack makes a service stop working but does not steal data. A virus needs a host file and needs someone to run it; a worm replicates itself so it spreads far faster. A firewall filters what crosses the boundary; anti-malware software removes what is already inside — assigning the wrong defence loses marks. And with ransomware, what saves the data is a backup.

← How the web works · All IGCSE Computer Science lessons · Practice IGCSE Computer Science questions (free, instant scoring) · Sensors, monitoring and control →