What it means
A denial-of-service attack does not break in or steal anything. It uses up something finite, such as bandwidth, memory or processing time, until the people who need the service cannot reach it. It is distributed when the traffic comes from many machines, often a botnet of compromised devices. That makes it larger and harder to filter by source.
Attacks differ in what they exhaust. A volume flood fills the network link. A protocol attack such as a SYN flood fills the table a server uses for half-open connections. An application attack sends requests that look valid and are costly to answer. Each needs a different defence, and some must be applied upstream, by a provider with far more capacity than the target.
See the idea / Networks
A flood wins by filling a queue, not by breaking in.
Forged connection requests fill a server's waiting list until real clients are turned away. Then see the same flood against SYN cookies.
The load balancer in front of telemetry.chronos.orbital. A TCP connection opens with a SYN, a SYN-ACK reply, and a final ACK. While the server waits for that ACK, the connection is half-open, in the state SYN_RCVD. It holds a place in a fixed-size queue called the backlog. A finished connection is ESTABLISHED. A botnet, many machines under one controller, sends SYNs with forged source addresses.
01 / 04
Normal
Before the flood, the backlog is almost empty. A real client's SYN gets a place, the client answers at once, and the connection is established.
More about this step
Every real connection passes through SYN_RCVD for a moment. The entry leaves the backlog as soon as the final ACK arrives, so in normal use the queue never fills.
Step through at your own pace.
Keep in mindThis is one kind of attack: a SYN flood against connection state. The figure 40,000 comes from this example and is not a typical backlog size. SYN cookies protect the backlog only. They also have a cost. A cookie has room for only a rough maximum segment size, so options such as window scaling and SACK are lost unless the timestamp carries them. For that reason most systems use cookies only when the backlog is under pressure. A flood large enough to fill the network link, or one made of complete and valid requests, needs filtering or capacity upstream. Forged sources mean the addresses in the table do not identify the botnet.
Read the visual, step by step
Holds a backlog place
- Normal. Before the flood, the backlog is almost empty. A real client's SYN gets a place, the client answers at once, and the connection is established. Every real connection passes through SYN_RCVD for a moment. The entry leaves the backlog as soon as the final ACK arrives, so in normal use the queue never fills.
- Flood. The botnet sends SYNs from forged addresses. The server answers each one and holds a backlog place for it. No final ACK comes. The SYN-ACK replies go to the forged addresses, where nothing completes the handshake. Each entry stays until the server gives up on it, which takes far longer than a real handshake.
- Full. The backlog reaches 40,000 half-open entries and is full. The count of established connections stops rising. This is what Kael Cho, the infrastructure engineer, saw on the load balancer: 40,000 entries in SYN_RCVD from random sources, and a flat count of ESTABLISHED. Nothing was broken into, and no data was read. The server is busy waiting.
- Real client. A real client sends a SYN. There is no free place, so the server drops it. The service is running, but nobody new can connect. This is a loss of availability. The people who need the service cannot reach it, even though the server and its data are intact. Connections that were already established keep working.
SYN cookies on
- Normal. Before the flood, real clients connect as usual. With SYN cookies on, the server keeps no entry for a SYN until the final ACK comes back. A SYN cookie is a starting number the server computes from the connection details and a secret. The server sends it in the SYN-ACK and stores nothing. A real client returns the number plus one in its ACK, and the server can check it.
- Flood. The botnet sends the same forged SYNs. The server answers each with a SYN-ACK whose starting number encodes the connection details. It stores nothing. The replies still go to the forged addresses and are still wasted. The difference is that each one costs the server a calculation, not a place in a queue.
- No ACKs. No forged sender returns an ACK, so nothing is ever stored for them. The backlog does not fill, and real connections keep finishing. The count of ESTABLISHED connections keeps rising with real clients. The flood still uses network capacity and processor time, so a large enough one can hurt in other ways.
- Real client. A real client sends a SYN and answers the SYN-ACK. Its ACK carries the encoded number back, the server checks it, and the connection is established. The server recomputes the cookie from the addresses and ports in the ACK and its secret. If the number matches, it rebuilds the entry and only then commits memory. A client that never saw the SYN-ACK cannot produce a valid number.
This is one kind of attack: a SYN flood against connection state. The figure 40,000 comes from this example and is not a typical backlog size. SYN cookies protect the backlog only. They also have a cost. A cookie has room for only a rough maximum segment size, so options such as window scaling and SACK are lost unless the timestamp carries them. For that reason most systems use cookies only when the backlog is under pressure. A flood large enough to fill the network link, or one made of complete and valid requests, needs filtering or capacity upstream. Forged sources mean the addresses in the table do not identify the botnet.
Flow references: RFC 4987: TCP SYN flooding attacks and common mitigations · RFC 2827 (BCP 38): filtering forged source addresses
AN ILLUSTRATIVE SCENARIO
An online ticket seller
A ticket seller opens sales for a festival at 09:00. At 09:01 the site stops responding. The team assumes the crowd is larger than planned and adds servers, which does not help. The firewall shows tens of thousands of half-open connections from addresses all over the world. The provider enables SYN cookies at the load balancer and routes traffic through its filtering service. Sales resume at 09:40. The seller now has that arrangement agreed in advance.
Put it to work
- Find out which resource runs out first under load: link, connection table, or application. Test it before an attacker does.
- Arrange upstream protection with your provider in advance, and know who to call and what they will do.
- Turn on the protections you already own, such as SYN cookies and rate limits. Decide which functions to keep alive if you must shed load.
How to check your work
In an agreed test window, generate load against a staging copy and watch which limit is reached first. Run the provider escalation once, as a drill, and time it.
Connect the ideas
- Availability
The property that authorized people can use a system or record when they need it.
- TCP
The protocol that gives two machines a reliable, ordered stream of bytes. It opens each connection with a three-packet handshake and confirms every byte received.
- WAF
A control that inspects web application traffic and applies rules to detect or block unwanted requests, often including known attack patterns.
- Incident
An event or set of events that actually or potentially causes a security loss requiring coordinated handling.