User Tools

Site Tools


cracking_wpa

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
cracking_wpa [2009/09/25 16:48] – Fixed typos darkaudaxcracking_wpa [2010/08/29 19:44] – Fixed channel/frequency graph link mister_x
Line 1: Line 1:
 ====== Tutorial: How to Crack WPA/WPA2 ====== ====== Tutorial: How to Crack WPA/WPA2 ======
-Version: 1.17 September 252009\\+Version: 1.20 March 072010\\
 By: darkAudax By: darkAudax
  
Line 15: Line 15:
  
 The impact of having to use a brute force approach is substantial.  Because it is very compute intensive, a computer can only test 50 to 300 possible keys per second depending on the computer CPU.  It can take hours, if not days, to crunch through a large dictionary.  If you are thinking about generating your own password list to cover all the permutations and combinations of characters and special symbols, check out this [[http://lastbit.com/pswcalc.asp|brute force time calculator]] first.  You will be very surprised at how much time is required. The impact of having to use a brute force approach is substantial.  Because it is very compute intensive, a computer can only test 50 to 300 possible keys per second depending on the computer CPU.  It can take hours, if not days, to crunch through a large dictionary.  If you are thinking about generating your own password list to cover all the permutations and combinations of characters and special symbols, check out this [[http://lastbit.com/pswcalc.asp|brute force time calculator]] first.  You will be very surprised at how much time is required.
 +
 +**IMPORTANT** This means that the passphrase must be contained in the dictionary you are using to break WPA/WPA2.  If it is not in the dictionary then aircrack-ng will be unable to determine the key.
  
 There is no difference between cracking WPA or WPA2 networks.  The authentication methodology is basically the same between them.  So the techniques you use are identical. There is no difference between cracking WPA or WPA2 networks.  The authentication methodology is basically the same between them.  So the techniques you use are identical.
Line 35: Line 37:
  
 ===== Equipment used ===== ===== Equipment used =====
- 
-To follow this tutorial at home, you must have two wireless cards. 
  
 In this tutorial, here is what was used: In this tutorial, here is what was used:
Line 67: Line 67:
 ==== Step 1 - Start the wireless interface in monitor mode ==== ==== Step 1 - Start the wireless interface in monitor mode ====
  
-The purpose of this step is to put your card into what is called monitor mode.  Monitor mode is the mode whereby your card can listen to every packet in the air.  Normally your card will only "hear" packets addressed to you.  By hearing every packet, we can later capture the WPA/WPA2 4-way handshake.  As well, it will allow us to optionally deauthenticate a wireless client in a later step. These steps are mostly specific to the madwifi-ng driver - for other driversthis procedure varies(Most commonlyrunning the command "airmon-ng start <interface>is used to set up monitor mode.)+The purpose of this step is to put your card into what is called monitor mode.  Monitor mode is the mode whereby your card can listen to every packet in the air.  Normally your card will only "hear" packets addressed to you.  By hearing every packet, we can later capture the WPA/WPA2 4-way handshake.  As well, it will allow us to optionally deauthenticate a wireless client in a later step. 
 + 
 +The exact procedure for enabling monitor mode varies depending on the driver you are using. To determine the driver (and the correct procedure to follow), run the following command: 
 + 
 +   airmon-ng 
 + 
 +On a machine with a Ralink, an Atheros and a Broadcom wireless card installed, the system responds: 
 + 
 +   Interface       Chipset         Driver 
 +    
 +   rausb0          Ralink RT73     rt73 
 +   wlan0           Broadcom        b43 - [phy0] 
 +   wifi0           Atheros         madwifi-ng 
 +   ath0            Atheros         madwifi-ng VAP (parent: wifi0) 
 + 
 +The presence of a [phy0] tag at the end of the driver name is an indicator for mac80211so the Broadcom card is using a mac80211 driver**Note that mac80211 is supported only since aircrack-ng v1.0-rc1and it won't work with v0.9.1.** 
 +Both entries of the Atheros card show "madwifi-ng" as the driver - follow the madwifi-ng-specific steps to set up the Atheros card. 
 +Finally, the Ralink shows neither of these indicators, so it is using an ieee80211 driver - see the generic instructions for setting it up. 
 + 
 +=== Step 1a - Setting up madwifi-ng ===
  
  
Line 128: Line 147:
 In the response above, you can see that ath0 is in monitor mode, on the 2.452GHz frequency which is channel 9 and the Access Point shows the MAC address of your wireless card.  Only the madwifi-ng drivers show the card MAC address in the AP field, other drivers do not.  So everything is good.   It is important to confirm all this information prior to proceeding, otherwise the following steps will not work properly. In the response above, you can see that ath0 is in monitor mode, on the 2.452GHz frequency which is channel 9 and the Access Point shows the MAC address of your wireless card.  Only the madwifi-ng drivers show the card MAC address in the AP field, other drivers do not.  So everything is good.   It is important to confirm all this information prior to proceeding, otherwise the following steps will not work properly.
  
-To match the frequency to the channel, check out: +To match the frequency to the channel, check out: http://www.cisco.com/en/US/docs/wireless/technology/channel/deployment/guide/Channel.html#wp134132 .  This will give you the frequency for each channel. 
-http://www.rflinx.com/help/calculations/#2.4ghz_wifi_channels then select the "Wifi Channel Selection and Channel Overlap" tab.  This will give you the frequency for each channel.+ 
 +=== Step 1b - Setting up mac80211 drivers === 
 + 
 +Unlike madwifi-ng, you do not need to remove the wlan0 interface when setting up mac80211 drivers. Instead, use the following command to set up your card in monitor mode on channel 9: 
 + 
 +   airmon-ng start wlan0 9 
 + 
 +The system responds: 
 + 
 +   Interface       Chipset         Driver 
 +    
 +   wlan0           Broadcom        b43 - [phy0] 
 +                                   (monitor mode enabled on mon0) 
 + 
 +Notice that airmon-ng enabled monitor-mode //on mon0//. So, the correct interface name to use in later parts of the tutorial is mon0. Wlan0 is still in regular (managed) mode, and can be used as usual, provided that the AP that wlan0 is connected to is on the same channel as the AP you are attacking, and you are not performing any channel-hopping. 
 + 
 +To confirm successful setup, run "iwconfig". The following output should appear: 
 + 
 +   lo        no wireless extensions. 
 + 
 +   eth0      no wireless extensions. 
 +    
 +   wmaster0  no wireless extensions. 
 +    
 +   wlan0     IEEE 802.11bg  ESSID:"" 
 +             Mode:Managed  Frequency:2.452 GHz  Access Point: Not-Associated 
 +             Tx-Power=0 dBm 
 +             Retry min limit:  RTS thr:off   Fragment thr=2352 B 
 +             Encryption key:off 
 +             Power Management:off 
 +             Link Quality: Signal level: Noise level:0 
 +             Rx invalid nwid: Rx invalid crypt: Rx invalid frag:0 
 +             Tx excessive retries: Invalid misc:  Missed beacon:0 
 +    
 +   mon0      IEEE 802.11bg  Mode:Monitor  Frequency:2.452 GHz  Tx-Power=0 dBm 
 +             Retry min limit:  RTS thr:off   Fragment thr=2352 B 
 +             Encryption key:off 
 +             Power Management:off 
 +             Link Quality: Signal level: Noise level:0 
 +             Rx invalid nwid: Rx invalid crypt: Rx invalid frag:0 
 +             Tx excessive retries: Invalid misc:  Missed beacon:0 
 + 
 + 
 +Here, mon0 is seen as being in monitor mode, on channel 9 (2.452GHz). Unlike madwifi-ng, the monitor interface has no Access Point field at all. Also notice that wlan0 is still present, and in managed mode - this is normal. Because both interfaces share a common radio, they must always be tuned to the same channel - changing the channel on one interface also changes channel on the other one. 
 + 
 +=== Step 1c - Setting up other drivers === 
 + 
 +For other (ieee80211-based) drivers, simply run the following command to enable monitor mode (replace rausb0 with your interface name): 
 + 
 +   airmon-ng start rausb0 9 
 + 
 +The system responds: 
 + 
 +   Interface       Chipset         Driver 
 +    
 +   rausb0          Ralink          rt73 (monitor mode enabled)
  
 +At this point, the interface should be ready to use.
  
 ==== Step 2 - Start airodump-ng to collect authentication handshake ==== ==== Step 2 - Start airodump-ng to collect authentication handshake ====
Line 179: Line 254:
 To see if you captured any handshake packets, there are two ways.  Watch the airodump-ng screen for " WPA handshake: 00:14:6C:7E:40:80" in the top right-hand corner.  This means a four-way handshake was successfully captured.  See just above for an example screenshot. To see if you captured any handshake packets, there are two ways.  Watch the airodump-ng screen for " WPA handshake: 00:14:6C:7E:40:80" in the top right-hand corner.  This means a four-way handshake was successfully captured.  See just above for an example screenshot.
  
-use Wireshark and apply a filter of "eapol" This displays only eapol packets you are interested in.  Thus you can see if capture contains 0,1,2,3 or 4 eapol packets.+Use Wireshark and apply a filter of "eapol" This displays only eapol packets you are interested in.  Thus you can see if capture contains 0,1,2,3 or 4 eapol packets.
  
  
 ==== Step 3 - Use aireplay-ng to deauthenticate the wireless client ==== ==== Step 3 - Use aireplay-ng to deauthenticate the wireless client ====
  
-This step is optional.  You only perform this step if you opted to actively speed up the process.  The other constraint is that there must be a wireless client currently associated with the AP.  If there is no wireless client currently associated with the AP, then move onto the next step and be patient.  Needless to say, if a wireless client shows up later, you can backtrack and perform this step.+This step is optional.  If you are patient, you can wait until airodump-ng captures a handshake when one or more clients connect to the AP.  You only perform this step if you opted to actively speed up the process.  The other constraint is that there must be a wireless client currently associated with the AP.  If there is no wireless client currently associated with the AP, then you have to be patient and wait for one to connect to the AP so that a handshake can be captured.  Needless to say, if a wireless client shows up later and airodump-ng did not capture the handshake, you can backtrack and perform this step.
  
 This step sends a message to the wireless client saying that that it is no longer associated with the AP.  The wireless client will then hopefully reauthenticate with the AP.  The reauthentication is what generates the 4-way authentication handshake we are interested in collecting.  This is what we use to break the WPA/WPA2 pre-shared key. This step sends a message to the wireless client saying that that it is no longer associated with the AP.  The wireless client will then hopefully reauthenticate with the AP.  The reauthentication is what generates the 4-way authentication handshake we are interested in collecting.  This is what we use to break the WPA/WPA2 pre-shared key.
cracking_wpa.txt · Last modified: 2022/01/02 21:34 by mister_x