SYN flood DoS attack
A SYN flood DoS attack is a resource-consumption attack. It works by sending a large number of TCP SYN requests to the remote port associated with the service that is the target of the attack. For each initial SYN packet that is received by the target service, it will then send out a SYN+ACK packet and hold the connection open to wait for the final ACK packet from the initiating client. By overloading the target with these half-open requests, an attacker can render a service unresponsive.
Getting ready
To use Scapy to perform a full SYN flood against a target, you will need to have a remote system that is running network services over TCP. In the examples provided, an instance of Metasploitable2 is used to perform this task. For more information on setting up Metasploitable2, refer to the Installing Metasploitable2 recipe in Chapter 1, Getting Started. Additionally, this section will require a script to be written to the filesystem, using a text editor such as Vim or GNU...