A warehouse gate opens when a handheld remote sends it a signed unlock message. A thief records one such message, plays it back the next night, and the gate opens.
Network attacks by name, and what stops each
Most attacks on a network do one of three things: they stop it working, they listen to it, or they lie to it. Each well-known attack has a name, works at a particular layer and abuses a particular trusting habit of a protocol. No background is assumed beyond the earlier network units. A security manager is expected to recognise an attack from its description and to choose the control that removes the habit it abuses.
By the end of this unit you will be able to:
- Sort a network attack by its aim: denial of service, eavesdropping or deception
- Explain how a SYN flood, smurf, fraggle, amplification, ping of death, teardrop and land attack each work
- Tell apart man in the middle, session hijacking, replay and eavesdropping
- Place each named attack at the layer it abuses
- Choose the countermeasure that matches each attack
The online shop that went quiet on its busiest evening
An illustrative example
A small online shop sells concert tickets. On the evening a popular tour goes on sale, the website stops answering. The shop's own server is barely busy, and its log shows almost no new orders.
The hosting company reports that the shop's internet link is full. It is carrying a vast stream of replies to questions the shop never asked, sent by thousands of servers around the world, most of them name servers and time servers.
Why would thousands of innocent servers send the shop answers to questions it never asked?
Every network attack aims to stop, to listen or to lie
Network attacks fall into three families, each aimed at one of the security properties.
| Aim | Property attacked | Examples |
|---|---|---|
| Stop the network working | Floods, malformed | |
| Listen to the traffic | Eavesdropping, sniffing | |
| Lie to the network or to a user | and | Spoofing, poisoning, man in the middle, hijacking, replay |
A denial-of-service (DoS) attack stops authorised users from reaching a service or slows it so much that it is useless. A distributed denial-of-service (DDoS) attack does the same from many sources at once, usually a botnet: thousands of computers taken over by malware and directed by one controller. A DDoS attack is far harder to block, because no single source address can be filtered out.
Spoofing means forging the source of a message. IP spoofing puts a false source address in a packet. It is the foundation of most floods, because replies then go to the forged address, not to the attacker.
Floods and malformed packets: the named denial-of-service attacks
Some attacks exhaust a resource: the link, the server's memory or its processor. Others send a single malformed packet that crashes a system that does not check its input.
| Attack | How it works | Countermeasure |
|---|---|---|
| SYN flood | Many SYNs, often from forged addresses. The server keeps each half-open connection until its memory for them fills | SYN cookies; filtering upstream |
| Smurf | echo requests sent to a network's broadcast address, with the victim's address as the source. Every device replies to the victim | Routers refuse directed broadcasts; hosts ignore pings sent to broadcast |
| Fraggle | with in place of ICMP, aimed at the echo and character generator services on ports 7 and 19 | The same as smurf; disable those services |
| Amplification | Small forged requests to open servers that give large answers, all addressed to the victim | Block forged sources; close open servers; rate limits |
| Ping of death | An packet larger than the 65,535-byte limit, sent in fragments. Reassembling it crashes the receiver | Patched systems |
| Teardrop | Fragments whose positions overlap, which faulty reassembly code cannot handle | Patched systems |
| Land | A SYN whose source address and port are the same as its destination | Patched systems; drop packets showing an inside source from outside |
A SYN cookie lets the server keep no memory at all for a half-open connection. It hides what it needs inside the sequence number of its SYN-ACK and rebuilds it only when the genuine final ACK arrives.
Smurf, fraggle and amplification are all reflection attacks: the attacker bounces traffic off innocent third parties so that it seems to come from them. Amplification adds size. A name server can return a reply dozens of times larger than the question, and some time servers a reply hundreds of times larger.
The ticket shop, explained
The attacker sent small questions to thousands of open name and time servers, forging the shop's address as the sender. Each server answered the shop with a reply many times larger, and the replies filled its link. The servers were tools, not attackers.
Lying to the network: poisoning, pharming and forged sources
Several helper protocols accept the first answer that arrives and never check who sent it. Poisoning attacks feed them false answers.
- MAC flooding
- Thousands of frames from invented hardware addresses fill the switch's MAC address table. The switch then sends every frame out of every port, and the attacker can capture them. Stopped by port security, which limits the hardware addresses allowed on each port.
- ARP poisoning
- False replies pair the gateway's IP address with the attacker's hardware address, so neighbours send their traffic through the attacker. Stopped by dynamic ARP inspection on the switch.
- Rogue DHCP server
- An unauthorised server hands out a false gateway or name server. Stopped by DHCP snooping.
- DNS cache poisoning
- A forged answer stored by a resolver sends everyone who asks to the attacker's address. Stopped by DNSSEC and by resolvers that pick unpredictable query numbers and ports.
Pharming is the result DNS poisoning is used for: sending users to a fake website that poses as the real one, even when they type the right name. Phishing, a fake message that tempts a user to follow a link, needs the user to make a mistake. Pharming needs no mistake by the user at all.
IP spoofing is stopped at the edge. Ingress filtering drops a packet arriving from outside that claims an inside source address. Egress filtering drops a packet leaving the organisation whose source address is not one of its own. When every network filters its own customers' traffic this way, forged floods cannot leave them.
Man in the middle, session hijacking, replay and eavesdropping
Four attacks on a conversation are easy to confuse. They differ in whether the attacker only listens, sits between the two parties, takes over, or repeats.
| Attack | What the attacker does | Main defence |
|---|---|---|
| Eavesdropping, or sniffing | Reads traffic without changing it. Passive, so leaves no trace | |
| Man in the middle | Sits between two parties, passes messages on and can read or change them while each side thinks it talks to the other | Encryption with authentication of each end, such as a checked |
| Session hijacking | Takes over a conversation already set up, often by stealing the session cookie or token that proves a user signed in | Encrypted sessions; tokens that expire and are tied to the session |
| Replay | Records a valid message, such as a sign-in, and sends it again later | Timestamps, sequence numbers and one-time values called |
An attacker who sits on the route between two parties is on-path, and man in the middle is also called an on-path attack. ARP poisoning and a rogue access point are the usual ways to get on the path. Encryption alone does not defeat it: the attacker can set up encryption with each side separately. Checking the identity of the other end, for example by validating a certificate, is what closes the gap.
Replay defeats a protection that proves who sent a message but not when. A signed instruction to pay 100 pounds, sent twice, is a valid signed instruction both times.
The attacks sorted by the layer they abuse
Placing an attack at its layer shows which control can see it. A control that works below the abused layer cannot see the attack, and one far above it sees it too late.
| Layer | Attacks | Controls at that layer |
|---|---|---|
| 1 Physical | Tapping a cable; jamming a radio signal | Locked cabinets, protected cabling, encryption |
| 2 Data Link | MAC flooding; ARP poisoning | Port security; dynamic ARP inspection |
| 3 Network | IP spoofing; smurf; ; teardrop | Ingress and egress filtering; no directed broadcasts; |
| 4 Transport | SYN flood; land; fraggle and other UDP floods; session hijacking by guessed sequence numbers | SYN cookies; unpredictable sequence numbers; stateful |
| 7 Application | Rogue DHCP server; DNS cache poisoning; amplification through DNS and time servers; session hijacking by stolen cookies | DHCP snooping on the switch; DNSSEC; closing open servers; rate limits; secure session handling |
Some attacks span layers. ARP is placed at although it serves , and DHCP and DNS are application protocols that set up the layers below. An attack is placed by the protocol or medium it abuses, not by the damage it does.
Common misconception
“A strong firewall at the organisation's edge stops a distributed denial-of-service attack.”
A volume flood fills the internet link before it reaches the firewall, however well the firewall filters. It has to be absorbed upstream, by the internet provider or a scrubbing service with more capacity than the attack.
A question, worked through
A college's network monitoring shows a flood of ICMP echo replies arriving at a partner's web server. Every reply comes from a device on one of the college's own subnets. Nobody at the college sent any pings. The college's network manager must stop the college being used in the attack.
Which action BEST stops the college's devices taking part?
Decide on your answer, then open the reasoning
- Many inside devices sending echo replies to an outside victim, with nobody pinging, describes a smurf attack. The college is the intermediary: a forged echo request reached a subnet's broadcast address from outside.
- Rule out c: SYN cookies protect against TCP SYN floods. This attack uses ICMP and is aimed at someone else.
- Rule out b: the devices are not faulty. Answering a ping is normal, so patching changes nothing.
- Between a and d: filtering at the partner's edge may protect the partner's server, but the college keeps amplifying and the link still fills. The question asks how to stop the college taking part.
- Refusing directed broadcasts on every router means the forged request never reaches every device at once. The answer is a.
Answer: A. Turn off directed broadcasts on every router in the college network
Choosing between good answers
- Many devices answer one victim, and the victim never asked
- think reflection: smurf if the answers are ICMP, fraggle if UDP echo, amplification if the answers are far larger than the questions.
- A system crashes on one odd packet rather than slowing under load
- think malformed packet: ping of death, teardrop or land. The fix is patching, not more capacity.
- An attacker repeats a captured valid message
- the answer is replay, and the defence is a timestamp, sequence number or nonce, not stronger encryption.
- A question offers encryption alone against a man in the middle
- prefer the option that also authenticates the other end, such as validating its certificate.
- A volume flood fills the internet link
- choose filtering upstream by the provider or a scrubbing service over any control inside the organisation.
Try it
Read a capture of a visit to a secure site, then switch on the poisoning variants and find the packet where the lie enters.
Loading the preview.
Check your understanding
3 questions on this unit, easiest first. Confirm an answer to see the reasoning for it, then the right answer, the other options and the rule to reuse. Your answers are kept in this browser and feed readiness and review.
These questions are drafts that no named reviewer has approved yet.
Question 1 of 3
What to remember
- Network attacks stop the network, listen to it or lie to it: availability, confidentiality, and integrity with authenticity.
- SYN floods exhaust half-open connections; smurf and fraggle reflect pings or UDP echoes off a broadcast address; amplification reflects small requests as large replies.
- Ping of death, teardrop and land crash a system with one malformed packet, and patching is the fix.
- Eavesdropping listens, man in the middle relays and alters, session hijacking takes over, and replay repeats a valid message.
- Ingress and egress filtering stop forged source addresses at the edge, and a large flood must be absorbed upstream.
Say it from memory
How do a SYN flood, a smurf attack and a fraggle attack each work, and what stops each?
A SYN flood sends many SYNs from forged addresses until the server's half-open connection memory fills; SYN cookies stop it. Smurf sends forged pings to a broadcast address so every device replies to the victim; fraggle does the same with UDP echo on ports 7 and 19. Routers that refuse directed broadcasts stop both.
Tell apart eavesdropping, man in the middle, session hijacking and replay.
Eavesdropping only reads traffic. A man in the middle relays traffic between two parties and can read or change it. Session hijacking takes over a conversation already set up, often with a stolen session token. Replay sends a captured valid message again later.
At which OSI layer is each placed: ARP poisoning, teardrop, SYN flood, DNS cache poisoning?
ARP poisoning at layer 2, teardrop at layer 3, SYN flood at layer 4 and DNS cache poisoning at layer 7.
What are the three aims of network attacks, and which security property does each attack?
Stopping the network working attacks availability, through floods and malformed packets. Listening to the traffic attacks confidentiality, through eavesdropping or sniffing. Lying to the network or to a user attacks integrity and authenticity, through spoofing, poisoning, man in the middle, hijacking and replay.
How does pharming differ from phishing, and what do ingress and egress filtering drop?
Phishing needs the user to make a mistake by following a tempting link. Pharming, the result DNS poisoning is used for, sends users to a fake site even when they type the right name. Ingress filtering drops a packet from outside that claims an inside source address. Egress filtering drops a leaving packet whose source address is not the organisation's own.
Sources
- RFC 4949: Internet Security Glossary, Version 2, IETFDefinitions of denial of service, flooding, eavesdropping as passive wiretapping, man-in-the-middle attack, hijack attack as seizing an established association, and replay attack, with nonces against replay.
- 1998 CERT Advisories, Software Engineering Institute, Carnegie Mellon UniversitySmurf attacks send forged ICMP echo requests to IP broadcast addresses so that an intermediary's machines reply to the victim; disable IP-directed broadcasts on all routers and filter forged source addresses.
- 1997 CERT Advisories, Software Engineering Institute, Carnegie Mellon UniversityTeardrop exploits faulty reassembly of overlapping IP fragments; land is a SYN whose source address and port equal its destination; both crash vulnerable systems and are fixed by patches.
- 1996 CERT Advisories, Software Engineering Institute, Carnegie Mellon UniversitySYN flooding fills a server's memory of half-open connections using spoofed sources; oversized ICMP packets sent with ping crash, freeze or reboot systems.
- RFC 4987: TCP SYN Flooding Attacks and Common Mitigations, IETFSYN flooding fills the backlog of half-open connections; SYN cookies keep no state until a valid final ACK arrives.
- RFC 2644: Changing the Default for Directed Broadcasts in Routers, IETFRouters must block directed broadcasts by default to stop networks being used as smurf amplifiers.
- What is a Fraggle DDoS Attack?, Corero Network SecurityA fraggle attack sends spoofed UDP packets to a broadcast address, aimed at ports 7 (echo) and 19 (chargen), and differs from smurf in using UDP in place of ICMP.
- UDP-Based Amplification Attacks, CISAUDP does not validate source addresses, so forged requests make servers reply to the victim; DNS amplifies 28 to 54 times and NTP 556.9 times; mitigations are source address verification, disabling unneeded services and rate limiting.
- RFC 2827: Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing, IETFIngress filtering accepts from a downstream network only packets with source addresses inside its prefix, which blocks forged sources from outside that range.
- Pharming, in the NIST Computer Security Resource Center Glossary, NISTPharming redirects users to a fake website that poses as the real one.
- RFC 6528: Defending against Sequence Number Attacks, IETFPredictable initial sequence numbers let an attacker forge segments into a connection, so they are generated to be hard to guess.
- RFC 2131: Dynamic Host Configuration Protocol, IETFDHCP messages to a server go to UDP port 67 and replies to the client to port 68, so a rogue DHCP server abuses an application protocol.
- RFC 4033: DNS Security Introduction and Requirements, IETFDNSSEC lets a resolver detect forged DNS answers.
- RFC 3552: Guidelines for Writing RFC Text on Security Considerations, IETFA man-in-the-middle attacker poses as each party to the other; it is possible whenever a protocol lacks peer entity authentication, and ARP spoofing mounts it on a local network; on-path attackers can read and modify traffic.