1

so i have for the last 2 days going through this task of setting up a Rogue AP on my Kali linux running in my VM.... i am using the 64bit version and the wifi adapter is TP link TL WN722N, so my gateway in kali running in vmware is 192.168.244.2..(i got this from "route -n")

so my first task is to setup a AP, then Configure the iptable and route the traffic from my eth0 to wlan0 interface..so when i put the wlan0 into wlan0mon mode the airbase automatically create a at0 interface, and finally i configure and run a DHCP service that assigns IP addr to connected devices... then when ever a connected client tries to access internet i use sslstrip and ettercap/wireshark to sniff data...well thats the plan...

so i am able to successfully broadcast a AP

    airmon-ng check kill

    airmon-ng start wlan0

    airbase-ng -e "AP" -c 2 -v wlan0mon

after this i try and configure the route..

   ifconfig at0 up

   ifconfig at0 10.10.10.1 netmask 255.255.255.0

   route add -net 10.10.10.0 netmask 255.255.255.0 gw 192.168.244.2

   iptables -A FORWARD --in-interface eth0 -j ACCEPT 

   iptables -t nat -A POSTROUTING --out-interface wlan0 -j MASQUERADE


   echo 1 > /proc/sys/net/ipv4/ip_forward

is this right ??? i am a little lost in this department..!!!

and after that i configure the isc-dhcp-server

the config file at /etc/dhcp/dhcpd.conf looks like

  authoritative;

  default-lease-time 600;

  max-lease-time 7200;

  subnet 10.10.10.0 netmask 255.255.255.0 

  {

    option routers 10.10.10.1;

    option broadcast-address 10.10.10.255;

    option subnet-mask 255.255.255.0;

    option domain-name "cs670";

    option domain-name-servers 10.10.10.1;

    range 10.10.10.100 10.10.10.103;

  }

then i start the DHCP service... systemctl start isc-dhcp-server

this is where i am stuck at... practically speaking what i have right now is a Wifi hotspot, which shares my internet on etho to the AP right ??? to do a little testing i try connecting my phone to the AP... but the thing is the connection is very unstable... like it drops every 8secs or so and reconnects...i think it has got something to do with the way i am routing or forwarding the packets i guess... any help will be very very very much appreciated now..!!!!

  • 1
    if it connects, it's not a routing or forwarding problem - in fact, you are successful - your only problem appears to be the dropped connections – schroeder Jun 24 '17 at 8:43
  • yeah seems like it cuz.... i get the connection established that means airbase is working,i get assaigned that means the dhcpd is working..... if only the connection was stable enough to check the routing, i even tried using the mitmf framework but there also i had to use the iptables... but again the connection breaksup and then reconnects every 8secs or so...!!! – Mahesh Chandra Jun 24 '17 at 8:44
  • you need to look at your logs - that might tell you why the connection is dropping – schroeder Jun 24 '17 at 8:51
  • You can use airgeddon tool to automatize all of this proccess creating Evil Twin APs. You can look into the code to see the dhcp config, the iptables, etc it's using. The only differentiation is you are using airbase-ng and airgeddon uses hostapd. – OscarAkaElvis Jun 24 '17 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.