Labs / Red Team / Denial of service: floods, reflection & spoofing

Lab 1 of 2 · Denial of service: floods, reflection & spoofing

SYN flood: half-open connections and how a server resists

Watch half-open connections pile up and see how SYN cookies keep a server alive.

Open this lab Pro 5 steps

The idea

A SYN flood abuses the TCP handshake: the attacker sprays SYNs from forged source addresses and never sends the final ACK, so the server fills with half-open connections. This lab watches the pile grow and shows what really keeps the server alive — the kernel's SYN cookies — and where the attack is truly stopped.

Half-open, and never finished
Half-open, and never finished
The state rides in the reply
The state rides in the reply

Steps

  1. A server answering normally

    Before the flood, see what healthy looks like: a real client completes the handshake and gets its page, and the server holds no half-open connections.

    legitClient:~# curl -s -o /dev/null -w 'legit=%{http_code}\n' --max-time 5 http://10.0.1.10/
    webServer:~# ss -tn state syn-recv
  2. The flood

    The attacker opens the flood: sixty senders, each spraying SYNs at the server's port 80 from a different forged source (10.0.1.101–10.0.1.160) it does not own, and never sending the ACK. The server's half-open connections pile up on its port 80, their peers addresses the attacker never had.

    webServer:~# ss -tn state syn-recv

Pro

3 more steps in the app

  1. Why the server survives: SYN cookies
  2. A blunt firewall limit, and its cost
  3. The real fix: filter forged sources at the edge
Get Pro

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab