You are on page 1of 18

AP falsos utilizando airbase-ng

Aqu vamos a echar un vistazo a la creacin de un punto de acceso falso y el trfico de


Internet pasa a travs de nuestras ap falsos. Tuve muchos problemas con esto y en realidad
slo fue capaz de completar con la ayuda deGitsnik & Nick el griego en los foros exploit
remoto .. Ayuda impresionante hay chicos ;) Los pasos a seguir son bsicamente;

Configurar dhcpd.conf

Inicie los ap falsos con airbase-ng

Configurar las tablas IP para pasar a travs de Internet para alojar

Capture / Monitor de trfico de la red con la herramienta de eleccin

En este caso, mi sistema de prueba es el siguiente: > Uso de back | track4 pre ltima > Uso
dongle WiFi para crear una conexin a Internet en wlan1 (a travs de puerta de enlace
192.168.1.1) > Uso de mi tarjeta de netbook inalmbrica (Atheros) para crear el falso AP En
primer lugar crear / configurar el archivo dhcpd.conf para su uso posterior; nano /
etc/dhcpd3/dhcpd.conf ddns-update-style ad-hoc; default-lease-time 600; max-lease-time
7200;subred 192.168.2.128 mscara de red 255.255.255.128 { option subnet-mask
255.255.255.128; opcin broadcast-address 192.168.2.255; option routers
192.168.2.129; option domain-name-servers 4.2.2.2; rango 192.168.2.130
192.168.2.140; } Ctrl X - > y -> Enter para guardar el archivo.

A continuacin, para iniciar el ap falso con base area, la interfaz tiene que estar en modo
monitor;
airmon-ng
airmon-ng start wlan0

airbase-ng-e "TEST_AP"-c 9 mon0


Esto crear una interfaz simple toque, el at0, sin encriptacin, en el canal 9 y con el TEST_AP
essid.

En este caso, yo ya tena una conexin a Internet en funcionamiento en wlan1, por lo tanto,
los mensajes de advertencia, sin embargo esto no tuvo consecuencias an ms. Luego, lleve

el dispositivo de red y asignar subred y la puerta;

ifconfig at0
ifconfig at0 192.168.2.129 netmask 255.255.255.128
route add-net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129

A continuacin, iniciar DHCP, estaba recibiendo errores en la configuracin de dhcpd, aqu es


donde la ayuda lleg en :) necesaria para dar privilages adicionales para el dhcpd.

mkdir-p / var / run / dhcpd && chown dhcpd: dhcpd / var / run / dhcpd

Luego de sealar el comando en el archivo dhcpd.conf alternativa y la alternativa. Pid archivo


dhcpd3-cf / etc/dhcp3/dhcpd.conf-pf / var / run / dhcpd / dhcpd.pid at0

Luego de configurar el iptables para enrutar el trfico a travs de la interfaz del grifo a la

conexin a Internet (conexin a internet siendo el wlan1 est conectado a ms de mi


192.168.1.1 gateway). iptables - flush iptables - flush tabla nat - iptables - cadena
delete- iptables - tabla nat - delete-chain echo 1> / proc/sys/net/ipv4/ip_forward iptables tabla nat - append POSTROUTING - out-interface wlan1-j MASQUERADEiptables - append
FORWARD - en interfaz at0-j ACCEPT iptables-t nat-A PREROUTING-p udp - dport 53-j DNAT to 192.168.1.1

Ahora, bsicamente, tiene un punto de acceso falso que la gente puede conectarse y navegar
por internet .. todo a travs de su conexin.

Obviamente, esto puede ser abusado en cualquier nmero de formas, todo el trfico se
pueden capturar y analizar;
dsniff se puede ejecutar en l junto con urlsnarf, etc con redes de deriva, las sesiones
pueden ser secuestrados en tiempo real .. As que viene a demostrar que debe ser cuidado
con los puntos de acceso libre ..
P U B L I C A D O P O R C I N TA E N 1 4 : 5 9

Versin original

Fake AP using airbase-ng


Here we will have a look at creating a fake AP and passing internet traffic through our fake
ap.

I had a lot of trouble with this and only really was able to complete it with the help of Gitsnik
& Nick The Greek on the Remote Exploit forums.. awesome help there guys ;)

The steps involved are basically ;

Configure dhcpd.conf

Start the fake ap with airbase-ng

Configure IP tables to pass through to host internet

Capture / Monitor network traffic with tool of choice

In this case my test setup is as follows ;

> Using back|track4 pre final


> Using WiFi dongle to create a connection to internet on wlan1 (through gateway
192.168.1.1)
> Using my netbook wireless card (Atheros) to create the fake ap

First to create/configure the dhcpd.conf file for later use ;

nano /etc/dhcp3/dhcpd.conf

ddns-update-style ad-hoc;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.2.128 netmask 255.255.255.128 {
option subnet-mask 255.255.255.128;
option broadcast-address 192.168.2.255;
option routers 192.168.2.129;

option domain-name-servers 4.2.2.2;


range 192.168.2.130 192.168.2.140;
}

Ctrl X --> y --> Enter to save the file.

Then to start the fake ap with airbase, the interface needs to be in monitor mode ;
airmon-ng
airmon-ng start wlan0
airbase-ng -e "TEST_AP" -c 9 mon0
This will create a simple tap interface, on at0, with no encryption, on channel 9 and with the
essid TEST_AP.

In this case I already had an internet connection up and running on wlan1, hence the warning
messages, however this was of no further consequence.

Then bring the interface up and assign subnet and gateway;


ifconfig at0 up
ifconfig at0 192.168.2.129 netmask 255.255.255.128
route add -net 192.168.2.128 netmask 255.255.255.128 gw 192.168.2.129

Then start DHCP, I was getting errors on the dhcpd settings, this is where the help came in :)

Needed to give further privilages to the dhcpd.


mkdir -p /var/run/dhcpd && chown dhcpd:dhcpd /var/run/dhcpd

Then to point the command to the alternative dhcpd.conf file and the alternative .pid file
dhcpd3 -cf /etc/dhcp3/dhcpd.conf -pf /var/run/dhcpd/dhcpd.pid at0

Then to setup the iptables to route the traffic through the tap interface to the internet
connection (internet connection being the one wlan1 is connected to over my 192.168.1.1
gateway).

iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables --table nat --append POSTROUTING --out-interface wlan1 -j MASQUERADE
iptables --append FORWARD --in-interface at0 -j ACCEPT
iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to 192.168.1.1

Now basically you have a fake ap which people can connect to and browse the internet.. all
through your connection.

Obviously this can be abused in any number of ways, all traffic can be captured and analyzed;
dsniff could be run on it together with urlsnarf, driftnet etc., sessions could be hijacked in
real time..

So goes to show that you should be wary of free access points..


P O S T E D B Y TAP E AT 1 4 : 5 9

You might also like