[email protected]:~/fakeap# airmon-ng start wlan1 Found 1 processes that could cause trouble. If airodump-ng, aireplay-ng or airtun-ng stops working after a short period of time, you may want to kill (some of) them! PID Name 1558 dhclient Interface Chipset Driver wlan1 Realtek RTL8187L rtl8187 - [phy1]SIOCSIFFLAGS: Unknown error 132 (monitor mode enabled on mon0)
Tried using airodump-ng to see what happens…
[email protected]:~/fakeap# airodump-ng mon0
ioctl(SIOCSIFFLAGS) failed: Unknown error 132
[email protected]:~/fakeap# rmmod rtl8187
[email protected]:~/fakeap# modprobe r8187
[email protected]:~/fakeap# airmon-ng start wlan1
Found 1 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!
PID Name
1558 dhclient
Interface Chipset Driver
wlan1 RTL8187 r8187 (monitor mode enabled)
[email protected]:~/fakeap# iwconfig
lo no wireless extensions.
eth3 no wireless extensions.
wlan1 802.11b/g Mode:Monitor Channel=10 Bit Rate=11 Mb/s
Tx-Power=5 dBm
Retry:on Fragment thr:off
Link Quality=0/100 Signal level=50 dBm Noise level=-156 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
apt-get install dhcp3-server
ddns-update-style ad-hoc;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 10.0.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option routers 10.0.0.254;
option domain-name-servers 8.8.8.8;
range 10.0.0.1 10.0.0.140;
}
airmon-ng start wlan1
airbase-ng -e FreeWifi -c 11 -v wlan1 &
ifconfig at0 up
ifconfig at0 10.0.0.254 netmask 255.255.255.0
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE
echo > '/var/lib/dhcp3/dhcpd.leases'
ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid
dhcpd3 -d -f -cf /etc/dhcp3/dhcpd.conf at0 &
echo "1" > /proc/sys/net/ipv4/ip_forward
#!/bin/bash
echo “Killing Airbase-ng…”
pkill airbase-ng
sleep 2;
echo “Killing DHCP…”
pkill dhcpd3
sleep 5;echo “Putting Wlan In Monitor Mode…”
airmon-ng stop wlan1 # Change to your wlan interface
sleep 5;
airmon-ng start wlan1 # Change to your wlan interface
sleep 5;
echo “Starting Fake AP…”
airbase-ng -e FreeWifi -c 11 -v wlan1 & # Change essid, channel and interface
sleep 5;ifconfig at0 up
ifconfig at0 10.0.0.254 netmask 255.255.255.0 # Change IP addresses as configured in your dhcpd.conf
route add -net 10.0.0.0 netmask 255.255.255.0 gw 10.0.0.254sleep 5;
iptables –flush
iptables –table nat –flush
iptables –delete-chain
iptables –table nat –delete-chain
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -o eth3 -j MASQUERADE # Change eth3 to your internet facing interfaceecho > ‘/var/lib/dhcp3/dhcpd.leases’
ln -s /var/run/dhcp3-server/dhcpd.pid /var/run/dhcpd.pid
dhcpd3 -d -f -cf /etc/dhcp3/dhcpd.conf at0 &sleep 5;
echo “1” > /proc/sys/net/ipv4/ip_forward