DHCP starvation attack

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 ...

Get Python Penetration Testing Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.