how to give an ip when faking an AP with airbase-ng?
Hi, I am doing some testing with my AP. I have my AP named MYAP (unencrypted). So I want to fake the AP. I did: "airbase-ng -a AA:AA:AA:AA:AA:AA -e MYAP mon0", it said:
23:26:24 Created tap interface at0
23:26:24 Trying to set MTU on at0 to 1500
23:26:24 Access Point with BSSID AA:AA:AA:AA:AA:AA started.
So everything fine here. Then I made a deauthentication of the original AP like this: "aireplay-ng --deauth 0 -a REALMAC mon0", and it began sending deauthentication packages. My smartphone desconnected from the original AP and then associated with the other, I can see a few of this in the airbase-ng screen:
23:26:29 Client MAC_ADDRESS associated (unencrypted) to ESSID: "MYAP"
but the thing is that my phone keeps in: "obtaining ip adress" for a minute, and then gives up. This happens also with another computer. In the tutorials I am watching it says that the devices should connect succesfull to my faked AP.
So the question is what do I need to do so they can connect?
Thanks.
Re: how to give an ip when faking an AP with airbase-ng?
I dont really know how to do it, but if it helps, you have to set up a dhcp server, i guess. and do some forwarding maybe using iptables for the client to have access to internet, if thats your intention. Im not sure if that's all that need to be done, just hope it helps.
regards.
Re: how to give an ip when faking an AP with airbase-ng?
you could try this config for the /etc/dhcp3/dhcpd.conf file
subnet 192.168.4.0 netmask 255.255.255.0
{
range 192.168.4.10 192.168.4.30;
default-lease-time 3600;
max-lease-time 7200;
authoritative;
option domain-name GoogleDNS;
option domain-name-servers 8.8.8.8,8.8.4.4;
option broadcast-address 192.168.4.255;
option subnet-mask 255.255.255.0;
option routers 192.168.4.1;
}
if you want to redirect the traffic to your localhost websever you can use iptables
something like that
iptables -A PREROUTING -s 192.168.4.0/255.255.255.0 -p tcp --sport ! 52 -j DNAT --to-destination 192.168.4.1 -t nat
(http://haezjagt.blogspot.com/2011/02...p.html)-german
Re: how to give an ip when faking an AP with airbase-ng?
Quote:
Originally Posted by
LaFleur
you could try this config for the /etc/dhcp3/dhcpd.conf file
subnet 192.168.4.0 netmask 255.255.255.0
{
range 192.168.4.10 192.168.4.30;
default-lease-time 3600;
max-lease-time 7200;
authoritative;
option domain-name GoogleDNS;
option domain-name-servers 8.8.8.8,8.8.4.4;
option broadcast-address 192.168.4.255;
option subnet-mask 255.255.255.0;
option routers 192.168.4.1;
}
if you want to redirect the traffic to your localhost websever you can use iptables
something like that
iptables -A PREROUTING -s 192.168.4.0/255.255.255.0 -p tcp --sport ! 52 -j DNAT --to-destination 192.168.4.1 -t nat
(
http://haezjagt.blogspot.com/2011/02...p.html)-german
humm this didnt work. My phone and my other pc still not connect. I looked on wireshark while it was trying to connect, and:
The authentication process occurs,
then there are some authentication requests and authentication responses, but in the end there are lots of probe requests and probe responses, then some null function from the phone to my laptop (the faked AP), and in the end the phone sends a deauthentication package. So i don't know what is wrong =/