Bitzu

312-50 ยท Denial-of-service

What are SYN cookies and how do they stop SYN floods?

Rate limiting, SYN cookies, ingress/egress filtering, blackholing, scrubbing, CDNs, WAFs, and detection techniques.

Key points

  • SYN cookies: a server-side defense against SYN floods (RFC 4987).
  • No state is stored for half-open connections.
  • Connection details are encoded in the sequence number of the SYN-ACK.
  • No memory is allocated until a valid final ACK returns.
  • Fake SYNs cannot exhaust the connection-state table, since nothing is stored for connections that never complete.

Source: https://www.rfc-editor.org/rfc/rfc4987

Practice questions

Single choice

What does ingress filtering, as defined in RFC 2827 (BCP 38), primarily defeat?

  1. DoS attacks that rely on spoofed source IP addresses
  2. SQL injection against web applications
  3. Credential stuffing against login pages
  4. Cross-site scripting in user-submitted content
Show answer

Answer: A. DoS attacks that rely on spoofed source IP addresses

RFC 2827 defines ingress filtering as a router dropping any packet whose source address falls outside the prefixes its customer legitimately owns, which directly defeats DoS attacks that rely on spoofed source IP addresses.

Select all that apply

Which of the following are documented DoS/DDoS countermeasures?

  1. Rate limiting requests per client
  2. SYN cookies on the server's TCP stack
  3. Ingress filtering of spoofed source addresses
  4. Disabling all security logging
  5. Removing all firewall rules
Show answer

Answer: A. Rate limiting requests per client, B. SYN cookies on the server's TCP stack, C. Ingress filtering of spoofed source addresses

Rate limiting, SYN cookies, and ingress filtering (RFC 2827/BCP 38) are all documented, real countermeasures against DoS/DDoS. Disabling all logging and removing firewall rules are the opposite of a countermeasure and would weaken defenses.

True or false

Ingress filtering (RFC 2827 / BCP 38) stops all DoS floods, including ones launched from valid, unspoofed source addresses within the permitted prefix range.

Show answer

Answer: False

False. RFC 2827 itself states that ingress filtering does nothing against floods launched from genuinely valid source addresses; it only defeats attacks that rely on spoofed addresses outside the customer's legitimate prefixes.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More 312-50 topics in this module