A levels Computer Science · Networks and databases
Network security
1Threats to networks
A network faces threats from outside attackers, from careless or dishonest insiders, and from software flaws.
| Threat | What it does |
|---|---|
| phishing | fake emails or websites trick people into giving passwords or bank details |
| brute-force attack | software tries huge numbers of passwords until one works |
| denial of service (DoS) | floods a server with requests so real users cannot reach it; a distributed DoS (DDoS) uses thousands of infected computers |
| SQL injection | malicious SQL typed into a web form runs on the database |
| interception | data is captured as it travels, for example on public Wi-Fi |
| insider threat | a trusted user misuses their access |
Check yourself
What is a distributed denial-of-service attack?
Show the answer
Many infected computers flood a server with requests so it cannot serve real users
Many sources, one target.
2Malware
Malware is malicious software.
| Type | How it spreads or acts |
|---|---|
| virus | attaches itself to a program or file; spreads when the infected file is run and copied |
| worm | a standalone program that copies itself across networks by itself, using security holes |
| Trojan | pretends to be useful software, but carries a harmful payload; does not copy itself |
| ransomware | encrypts the victim's files and demands payment for the key |
| spyware | secretly records activity, such as key presses, and sends it to the attacker |
Worms can spread far faster than viruses because they need no user action.
Check yourself
What is the key difference between a virus and a worm?
Show the answer
A worm spreads by itself across a network; a virus needs an infected file to be run
Self-replicating standalone.
3Firewalls and proxy servers
A firewall sits between a network and the outside world and checks traffic against rules.
A firewall between the internet and a private network. Packets that match an allow rule pass; the rest are dropped.
- Packet filtering checks each packet's source and destination IP addresses, protocol and port number, and blocks those not allowed (for example, blocking port 23 used by insecure Telnet).
- Stateful inspection also remembers open connections, so it only lets in replies to requests that came from inside.
- A proxy server makes requests on behalf of the computers inside the network, so outside servers see only the proxy's IP address. It can also filter websites and cache popular pages.
Check yourself
How does packet filtering decide whether to block a packet?
Show the answer
By checking it against rules on IP addresses, protocols and port numbers
Header rules.
4Authentication and encryption
Authentication checks that users are who they claim to be:
- passwords: should be long, not reused, and stored only as salted hashes;
- two-factor authentication (2FA): something you know (password) plus something you have (a code on your phone) or are (fingerprint);
- biometrics: fingerprints, face or iris recognition.
Access rights limit what each user can do: a student may read shared files but not change the system settings.
Encryption protects data in transit (HTTPS, WPA3 Wi-Fi, VPNs) and at rest (encrypted drives), so intercepted or stolen data cannot be read.
Check yourself
Why does two-factor authentication improve security?
Show the answer
A stolen password alone is not enough to log in
Two different factors.
5Preventing attacks
| Measure | Protects against |
|---|---|
| installing security patches promptly | attacks that use known software flaws (such as worms) |
| antivirus software | known malware, found by its signature or behaviour |
| input validation and parameterised queries | SQL injection |
| penetration testing | finding weaknesses before attackers do, by authorised simulated attacks |
| regular backups (kept off the network) | ransomware and data loss |
| account lockout after failed attempts | brute-force attacks |
SQL injection
- A login form builds the query: SELECT * FROM Users WHERE name = 'input'.
- An attacker types: ' OR '1'='1.
- The query becomes SELECT * FROM Users WHERE name = '' OR '1'='1', which is true for every row.
- Prevention: use parameterised queries, so the input is treated as data and never as SQL code.
Check yourself
What stops SQL injection most effectively?
Show the answer
Parameterised queries that treat input only as data
Never run input as code.
6People and policies
Many attacks target people rather than technology: this is social engineering. Examples include phishing, phone calls pretending to be IT support, and leaving infected USB sticks in a car park.
Organisations reduce the risk with:
- staff training to spot phishing and report suspicious messages;
- an acceptable use policy setting out what users may and may not do;
- the principle of least privilege: each user gets only the access they need;
- a disaster recovery plan: backups, and steps to restore systems after an attack.
Check yourself
What is the principle of least privilege?
Show the answer
Each user is given only the access they need for their job
Limit the damage.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera