To understand this, we first need to consider how TCP flag-based DoS attacks work. These attacks, like SYN floods or RST attacks, exploit the TCP protocol by sending packets with manipulated flags that either consume server resources or disrupt legitimate connections. The attacker might send many SYN packets without completing the three-way handshake, or send RST packets to tear down valid connections.
A stateless firewall
only examines individual packets in isolation. It can check if TCP flags follow basic protocol rules, but cannot track the state of connections or verify if flags make sense in the context of ongoing communications. This makes it relatively weak against TCP flag manipulation.
A packet filtering firewall
is similar to a stateless firewall - it makes decisions based on packet headers but doesn't maintain connection state information. While it can filter based on TCP flags, it cannot detect if those flags are appropriate for the current connection state.
A stateful firewall
maintains detailed information about active connections and the state of each TCP session. It knows exactly which flags should appear at each stage of a connection and can detect anomalies like SYN packets for already-established connections or RST packets that don't correspond to real sessions. This context awareness makes it particularly effective at identifying and blocking TCP flag manipulation attacks.
A proxy firewall
, while secure in many ways, primarily works at the application layer. While it can prevent TCP attacks by breaking the direct connection between client and server, it doesn't specifically excel at detecting TCP flag manipulation compared to a stateful firewall.
Therefore, the correct answer is c) Stateful firewall. Its ability to track connection states and understand the proper sequence of TCP flags makes it uniquely suited to detect and block these types of attacks.
To reinforce this concept, imagine a security guard checking tickets at a theater. A stateless firewall is like a guard who only checks if each ticket looks valid in isolation. A stateful firewall is like a guard who remembers which seats are occupied and knows exactly which stage of entry each patron should be in - making it much harder for someone to cause problems by presenting tickets in the wrong sequence or context.