Computer Networking › Section A · Computer networks and the internet › Topic A.6

Networks under attack

The features that make the internet useful, open access, shared links and packets that anyone can send, also make it a target. This topic surveys the main ways networks are attacked and the ideas behind the defences, which Section H develops in full.

A network designed for trust

The internet's original designers built it for a small community of researchers who trusted one another. Its protocols assumed honest users: any host could send any packet to any other, and nothing checked whether a packet's claimed source was true. Today billions of devices, banks, hospitals and power grids depend on that same design, and some users are hostile. Network security studies how attackers exploit networks and how to defend them, ideally with designs that resist attacks from the start. The Computer Science topic Cybersecurity: attacks and defences introduces the general vocabulary; this topic looks at attacks through the lens of how networks work.

Malware arriving over the network

Malicious software, or malware, reaches hosts along with the useful data people download, open and run. Once inside, it can delete files, steal passwords and keystrokes, or encrypt data for ransom. Much malware is self-replicating: from each infected host it tries to reach more hosts over the network, so its spread can grow exponentially. Worms do this with no help from users. Infected hosts are often quietly enrolled in a botnet, a network of compromised devices that the attacker controls remotely and uses for spam or for flooding attacks. Cheap internet-of-things devices with unchanged default passwords are favourite recruits: in 2016 the Mirai botnet, built largely from cameras and home routers, disrupted major websites.

Denial of service

A denial-of-service (DoS) attack makes a network, host or service unusable for legitimate users, an attack on availability. There are three broad kinds. A vulnerability attack sends a few carefully crafted messages to a program or operating system with a known flaw, causing it to stop or crash. A bandwidth flood pours in enough packets to fill the target's access link, so legitimate packets queue and are dropped before they reach the server. A connection flood opens a huge number of half-open or idle connections, using up the memory and connection slots the server needs for real clients.

Why distributed attacks are harder to stop

One attacking host rarely has enough capacity to flood a well-connected server: a host with a 100 Mbps uplink can send only a hundredth of what a 10 Gbps link carries. In a distributed denial-of-service (DDoS) attack, the attacker directs thousands or millions of botnet devices at once, and their combined traffic can exceed the capacity of the target's link and even of its ISP. Distribution also makes defence harder. Blocking one source address achieves little when there are thousands, and each attacking device may send traffic that looks like an ordinary request. The traffic intensity idea from the topic Delay, loss, and throughput explains the damage.

Worked example: sizing a flood

A botnet of 20,000 devices each sends 2 Mbps towards a server with a 10 Gbps access link, while legitimate users send 1 Gbps. Assume the router drops excess packets in proportion to their share of arrivals. 1. Attack traffic: \(20{,}000 \times 2 \times 10^6 = 4 \times 10^{10}\) bit/s, or 40 Gbps. 2. Total arriving: 41 Gbps, so the traffic intensity on the link is \(41 \div 10 = 4.1\). 3. Legitimate share of what gets through: \(1 \div 41 \approx 2.4\%\). 4. Legitimate throughput: \(10 \times \frac{1}{41} \approx 0.24\) Gbps, so about three-quarters of real requests are lost. Check: \(0.24 \div 1 \approx 24\%\) delivered, \(76\%\) dropped.

Defending against floods

Because a flood fills the target's own access link, filtering at the target is too late: the damage happens upstream. Defences therefore work nearer the sources or spread the load. ISPs can filter or rate-limit attack traffic before it converges on the victim. Large content and security providers absorb floods across many data centres, often by advertising one address from many locations so that traffic lands at the nearest site and is cleaned there. Servers can be built to cope with connection floods, for example by not reserving memory until a client proves it is real. Patching removes the flaws that vulnerability attacks need. No single measure is enough; operators combine them.

Packet sniffing

A packet sniffer quietly listens on a link and keeps a copy of each packet that goes by. Wireless links are especially exposed, since anyone within radio range can receive the signals; shared wired media, such as a cable segment that carries every home's downstream traffic, are exposed too. Once captured, unencrypted packets can be read at leisure for passwords, messages and personal data. Because a sniffer transmits nothing, it is very hard to detect. The main defence is therefore not to stop the capture but to make it useless: encrypt the data, so that a copied packet reveals nothing readable. The topic Securing TCP connections: TLS shows how.

Masquerading: IP spoofing

It is easy to build a packet with a false source address and send it into the internet. This is IP spoofing. A router forwards a datagram using only its destination address, so the forged source is never checked along the way, and the receiver may act on a command it believes came from a trusted host. Spoofing also hides the origin of floods. Two defences help. End-point authentication lets a receiver verify who really sent a message, using cryptography covered in Section H. Ingress filtering, described in RFC 2827 (also called BCP 38), has each network drop outgoing packets whose source addresses do not belong to it.

Worked example: classifying incidents

Name each attack and the defence idea that fits. 1. A café visitor's laptop silently records every Wi-Fi packet nearby: packet sniffing; defence, encrypt traffic so captures are unreadable. 2. A web server stops answering after one malformed message triggers a known bug: a vulnerability DoS attack; defence, patch the software. 3. A shop's link is saturated by traffic from 50,000 home cameras: a DDoS bandwidth flood from a botnet; defence, upstream filtering and absorption across many sites. 4. A server accepts a shutdown command because the packet claims an administrator's address: IP spoofing; defence, authenticate the sender rather than trusting the source field. Check: each answer names both the mechanism and why its defence works.

Common mistakes to avoid

First, thinking a firewall at the server stops a bandwidth flood; by then the access link is already full. Second, assuming encryption prevents sniffing; it lets packets be captured but makes them unreadable. Third, believing a packet's source address proves who sent it. Fourth, calling every DoS attack a flood; a vulnerability attack may need only a few packets. Fifth, picturing a botnet as the attacker's own machines; it is usually other people's compromised devices. Sixth, thinking security can be added later; the internet's trusting design shows how hard retrofitting is.

Key takeaways

The internet was designed for mutually trusting users, so its basic protocols do not verify senders. Malware arrives over the network, often spreads by itself, and recruits hosts into botnets. Denial-of-service attacks hit availability through vulnerability attacks, bandwidth floods or connection floods; DDoS attacks from botnets combine thousands of sources, so filtering at the victim is too late and defences work upstream or spread the load. Packet sniffers passively copy traffic, especially on wireless and shared media, and encryption is the defence. IP spoofing forges source addresses; end-point authentication and ingress filtering counter it. Section H covers the cryptography behind these defences.

Flashcards

Flashcard

Trusting design

Original internet protocols assumed honest users

Nothing checks a packet's source.

Test your understanding

Question 1 of 5

A server's 10 Gbps access link receives 30 Gbps of attack traffic and 2 Gbps of legitimate traffic. If excess packets are dropped in proportion to arrivals, about how much legitimate traffic gets through?

Question 2 of 5

A web server crashes after receiving just a handful of specially formed packets that trigger a known software flaw. Which kind of DoS attack is this?

Question 3 of 5

Why does a firewall on the victim's own server do little against a large bandwidth flood?

Question 4 of 5

Someone in a café captures every Wi-Fi packet within range. What best protects users' data?

Question 5 of 5

Which statement about IP spoofing is correct?

← Previous topicNext topic →