Network attacks by name, and what stops each

9 min 5 sections 3 practice questions 14 sources cited

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.

The three aims of network attacks
AimProperty attackedExamples
Stop the network workingFloods, malformed
Listen to the trafficEavesdropping, 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.

Named denial-of-service attacks, how each works and what stops it
AttackHow it worksCountermeasure
SYN floodMany SYNs, often from forged addresses. The server keeps each half-open connection until its memory for them fillsSYN 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 victimRouters 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 19The same as smurf; disable those services
AmplificationSmall forged requests to open servers that give large answers, all addressed to the victimBlock forged sources; close open servers; rate limits
Ping of deathAn packet larger than the 65,535-byte limit, sent in fragments. Reassembling it crashes the receiverPatched systems
TeardropFragments whose positions overlap, which faulty reassembly code cannot handlePatched systems
LandA SYN whose source address and port are the same as its destinationPatched 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.

Four attacks on a conversation, told apart
AttackWhat the attacker doesMain defence
Eavesdropping, or sniffingReads traffic without changing it. Passive, so leaves no trace
Man in the middleSits between two parties, passes messages on and can read or change them while each side thinks it talks to the otherEncryption with authentication of each end, such as a checked
Session hijackingTakes over a conversation already set up, often by stealing the session cookie or token that proves a user signed inEncrypted sessions; tokens that expire and are tied to the session
ReplayRecords a valid message, such as a sign-in, and sends it again laterTimestamps, 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.

Named network attacks by OSI layer
LayerAttacksControls at that layer
1 PhysicalTapping a cable; jamming a radio signalLocked cabinets, protected cabling, encryption
2 Data LinkMAC flooding; ARP poisoningPort security; dynamic ARP inspection
3 NetworkIP spoofing; smurf; ; teardropIngress and egress filtering; no directed broadcasts;
4 TransportSYN flood; land; fraggle and other UDP floods; session hijacking by guessed sequence numbersSYN cookies; unpredictable sequence numbers; stateful
7 ApplicationRogue DHCP server; DNS cache poisoning; amplification through DNS and time servers; session hijacking by stolen cookiesDHCP 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?

  1. Turn off directed broadcasts on every router in the college network
  2. Install patches on every device that sent the echo replies
  3. Enable SYN cookies on the college's own web servers
  4. Ask the partner to filter echo replies at its own edge
Decide on your answer, then open the reasoning
  1. 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.
  2. Rule out c: SYN cookies protect against TCP SYN floods. This attack uses ICMP and is aimed at someone else.
  3. Rule out b: the devices are not faulty. Answering a ping is normal, so patching changes nothing.
  4. 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.
  5. 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

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.

Which addition to the message would defeat this attack?

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

  1. 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.

    Read this part again

  2. 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.

    Read this part again

  3. 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.

    Read this part again

  4. 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.

    Read this part again

  5. 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.

    Read this part again

Sources