Understanding DoS Attacks
In this step, we will introduce the concept of Denial of Service (DoS) attacks and explain how they work.
A Denial of Service (DoS) attack is an attempt to make a computer or network resource unavailable to its intended users by overwhelming it with an excessive amount of traffic or requests. The primary goal of a DoS attack is to disrupt the normal operations of a system, causing it to become unresponsive or crash.
There are various types of DoS attacks, but one of the most common is the SYN flood attack, which exploits the TCP three-way handshake process. Here's how a SYN flood attack works:
- The attacker sends a large number of SYN packets (the initial packet in the TCP handshake process) to the target system.
- The target system responds to each SYN packet with a SYN-ACK packet and allocates resources (such as memory) to maintain the half-open connections.
- The attacker never sends the final ACK packet to complete the handshake, leaving the target system with a large number of half-open connections and eventually exhausting its resources.
This overwhelms the target system, preventing it from accepting legitimate connections and rendering it unavailable to legitimate users.
## Run the following command to simulate a SYN flood attack using hping3
hping3 -S -P -U --flood -V --rand-source 192.168.122.102
In this example, the hping3
command is used to send a flood of SYN packets with various flags set (SYN, PUSH, URG) to the target IP address 192.168.122.102
. The --rand-source
option randomizes the source IP address for each packet, making it harder to filter the attack traffic.