Linux OS Internals (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
What is the difference between TCP SYN Flood attacks and SYN Cookies?
senior Levellinux-osAdvanced Internals
In Simple Words:
- TCP SYN Flood: Attacker sends millions of
SYNpackets with spoofed source IPs, ignoring theSYN-ACK. The server's SYN Backlog Queue fills up waiting for nonexistentACKs, crashing the server. - SYN Cookies (
tcp_syncookies = 1): When the backlog queue fills up, the server stops storing connection state in memory.- Encodes connection state into the Initial Sequence Number (ISN) of the
SYN-ACKpacket. - State is reconstructed only when the legitimate client sends back the final
ACK!
- Encodes connection state into the Initial Sequence Number (ISN) of the