Next revision | Previous revisionLast revisionBoth sides next revision |
spanish_how_to_crack_wep_via_a_wireless_client [2007/02/23 23:59] – created spanish | spanish_how_to_crack_wep_via_a_wireless_client [2007/07/18 08:56] – spanish |
---|
====== Tutorial: How to crack WEP via a wireless client ? ====== | ====== Tutorial: Como crackear WEP con un cliente ====== |
Version: 1.10 January 22, 2007 (Change log is at the end) \\ | Version: 1.15 Junio 9, 2007 \\ |
By: darkAudax \\ | By: darkAudax \\ |
| Traducción: Última revisión el 18 de Julio de 2007\\ |
\\ | \\ |
File linked to this tutorial: [[http://download.aircrack-ng.org/wiki-files/other/arpcapture-01.cap|arpcapture-01.cap]] | Archivo usado en este tutorial: [[http://download.aircrack-ng.org/wiki-files/other/arpcapture-01.cap|arpcapture-01.cap]] |
| |
===== Introducción ===== | ===== Introducción ===== |
Durante mucho tiempo se discutio como usar una tarjeta wireless para generar paquetes con los aue obtener la clave WEP de un punto de acceso. This tutorial describes four approaches with examples of how to do this. The examples provided are from from real working equipment, not theory. Each was used in real life and successfully cracked the WEP keys. | Durante mucho tiempo se discutió como usar una tarjeta wireless para generar paquetes con los que obtener la clave WEP de un punto de acceso. Este tutorial describe 4 procedimientos con ejemplos sobre como hacer esto. Los ejemplos provienen de hechos reales y no son solo teoría. Cada uno de ellos nos han servido para obtener la clave WEP. |
| |
The basic idea is to have the wireless client workstation generate data packets with IVs which we can use to crack the WEP key. Normally we have the access point itself generate the data packets with IVs. So why would you need to leverage a wireless client workstation instead of the access point? Here are just a few of the reasons: | La idea básica es usar la tarjeta wireless como cliente para generar paquetes de datos con IVs, que podremos usar para obtener la clave WEP. Normalmente el punto de acceso genera paquetes de datos con IVs; entonces ¿por qué necesitamos asociar un cliente wireless al punto de acceso? Aquí están unas pocas razones: |
| |
* Some access points max out at 130k unique IVs | * Algunos puntos de acceso generan IVs con un tamaño max de 130k |
* Client-to-client controls imposed by some access points | * Algunos puntos de acceso imponen controles Cliente-a-cliente |
* MAC address access controls | * Existencia de filtrado MAC |
* Access points which eliminate weak IVs | * Puntos de acceso que no generan IVs débiles (weak IVs) |
* You can't successfully do a fake association | * No puedes hacer una falsa asociación de forma exitosa |
* You are within range of a client but not the access point itself | * Tu estás cerca de un cliente pero muy lejos del punto de acceso, de forma que es inalcanzable. |
| |
I would like to acknowledge and thank the aircrack-ng team for producing such a great robust tool. And also acknowledge the many other people who came up with the ideas and techniques described in this tutorial. I certainly don't take credit for the techniques in this tutorial. My role was simply to pull them together in one place and describe them in detail. | Me gustaría dar las gracias al equipo de desarrollo de la suite aircrack-ng por crear estás herramientas tan potentes. Y también a toda la gente que viene al foro con ideas y técnicas descritas en este tutorial. Yo realmente estoy asombrado por las técnicas de este tutorial. Mi misión ha sido simplemente juntarlas en un lugar en el que se describen de forma detallada. |
| |
Please send me any constuctive feedback, positive or negative. | Por favor enviame cualquier mensaje constructivo, positivo o negativo. |
| |
===== Solution ===== | ===== Solución ===== |
====Assumptions used in this tutorial==== | ====Puntos de partida en este tutorial==== |
| |
* You have a wireless card with the same characteristics as the client. IE G and G, A and A. Not a B card and the client has a G card. Etc. | * Tienes una tarjeta wireless con las mismas características que el cliente habitual. Por ejemplo G y G, A y A. No sirve una tarjeta B si el cliente tiene una tarjeta G. Etc... |
* You have airodump-ng installed and fully working. | * Tienes airodump-ng instalado correctamente. |
* Your wireless rig is working and can inject packets. | * Tu tarjeta wireless está instalada y puede inyectar paquetes. |
* You are physically close enough to the client to send packets to them and receive packets from them. | * Estás físicamente suficientemente cerca del cliente habitual para enviarle paquetes a él y recibirlos de él. |
* You have Wireshark installed and working. Plus you have a basic understanding of how to use it. | * Tienes Wireshark instalado. Además tienes conocimientos básicos sobre como usarlo. |
* You are using the aircrack-ng stable version of 0.7. This is very important since there is a bug in 0.6.2 aireplay-ng which switches -k and -l IP addresses. | * Estás usando la versión estable 0.9 de aircrack-ng. Esto es muy importante puesto que hay un bug en la versión 0.6.2 con aireplay-ng que no soporta las opciones -k y -l con las direcciones IP. |
| |
| En los ejemplos, la opción "doble guión bssid" se muestra como "- -bssid". Acuérdate de borrar el espacio entre los dos guiones cuando lo uses. Esto tambien se aplica a "- -ivs", "- -arpreplay", "- -deauth", "- -channel", "- -arp" y "- -fakeauth". |
| |
====Equipment used==== | |
| |
===Target client=== | ====Equipo usado==== |
Operating system: WinXP (not that it really matters) \\ | |
MAC address: 00:0F:B5:46:11:19 | |
| |
===Access Point=== | ===Cliente wireless habitual=== |
ESSID: teddy (not that it really matters) \\ | Sistema operativo: WinXP (no importa realmente) \\ |
MAC address: 00:14:6C:7E:40:80 | Dirección MAC: 00:0F:B5:46:11:19 |
Channel: 9 | |
| |
===Aircrack-ng System=== | ===Punto de acceso=== |
Operating System: Linux \\ | ESSID: teddy (no es importante) \\ |
MAC address: does not matter | Dirección MAC: 00:14:6C:7E:40:80 |
| Canal: 9 |
| |
===Ethernet wired Workstation=== | ===Sistema con Aircrack-ng=== |
Operation System: Linux \\ | Sistema operativo: Linux \\ |
MAC address: 00:40:F4:77:F0:9B | Dirección MAC: cualquiera |
| |
===Ethernet wired Workstation=== | ===Tarjeta Ethernet Estación de trabajo=== |
Operation System: Linux \\ | Sistema operativo: Linux \\ |
MAC address: 00:0D:60:2E:CC:E1 | Dirección MAC: 00:40:F4:77:F0:9B |
| |
===Wireless Workstation=== | ===Tarjeta Ethernet Estación de trabajo=== |
Operation System: Linux \\ | Sistema operativo: Linux \\ |
MAC address: 00:09:5B:EC:EE:F2 | Dirección MAC: 00:0D:60:2E:CC:E1 |
| |
| ===Tarjeta Wireless Estación de trabajo=== |
| Sistema operativo: Linux \\ |
| Dirección MAC: 00:09:5B:EC:EE:F2 |
| |
==== Scenarios ==== | |
| |
The tutorial covers four scenarios: | ==== Escenarios ==== |
* Scenario One: Pulling packets from captured data. | |
* Scenario Two: Interactively pulling packets from live communication | |
* Scenario Three: Creating a packet from a chopchop replay attack | |
* Scenario Four: Creating a packet from a fragmentation attack | |
| |
Now onto the details... | Este tutorial cubre cuatro escenarios: |
| * Escenario Uno: Empleando paquetes de datos capturados. |
| * Escenario Dos: Empleo interactivo de paquetes en tiempo real |
| * Escenario Tres: Creando un paquete de un ataque chopchop |
| * Escenario Cuatro: Creando un paquete de un ataque de fragmentación |
| |
| Entremos ahora en detalles... |
\\ | \\ |
\\ | \\ |
===Scenario One - Pulling packets from captured data=== | ===Escenario Uno - Empleando paquetes de datos capturados=== |
| |
We are going to use a packet from captured data. Lets say you were running airodump-ng capturing packets to/from the access point and feel there are some arps you can use for injection. | Vamos a usar un paquete de datos capturado. Suponemos que estuviste ejecutando airodump-ng y capturaste paquetes del punto de acceso y piensas que tienes algunos arps que podrías usar para inyectarlos. |
| |
ARP packets are not the only ones you can use. I focus on these because they are guaranteed to succeed and are the easiest to find in a packet capture. I say ARPs are guaranteed to succeed since the client must respond to an arp request directed at the client. Remember it is not just any ARP. It must be an ARP for the specific client(s) you are targeting. | Los paquetes ARP no son los únicos que podemos usar. Pero nos centramos en estos porque son los que garantizan que tengamos éxito y además son los más fáciles de encontrar en un archivo de capturas. Decimos que los ARPs nos garantizan el éxito porque el cliente debe responder a una petición arp (arp request) directamente. Recuerda que no es cualquier ARP. Debe ser un ARP para el cliente específico al que queremos atacar. |
| |
First, capture packets going to/from the access point in question. To reduce the clutter, use a BSSID filter for the particular Access Point you are targeting and the specific channel. In our example: | Primero, tenemos que haber capturado paquetes del punto de acceso en cuestión. Para reducir el tamaño, podíamos haber usado el filtro BSSID y especificar el canal. En nuestro ejemplo: |
| |
airodump-ng --channel 9 --bssid 00:14:6C:7E:40:80 -w aprcapture ath0 | airodump-ng --channel 9 --bssid 00:14:6C:7E:40:80 -w aprcapture ath0 |
| |
You need one or more wireless clients active while you are doing this capture. If there is little or no activity, it is unlikely you capture anything of value. While you are capturing packets, you can copy the file for analysis so that the capture can continue. You can also run WireShark realtime and view the packets as they arrive. | Necesitaremos uno o más clientes wireless activos mientras hacemos la captura. Si no hay actividad ninguna, será imposible que capturemos algún paquete de datos. Mientras estamos capturando datos, podemos copiar el archivo para analizarlo mientras la captura continua. Tambien podemos ejecutar WireShark en tiempo real y ver los paquetes tan pronto como nos llegan. |
| |
So now the objective is to find an ARP packet coming from the ethernet via the access point to the client. The client will always respond to the arp request for itself. This means the client will broadcast an arp reply back to the originator on the ethernet via the access point. | Ahora el objetivo es encontrar un paquete ARP del punto de acceso a un cliente. El cliente siempre responderá al "arp request". Esto significa que el cliente generará un "arp reply" que regresará al punto de acceso. |
| |
Characteristics of the incoming packet we want: | Características del paquete que buscamos: |
* BSSID: access point | * BSSID: punto de acceso |
* Destination MAC: Broadcast (FF:FF:FF:FF:FF:FF) | * Dirección MAC de destino: Broadcast (FF:FF:FF:FF:FF:FF) |
* Source MAC: anything | * Dirección MAC origen: cualquiera |
* Packet length: 68 or 86 (68 is typical for arp packets originating from wireless clients. 86 is typical for arp requests from wired clients.) | * Longitud del paquete: 68 o 86 (68 es habitual en los paquetes arp originados por los clientes wireless. 86 es típico de los paquetes arp de los clientes cableados ethernet.) |
| |
Characteristics of the outgoing packet we want: | Características del paquete "de salida" que queremos: |
* BSSID: access point | * BSSID: punto de acceso |
* Destination MAC: the source MAC address from the incoming packet meaning the client is responding to it. | * Dirección MAC de destino: si es la MAC de origen del paquete de entrada significa que el cliente le está contestando. |
* Source MAC: MAC address of client | * Dirección MAC origen: Dirección MAC del cliente |
* Packet length: 68 or 86 (68 is typical for arp packets originating from wireless clients. 86 is typical for arp requests from wired clients.) | * Longitud del paquete: 68 o 86 (68 es habitual en los paquetes arp originados por los clientes wireless. 86 es típico de los paquetes arp de los clientes cableados ethernet.) |
| |
In simple terms we are looking for an ARP request to the client and a subsequent reply. | Resumiendo, buscamos un "ARP request" al cliente y la subsecuente respuesta. |
| |
First try Wireshark display filter of: | Para ello introducimos el siguiente filtro en Wireshark: |
(wlan.bssid == 00:14:6c:7e:40:80 and (frame.pkt_len>=68 and frame.pkt_len<=86)) | (wlan.bssid == 00:14:6c:7e:40:80 and (frame.pkt_len>=68 and frame.pkt_len le 86)) |
| |
This selects packets to/from the access point which have a packet length greater then or equal to 68 and a packet length of less then or equal to 86. | Esto selecciona los paquetes que salen o llegan al punto de acceso y que tienen una longitud entre 68 y 86 inclusive. |
| |
You will have to change wlan.bssid to the access point MAC adddress and possibly change the frame packet length values to match any local system variations. The filter above should be a pretty good starting point. | Tendrás que cambiar el "wlan.bssid" por la dirección MAC de tu punto de acceso y probablemente cambiar la longitud de los paquetes a buscar para encontrar más fácilmente cual es el adecuado. El filtro expuesto debería de ser un buen punto de partida. |
| |
Once you have zeroed in on some possible packets then you can use the following display filter to focus on a particular client: | Una vez que tengas localizados los paquetes, puedes usar otro filtro para reducir la búsqueda a un cliente específico: |
(wlan.bssid == 00:14:6c:7e:40:80 and (frame.pkt_len>=68 and frame.pkt_len<=86) and (wlan.da == ff:ff:ff:ff:ff:ff or wlan.sa == 00:0f:b5:46:11:19)) | (wlan.bssid == 00:14:6c:7e:40:80 and (frame.pkt_len>=68 and frame.pkt_len le 86) and (wlan.da == ff:ff:ff:ff:ff:ff or wlan.sa == 00:0f:b5:46:11:19)) |
| |
Change the wlan.sa value to the particular client you are targeting. Change the frame packet length values to narrow it down if you need to. | Cambia el valor de "wlan.sa" por el de tu cliente que quieres atacar. Cambia la longitud del paquete para reducir las posibilidades si ves que es necesario. |
| |
In simple terms, we are looking for an ARP request and the subsequent reply. The attached file aprcapture-01.cap has some real examples. You can use the filters above on this file. | Resumiendo, estamos buscando un "ARP request" y la subsecuente respuesta. El archivo que puedes descargar "aprcapture-01.cap" tiene ejemplos reales. Puedes usar los filtros mencionados en este archivo. |
| |
Here is a summary of what the packets are. The numbers are the packets starting at one. If you view the [[http://download.aircrack-ng.org/wiki-files/other/arpcapture-01.cap| sample arp file]] via WireShark then the numbers will match the following: | Aquí ponemos un resumen de que paquetes se trata. Los paquetes están númerados desde el primero al último por orden. Si le echas un vistazo a el [[http://download.aircrack-ng.org/wiki-files/other/arpcapture-01.cap| archivo arp de ejemplo]] con WireShark verás los siguientes números de paquete: |
| |
* 391 - This is an arp request from a wired workstation to our client being broadcast by the AP. It never gets answered and must have got lost. | * 391 - Este es un "arp request" de un cliente cableado a otro que está siendo retransmitido (broadcast) por el AP. Este paquete nunca ha sido contestado por lo que debe haberse perdido. |
* 416 - The AP broadcasts the arp request received from the wired workstation. This is a repeat arp request via the AP since the first one (391) was never answered. | * 416 - Este es un nuevo "arp request" porque el primero (391) no ha sido contestado. |
* 417 - The client sends an arp response via the AP to the wired workstation. Notice the short time period between the request and response. | * 417 - Esta es la respuesta. El cliente envia un "arp response" al cliente cableado a través del AP. Presta atención al corto periodo de tiempo entre el "arp request" y el "arp response". |
* 501 - A wireless workstation sends an arp request to the client via the AP. This packet is really a request to the AP to broadcast the arp request. | * 501 - Un cliente wireless envia un "arp request" a otro a través del AP. Este paquete es una petición al AP para que reenvie el "arp request" a otro cliente. |
* 503 - The AP broadcasts the arp request to all the wireless clients. | * 503 - El AP reenvia el "arp request" a todos los clientes wireless. |
* 504 - The client sends an arp response to wireless workstation via the AP. This packet is really a request to the AP to send the arp response to the wireless workstation | * 504 - El cliente envia la respuesta o "arp response" a la otra tarjeta wireless a través del AP. Este paquete es realmente una petición al AP para que envie la respuesta "arp response" a la estación wireless |
* 506 - This is the ARP response being retransmitted from the AP to the wireless workstation. | * 506 - Este es el "ARP response" retransmitido desde el AP al cliente wireless. |
| |
The two possible packets to use are 416 or 503. You can try both. Number 503 is better since it will generate two data packets for each one you inject. The two being the reply from the client to the AP and the AP to the wireless workstation. Basically you double your data capture rate. People are always asking how to increase the injection rate, this one technique. | Los dos posibles paquetes que podemos usar son 416 o 503. Puedes escoger cualquiera de los dos. El 503 es mejor puesto que genera dos paquetes por cada uno que nosostros inyectemos: La respuesta del cliente al AP y la del AP al cliente wireless. Básicamente doblarás la velocidad (rate) de inyección. Para la gente que pregunta como incrementar la velocidad de inyección, esta es una técnica. |
| |
Once you have found one or more of these pairs then right-click the packets going to the client that you want within Wireshark and "mark" them. Then click "save as" and select "marked" to be saved as dsarprequests.cap or whatever file name you want. Now you hopefully have a file with ARP requests going to a specific client. | Una vez que has encontrado uno o mas de estos paquetes haz click derecho y márcalo (Mark packet). Despues vas al menu "File" y haz click en "save as" y selecciona "marked packets only" para gravar el paquete con un nombre como por ejemplo "dsarprequests.cap" u otro nombre que quieras tu. Ahora tienes un archivo con un "ARP requests". |
| |
Remember that the packets selected are not guaranteed to work. They are just very likely candidates based on observation. You may need to try a few to get things to work. | Recuerda que no tenemos garantizado totalmente que el paquete seleccionado funcione. Solo es un candidato seleccionado basado en nuestra observación. Puede que necesites probar un poco con otros paquetes para conseguir que funcione. |
| |
Restart your packet capture if it not still going: | Reinicia la captura de paquetes si todavía no está funcionando: |
| |
airodump-ng --channel 9 --bssid 00:14:6C:7E:40:80 --ivs -w aprcapture ath0 | airodump-ng --channel 9 --bssid 00:14:6C:7E:40:80 -w aprcapture ath0 |
| |
Now use interactive replay in a second separate session: | Cerciórate de que no usas la opción "- -ivs" si quieres utilizar más adelante el método PTW con aircrack-ng (aircrack-ng -z). El método PTW requiere los paquetes enteros y solo funciona con ARPs. Ahora usa el ataque de inyección interactivo en otra consola: |
| |
aireplay-ng -2 -r dsarprequests.cap ath0 | aireplay-ng -2 -r dsarprequests.cap ath0 |
| |
You are now sending the ARP requests from your PC to the client directly, not through the access point. The client will send an ARP replay for each request. Now your data packets start zooming up. Start aircrack-ng (aircrack-ng arpcapture*.ivs) in a third session and determine the key! Success! | De esta forma estás enviando el "ARP requests" desde tu PC al cliente directamente, y no a través del punto de acceso. El cliente enviará una respuesta "ARP replay" por cada "arp request". Ahora tus paquetes de datos comenzarán a crecer espectacularmente. Inicia aircrack-ng (aircrack-ng arpcapture*.ivs) en una tercera consola y obtendrás la clave wep. Felicidades! |
| |
| |
===Scenario Two - Interactively pulling packets from live communication=== | ===Escenario Dos - Empleo interactivo de paquetes en tiempo real=== |
| |
In this scenario we are going do the capture and injection in real time. | En este escenario vamos a hacer la captura y la inyección al mismo tiempo. |
| |
First, start capturing packets going to/from the access point in question. To reduce the clutter, use a BSSID filter for the particular Access Point you are targeting and the specific channel. In our example: | Primero, comienza a capturar paquetes que emite o recibe el punto de acceso en cuestión. Para reducir el tamaño del archivo, usa el filtro de BSSID y especifica el canal. En nuestro ejemplo: |
| |
airodump-ng --channel 9 --bssid 00:14:6C:7E:40:80 --ivs -w aprcapture ath0 | airodump-ng --channel 9 --bssid 00:14:6C:7E:40:80 --ivs -w aprcapture ath0 |
| |
Now start a separate second session to interactively capture and replay packets: | Ahora abre una segunda consola para iniciar la inyección interactiva: |
| |
aireplay-ng -2 -b 00:14:6C:7E:40:80 -d FF:FF:FF:FF:FF:FF -f 1 -m 68 -n 86 ath0 | aireplay-ng -2 -b 00:14:6C:7E:40:80 -d FF:FF:FF:FF:FF:FF -f 1 -m 68 -n 86 ath0 |
| |
You will have to change "-b" to the MAC address of the access point in question. Plus the minimum "-m" and maximum "-n" packet lengths may have to be tweaked based on origin of the packets and local environment. Typically minimum of 68 and maximum of 86. Some experimentation may be necessary. | Tendrás que cambiar "-b" por la dirección MAC del punto de acceso deseado. Añade el tamamño mínimo "-m" y máximo "-n" del paquete. Lo habitual es poner un mínimo de 68 y un máximo de 86. No está de mas experimentar con otros valores. |
| |
The characteristics of the packet we are trying to select is: | Las características del paquete que estamos buscando son: |
* BSSID: access point | * BSSID: punto de acceso |
* Destination MAC: Broadcast (FF:FF:FF:FF:FF:FF) | * Dirección MAC de destino: Broadcast (FF:FF:FF:FF:FF:FF) |
* Source MAC: anything | * Dirección MAC de origen (Source MAC): cualquiera |
* Direction: from Access Point | * Dirección: desde el punto de acceso |
* Packet length: 68 or 86 (68 is typical for arp packets originating from wireless clients. 86 is typical for arp requests from wired clients.) | * Tamaño del paquete (Size): 68 o 86 (68 es lo habitual para paquetes arp originados por clientes wireless. 86 es habitual para "arp requests" de clientes cableados.) |
| |
Here is why we use the other values: | Las otras opciones que añadimos al comando son: |
* -d ff:ff:ff:ff:ff:ff (means only select packets which are Broadcast) | * -d ff:ff:ff:ff:ff:ff (significa que solo nos enseñe paquetes "Broadcast") |
* -f 1 (means only select packets which are coming from the access point) | * -f 1 (significa que solo nos enseñe paquetes que salen del punto de acceso) |
| |
Here is an example of a packet we would select: | Aquí ponemos un ejemplode un paquete que deberíamos seleccionar: |
| |
Read 210 packets... | Read 210 packets... |
Use this packet ? | Use this packet ? |
| |
Remember, you may need to try a few packets to get it work. The ARP must be for a wireless client. Once you are successfully injecting packets, start aircrack-ng to determine the WEP key. | Recuerda que necesitarás probar algunos paquetes para conseguir que funcione. El ARP debe ser de un cliente wireless. Una vez que estes inyectando paquetes y tengas suficientes, inicia aircrack-ng para obtener la clave WEP. |
| |
=== Scenario Three - Creating a packet from a chopchop replay attack === | === Escenario Tres - Creando un paquete de un ataque chopchop === |
| |
We first need to generate the xor file. This file gives us the ability to create new encrypted packets for injection. | Primero necesitamos generar el archivo xor. Este archivo nos da la posibilidad de crear nuevos paquetes encriptados para inyectarlos. |
| |
You run the following command and select a packet which is a decent size. It has to be larger then the ARP packet we want to create. So pick something like 86 or more bytes. As well we need to determine the IP address of the wireless workstation we are targeting. So pick a packet with a source or destination MAC address of the workstation. The reason for this is will later use tcpdump to look at the decrypted packet and obtain the IP address. | Puedes ejecutar el siguiente comando y seleccionar un paquete de un tamaño adecuado. Tiene que ser mayor que el paquete ARP que queremos crear. Por lo tanto elige algo como 86 o mas bytes. Tambien necesitamos determinar la dirección IP que está usando. por lo tanto elige un paquete con origen o destino la dirección MAC de la estación wireless. La razón de esto es que despues usaremos tcpdump para mirar los paquetes desencriptados y obtener la dirección. |
| |
Run "aireplay-ng -4 ath0 -h 00:0F:B5:46:11:19". | Run "aireplay-ng -4 ath0 -h 00:0F:B5:46:11:19". |
| |
Change the -h to be the MAC address of a client assocated with the AP. You can also do a fake association and use this MAC. It is just simply easier to use a MAC already associated with the AP. | Cambia -h por la dirección MAC del cliente asociado con el AP. Puedes tambien hacer una falsa autenticación y usar esta MAC. Es solo porque es más simple usar una MAC ya asociada al AP. |
| |
Although this example is an arp request, as mentioned above, you should try to pick a packet to or from the workstation. Here is example output: | Aunque este ejemplo es de un "arp request", como mencionamos anteriormente , deberías probar a capturar un paquete con origen o destino la tarjeta wireless. Aquí está la salida del ejemplo: |
| |
Size: 86, FromDS: 1, ToDS: 0 (WEP) | Size: 86, FromDS: 1, ToDS: 0 (WEP) |
Completed in 22s (2.18 bytes/s) | Completed in 22s (2.18 bytes/s) |
| |
So look at the decrypted packet with Wireshark or tcpdump to get the IP information you need. See below for an example. In this case, we are ultra lucky and get the IP of the target wireless workstation. You may have to try a few packets to get the IP of wireless workstation. | Despues mira el paquete desencriptado con Wireshark o tcpdump para conseguir la información sobre la IP que necesitamos. Si no sabes como hacerlo, mira el ejemplo a continuación. En este caso, hemos tenido suerte y conseguimos la IP del cliente wireless. Puede que tengas que probar unos cuantos paquetes para conseguir la IP del cliente wireless. |
| |
tcpdump -n -vvv -e -s0 -r replay_dec-1231-133021.cap | tcpdump -n -vvv -e -s0 -r replay_dec-1231-133021.cap |
13:30:21.150772 0us DA:Broadcast BSSID:00:14:6c:7e:40:80 SA:00:40:f4:77:f0:9b LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03: oui Ethernet (0x000000), ethertype ARP (0x0806): arp who-has 192.168.55.109 tell 192.168.55.51 | 13:30:21.150772 0us DA:Broadcast BSSID:00:14:6c:7e:40:80 SA:00:40:f4:77:f0:9b LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03: oui Ethernet (0x000000), ethertype ARP (0x0806): arp who-has 192.168.55.109 tell 192.168.55.51 |
| |
Now we have the wireless workstation IP and use the xor file above to create an ARP packet. Be absolutely sure to include the -j and -o switches below. | Ahora tenemos la IP del cliente wireless y podemos usar el archivo xor para crear un paquete ARP. Asegurate completamente de que incluyes las opciones -j y -o. |
| |
However, So if you are using 0.7.0 (svn test version) then the correct command is: | Como estás usando la versión 0.9 entonces el comando adecuado es: |
| |
packetforge-ng --arp -a 00:14:6C:7E:40:80 -c 00:0F:B5:46:11:19 -h 00:40:F4:77:F0:9B -j -o -l 192.168.55.109 -k 192.168.55.51 -y replay_dec-1231-133021.xor -w arpforge.cap | packetforge-ng --arp -a 00:14:6C:7E:40:80 -c 00:0F:B5:46:11:19 -h 00:40:F4:77:F0:9B -j -o -l 192.168.55.109 -k 192.168.55.51 -y replay_dec-1231-133021.xor -w arpforge.cap |
| |
* -a 00:14:6C:7E:40:80 access point MAC address | * -a 00:14:6C:7E:40:80 dirección MAC del punto de acceso |
* -c 00:0F:B5:46:11:19 MAC address of the target wireless workstation | * -c 00:0F:B5:46:11:19 dirección MAC del cliente wireless |
* -h 00:40:F4:77:F0:9B MAC address from a workstation on the ethernet. You can make up a MAC address if you don't know a valid one. | * -h 00:40:F4:77:F0:9B dirección MAC de un cliente ethernet. Puedes falsificar la dirección MAC si no conoces una válida. |
* -l 192.168.55.109 | * -l 192.168.55.109 |
* -k 192.168.55.51 | * -k 192.168.55.51 |
* -y replay_dec-1231-133021.xor | * -y replay_dec-1231-133021.xor |
* -j set FromDS bit | * -j fija el bit de "FromDS" |
* -o clear ToDS bit | * -o elimina el bit de "ToDS" |
| |
The command example below is correct for version 0.6.2 for what we want to do. There was a bug in version 0.6.2 where by -k and -l parameters were reversed. | Este comando es correcto para la versión 0.6.2. Había un bug en la versión 0.6.2 que consistia en que las opciones -k y -l estaban intercambiadas. |
| |
packetforge-ng --arp -a 00:14:6C:7E:40:80 -c 00:0F:B5:46:11:19 -h 00:40:F4:77:F0:9B -j -o -k 192.168.55.109 -l 192.168.55.51 -y replay_dec-1231-133021.xor -w arpforge.cap | packetforge-ng --arp -a 00:14:6C:7E:40:80 -c 00:0F:B5:46:11:19 -h 00:40:F4:77:F0:9B -j -o -k 192.168.55.109 -l 192.168.55.51 -y replay_dec-1231-133021.xor -w arpforge.cap |
| |
After creating the packet, use tcpdump to review it from a sanity point of view. See below. It looks good! | Despues de crear el paquete, usa tcpdump para revisarlo. Mira a continuación, parece que está correcto! |
| |
tcpdump -n -vvv -e -s0 -r arpforge.cap | tcpdump -n -vvv -e -s0 -r arpforge.cap |
13:32:06.523444 WEP Encrypted 258us DA:Broadcast BSSID:00:14:6c:7e:40:80 SA:00:40:f4:77:f0:9b Data IV:162 Pad 0 KeyID 0 | 13:32:06.523444 WEP Encrypted 258us DA:Broadcast BSSID:00:14:6c:7e:40:80 SA:00:40:f4:77:f0:9b Data IV:162 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. | Como estás probando con tu propio AP (si no es así NO CONTINUES), desencripta el paquete y asegurate de que es correcto. Este paso no es necesario, solo sirve para comprobar por ti mismo que has generado el paquete correcto. |
| |
Decrypt the packet: airdecap-ng -e teddy -w <put your WEP key here> arpforge.cap | Desencripta el paquete con: airdecap-ng -e teddy -w <put your WEP key here> arpforge.cap |
View the decrypted packet: tcpdump -n -r arpforge-dec.cap | Echale un vistazo al paquete desencriptado: tcpdump -n -r arpforge-dec.cap |
It should be something like: | Debería aparecer algo como esto: |
reading from file arpforge-dec.cap, link-type EN10MB (Ethernet) | reading from file arpforge-dec.cap, link-type EN10MB (Ethernet) |
16:44:53.673597 arp who-has 192.168.55.51 tell 192.168.55.109 | 16:44:53.673597 arp who-has 192.168.55.51 tell 192.168.55.109 |
| |
This is good since we know our client is 192.168.55.109 and we wanted an arp request addressed to the client. | Parece que está bien, ya que sabemos que nuestro cliente tiene la IP 192.168.55.109 y queremos capturar un "arp request" con destino ese cliente. |
| |
Now inject the packet: | Por lo tanto, ahora inyectamos el paquete: |
| |
aireplay-ng -2 -r arpforge.cap ath0 | aireplay-ng -2 -r arpforge.cap ath0 |
| |
At this point, you should be generating data packets via the wireless workstation and can use aircrack-ng in the normal manner to crack the WEP key. | En este punto, debeías ser capaz de generar paquetes de datos para usarlos con aircrack-ng y obtener la clave WEP. |
| |
| |
===Scenario Four: Creating a packet from a fragmentation attack=== | ===Escenario Cuatro: Creando un paquete de un ataque de fragmentación=== |
| |
The fragmentation replay attack is basically the same as chopchop. The key difference is that the fragmentation attack is used to obtain the xor file instead of the chopchop technique. | El ataque de fragmentación es básicamente lo mismo que el chopchop. La única diferencia es que usamos el ataque de fragmentación para obtener el archivo xor en lugar de la técnica chopchop. |
| |
First, you either have to use a MAC address from a client which is already associated with the AP or do fake authentication. | Primero, necesitas usar la dirección MAC de un cliente asociado al AP o hacer una autenticación falsa. |
| |
One of the challenges is determining what IP to use in the "aireplay-ng -5" command since in theory you don't know the IP range in use on the wireless network. There are a couple of strategies that could be used. Based on the wireless access point, a good guess is the default address range for the make/model. Very few people change the default addresses. Another is to see if internal IPs leak via web servers/pages, e-mail headers, etc. You need to be innovative. | Uno de los desafios es determinar que IP usamos en el comando "aireplay-ng -5" porque en teoría no sabemos el rango de IPs usadas en la red wireless. Para esto hay un par de estrategias que podríamos usar. Una primera buena idea es usar una IP del rango con el que por defecto viene configurado ese AP de fábrica. Muy poca gente cambia las direcciones IPs por defecto. Otra alternativa es mirar si podemos obtener la IP interna del AP a través de alguna vulnerabilidad a través de servidores web, páginas web, cabeceras de e-mail, etc... |
| |
Having said that, there is a trick which works on most APs. Just use an IP of 255.255.255.255. By default, aireplay-ng uses 255.255.255.255 for both the source and destination IPs. | Sobra decir, que hay un truco que funciona en la mayoría de los APs. Usa una IP 255.255.255.255. Por defecto, aireplay-ng usa 255.255.255.255 para ambas IPs de origen y de destino. |
| |
There are some hardware constraints for the fragmentation attack: | Hay algunos problemas de hardware con el ataque de fragmentación: |
* It does not support prism chipsets | * No está soportado por los chipsets prism |
* Atheros chipsets: The MAC address of the card MUST be the same as source MAC address of the packets you are generating. Use your favourite method to change the MAC of your card. | * Chipsets Atheros: La dirección MAC de la tarjeta debe ser la misma que la dirección MAC origen de los paquetes que estás generando. Usa tu método favorito para cambiar la MAC de tu tarjeta atheros. |
* It does work smoothly with ralink and realtek chipsets. | * Funciona muy bien con los chipsets ralink y realtek. |
* Keep an eye on the forms for more compatibility information. | * Echale un vistazo a los foros para más información sobre compatibilidad. |
| |
Here is the command to run: | Aquí está el comando a ejecutar: |
| |
aireplay-ng -5 -b 00:14:6C:7E:40:80 -h 00:0F:B5:46:11:19 ath0 | aireplay-ng -5 -b 00:14:6C:7E:40:80 -h 00:0F:B5:46:11:19 ath0 |
Use this packet ? | Use this packet ? |
| |
You answer "y" and then the fragmentation attack starts. Here is the output. Sometimes you need to try multiple packets to be successful. | Contesta "y" y comenzará el ataque de fragmentación. Aquí está la salida. Algunas veces necesitarás probar varios paquetes para tener éxito. |
| |
Saving chosen packet in replay_src-0113-170504.cap | Saving chosen packet in replay_src-0113-170504.cap |
Now you can build a packet with packetforge-ng out of that 1500 bytes keystream | Now you can build a packet with packetforge-ng out of that 1500 bytes keystream |
| |
Bingo! The file **fragment-0113-170526.xor** contains the xor file to then generate your arp packet for replay. | Bingo! El archivo **fragment-0113-170526.xor** es el archivo xor con el que podremos generar el paquete arp para inyectar. |
| |
From here, it is identical to the chopchop approach. The big challenge is knowing the IP addresses to use. As mentioned above, you need to be innovative. | A partir de aquí el proceso es idéntico al del ataque chopchop. El gran problema es conocer la dirección IP para usarla. Como mencionamos antes hay varias posibilidades, hay que investigarlas. |
| |
| |
| |
=====Change Log ===== | |
| |
January 22/2007 v1.10: | |
* Updated to reflect the release of aircrack-ng v0.7 | |
\\ | |
January 13/2007 v1.01 | |
* Corrected typos. | |
* Reworked arp examples with more specifics and sample capture. Also reflected research into typical packet sizes. | |
* Rewrote parts of the tutorial to make it clearer. | |
* Section on fragmentation attack updated to reflect the current program functionality. | |
\\ | |
January 1/2007 v1.00 | |
* Initial Release | |