May 17, 2017 03:22 PM
(This post was last modified: May 18, 2017 06:19 AM by trogne.)
I cannot connect to my rogue AP.
I have strictly followed and revised all the same steps seen on many tutorials.
Here's what I've done :
I have a wired internet connection on interface "eth0" :
/etc/network/interfaces :
Command to start the monitor interface :
Now "wlan0mon" is up.
Command:
Access point "free hotspot" is available.
I keep this terminal open.
On a second terminal :
Commands :
File /etc/dhcp/dhcpd.conf :
File /etc/default/isc-dhcp-server :
Command :
Command :
Output :
Command for forwarding :
Command to add route:
Now everything should be ok.
However, if I connect to my AP "free hotspot", I can see on the first terminal that the client is associating (well, trying to associate).
I can also see that DHCP seems to work :
But it won't connect to the AP.
If I use my phone next to me, and trying to connect, it will say "connected" for one second, then automatically disconnect.
I use Kali 2. My network card is an Intel Centrino Wireless-N 1000.
If I can't connect to the AP, could it be because of the network card ?
If not, what can it be ?
Thank you for your help!
Patrick
I have strictly followed and revised all the same steps seen on many tutorials.
Here's what I've done :
I have a wired internet connection on interface "eth0" :
/etc/network/interfaces :
Code
auto eth0
iface eth0 inet static
address 192.168.1.222
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4Command to start the monitor interface :
Code
airmon-ng start wlan0Now "wlan0mon" is up.
Command:
Code
airbase-ng --essid "free hotspot" -c 6 wlan0monAccess point "free hotspot" is available.
I keep this terminal open.
On a second terminal :
Commands :
Code
ifconfig at0 up
ifconfig at0 192.168.2.1/24File /etc/dhcp/dhcpd.conf :
Code
authoritative;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option subnet-mask 255.255.255.0;
option domain-name "free hotspot";
option domain-name-servers 8.8.8.8,192.168.1.1;
range 192.168.2.2 192.168.2.40;
}File /etc/default/isc-dhcp-server :
Code
INTERFACESv4="at0"Command :
Code
systemctl start isc-dhcp-serverCommand :
Code
iptables-saveCode
# Generated by iptables-save v1.6.0 on Wed May 17 18:17:29 2017
*nat
:PREROUTING ACCEPT [1919:78709]
:INPUT ACCEPT [65:3788]
:OUTPUT ACCEPT [749:48483]
:POSTROUTING ACCEPT [17:1222]
-A PREROUTING -p udp -j DNAT --to-destination 192.168.1.1
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 10000
-A PREROUTING -p udp -m udp --dport 53 -j REDIRECT --to-ports 53
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Wed May 17 18:17:29 2017
# Generated by iptables-save v1.6.0 on Wed May 17 18:17:29 2017
*filter
:INPUT ACCEPT [56139:15930360]
:FORWARD ACCEPT [7973:922124]
:OUTPUT ACCEPT [48640:11215379]
-A FORWARD -i at0 -j ACCEPT
COMMIT
# Completed on Wed May 17 18:17:29 2017Command for forwarding :
Code
echo "1" > /proc/sys/net/ipv4/ip_forwardCommand to add route:
Code
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1Now everything should be ok.
However, if I connect to my AP "free hotspot", I can see on the first terminal that the client is associating (well, trying to associate).
I can also see that DHCP seems to work :
Code
May 17 17:58:32 kali dhcpd[12000]: DHCPREQUEST for 192.168.2.2 from 80:5a:04:d1:cc:33 (android-491cfd6b15033dd2) via at0
May 17 17:58:32 kali dhcpd[11822]: DHCPREQUEST for 192.168.2.2 from 80:5a:04:d1:cc:33 (android-491cfd6b15033dd2) via at0But it won't connect to the AP.
If I use my phone next to me, and trying to connect, it will say "connected" for one second, then automatically disconnect.
I use Kali 2. My network card is an Intel Centrino Wireless-N 1000.
If I can't connect to the AP, could it be because of the network card ?
If not, what can it be ?
Thank you for your help!
Patrick

