You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Network attacks exploit weaknesses in computer networks, communication protocols and web applications. This lesson covers four key attack types required by the GCSE Computer Science specification: denial-of-service (DoS/DDoS), man-in-the-middle, brute force and SQL injection.
A denial-of-service (DoS) attack aims to make a computer, server or network resource unavailable to its intended users. The attacker floods the target with so many requests that it cannot respond to legitimate traffic.
A DDoS attack uses many compromised computers (called a botnet) to flood the target simultaneously. Because the attack comes from thousands of different IP addresses, it is much harder to block.
| Feature | DoS | DDoS |
|---|---|---|
| Source | Single computer | Many computers (botnet) |
| Scale | Limited by one machine's bandwidth | Massive — potentially millions of requests per second |
| Difficulty to block | Easier (block one IP) | Harder (thousands of different IPs) |
| Detection | Simpler pattern | Traffic appears to come from legitimate sources worldwide |
In a man-in-the-middle attack, the attacker secretly intercepts and potentially alters communication between two parties who believe they are communicating directly with each other.
| Technique | Description |
|---|---|
| Wi-Fi eavesdropping | The attacker sets up a rogue Wi-Fi hotspot (e.g. "Free_Coffee_WiFi") and intercepts all traffic from users who connect |
| ARP spoofing | The attacker sends fake ARP messages to link their MAC address with a legitimate IP address on the local network |
| SSL stripping | The attacker downgrades an HTTPS connection to HTTP, removing encryption so data can be read in plaintext |
A brute force attack systematically tries every possible combination of characters until the correct password is found. It is the simplest form of password cracking — but it can be very effective against weak passwords.
The attacker uses automated software to try passwords in sequence:
The time required depends on password length, character set and computing power:
| Password | Character Set | Combinations | Estimated Time |
|---|---|---|---|
| 4 lowercase letters | 26 | 456,976 | Less than 1 second |
| 6 mixed case + numbers | 62 | 56.8 billion | Hours |
| 10 mixed + symbols | 95 | 59.9 quintillion | Thousands of years |
A dictionary attack is a variation that tries common words and known passwords (e.g. "password", "123456", "qwerty") rather than every possible combination. It is faster than pure brute force because it targets likely passwords first.
A rainbow table is a precomputed lookup table mapping password hashes to their original plaintext values. If an attacker obtains a database of hashed passwords, they can look up the hashes in the rainbow table to find the original passwords — without needing to crack each one individually.
| Defence | How It Works |
|---|---|
| Strong passwords | Longer passwords with mixed characters exponentially increase cracking time |
| Account lockout | Lock the account after a set number of failed attempts (e.g. 5) |
| Rate limiting | Introduce a delay between login attempts |
| CAPTCHA | Require human interaction to prevent automated attempts |
| Two-factor authentication | Even if the password is guessed, a second factor is needed |
| Salted hashing | Adding a random salt before hashing defeats rainbow table attacks |
SQL injection is an attack that inserts malicious SQL code into input fields on a website to manipulate the underlying database. It exploits applications that do not properly validate user input.
Consider a simple login form where the website builds an SQL query from user input:
SELECT * FROM users WHERE username = '[input]' AND password = '[input]'
An attacker enters the following as the username: ' OR 1=1 --
The query becomes:
SELECT * FROM users WHERE username = '' OR 1=1 --' AND password = ''
OR 1=1 is always true, so the query returns all rows-- comments out the rest of the query (including the password check)The TalkTalk data breach was caused by SQL injection. Attackers stole personal details of approximately 157,000 customers. TalkTalk was fined £400,000 by the ICO — the largest fine at that time.
| Defence | How It Works |
|---|---|
| Parameterised queries (prepared statements) | Separate the SQL code from user input so input is treated as data, not code |
| Input validation | Check that input matches expected formats (e.g. reject special characters in a username field) |
| Input sanitisation | Escape special characters that could be interpreted as SQL |
| Least privilege database accounts | The web application connects with limited permissions, reducing what an attacker can do |
| Web Application Firewall (WAF) | Filters incoming requests for known attack patterns |
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.