Skip to content

idanmaman2/dhcp_starvation

Repository files navigation

DHCP STARVATION

to first start :

python3 dhcpStarvation.py -h 

dhcp server config - ubuntu server :

>> sudo apt-get update
>> sudo apt install isc-dhcp-server
>> sudo nano /etc/netplan/OO-installer-config.yaml
network:
  ethernets:
    <your interface>:
      dhcp4:no
      addresses:
        - <personal local network  address> /<cidr>
     version:2
>> sudo /etc/init.d/networking restart
>> sudo nano /etc/dhcp/dhcpd.conf
subnet <personal local network  address> <sub network mask> {
  range <start given address> <end of seq of addresses> ;
  option subnet-mask <sub network mask > ;
  option broadcast-address <broadcast address>;
  default-lease-time 400 ; 
  max-lease-time 800; 
>> sudo nano /etc/default/isc-dhcp-server
 change only that line ::: INTERFACESv4="<your interface>" 
>> sudo service isc-dhcp-server start 
}

watch logs and conected users :

full list : >> dhcp-lease-list --lease
get only ip : >> dhcp-lease-list --lease | cut -d " " -f 3 | grep -E '^((25[0-5]|2[0-4][0-9]|[1]?[1-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[1]?[1-9]?[0-9])$' | sort
get num of ip's :  >>   dhcp-lease-list --lease | cut -d " " -f 3 | grep -E '^((25[0-5]|2[0-4][0-9]|[1]?[1-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[1]?[1-9]?[0-9])$' | wc -l 
get status : >> service isc-dhcp-server status 

Examples

before the attack :

Screen Shot 2022-11-06 at 23 29 38

after the attack :

Screen Shot 2022-11-06 at 23 30 12

Screen Shot 2022-11-06 at 23 40 45

persistent - Mantian connection on 50% and 87.5% time

Screen Shot 2022-11-06 at 23 45 51

Screen Shot 2022-11-06 at 23 45 51

Screen Shot 2022-11-06 at 23 46 42

reconnection

Screen Shot 2022-11-06 at 23 50 40

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages