Before we jump to the attack, let's see how the DHCP server works. When you connect to a network via a switch (access point), your machine automatically gets the IP address of the network. You might be wondering where your machine got the IP from. These configurations come from the DHCP server, configured for the network. The DHCP server gives four things: the IP address, subnet mask, gateway address, and DNS server address. But if you analyze carefully, the DHCP server also gives you lease for allocate IP address. Type the ipconfig/all command in the Windows Command Prompt. Lease obtained and the lease expires are highlighted in the following screenshot:
You can see DHCP lease in the rectangle. In this attack, we will send a fake request to the DHCP server. The DHCP server allocates the IPs with a Lease to the fake request. In this way, we will finish...