Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Penetration Testing Cookbook

You're reading from   Python Penetration Testing Cookbook Practical recipes on implementing information gathering, network security, intrusion detection, and post-exploitation

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781784399771
Length 226 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rejah Rehim Rejah Rehim
Author Profile Icon Rejah Rehim
Rejah Rehim
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Why Python in Penetration Testing? FREE CHAPTER 2. Setting Up a Python Environment 3. Web Scraping with Python 4. Data Parsing with Python 5. Web Scraping with Scrapy and BeautifulSoup 6. Network Scanning with Python 7. Network Sniffing with Python 8. Scapy Basics 9. Wi-Fi Sniffing 10. Layer 2 Attacks 11. TCP/IP Attacks 12. Introduction to Exploit Development 13. Windows Exploit Development 14. Linux Exploit Development

DHCP starvation

DHCP is the protocol that helps to assign clients' IP addresses to the LAN. The process of assigning DHCP consists of four steps--DHCPDiscover, DHCPOffer, DHCPRequest, and DHCP ACK.

DHCPDiscover is the first step where the client broadcasts in the LAN to find a DHCP server that can provide an IP for the client. Then the server will respond with a unicast DHCPOffer, where it offers a possible IP. Then, the client will broadcast the DHCPRequest with the IP to all networks, and finally the server will respond with a DHCP ACK or DHCP NAK. ACK represents a successful DHCP process, while NAK represents when the IP is not available:

The DHCP server stores the IP information to MAC bindings. If we ask for too many IPs from the DHCP server, other legitimate clients will not get an IP to connect. This is known as a DHCP starvation attack. In this recipe, we will be...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime