You are on page 1of 4

3/9/13

wpa_migration_mode [Aircrack-ng]

Aircrack-ng
wpa_migration_mode

Tutorial: How to crack WPA Migration Mode?


Version: 1.0 August 11, 2010 By: Leandro Meiners and Diego Sor

Introduction
This tutorial walks you through cracking WPA Migration Mode. It assumes you have a working wireless card with drivers already patched for injection. WPA Migration Mode is a configuration setting supported by Cisco Aironet access points (IOS Releases 12.2(11)JA and later), which enables both WPA and WEP clients to associate to an access point using the same Service Set Identifier (SSID). For a comprehensive analysis about how WPA Migration Mode works and the technical details of the attacks, see the presentation and whitepaper WPA Migration Mode: WEP is back to haunt you at http://corelabs.coresecurity.com/index.php?module=Wiki&action=view&type=publication&name=WPA_MIGRATION_MODE [http://corelabs.coresecurity.com/index.php?module=Wiki&action=view&type=publication&name=WPA_MIGRATION_MODE]. It is recommended that you experiment with your home wireless access point to get familiar with these ideas and techniques. If you do not own a particular access point, please remember to get permission from the owner prior to playing with it. I would like to acknowledge and thank the Aircrack-ng team [http://trac.aircrack-ng.org/wiki/Team] team for producing such a great robust tool, and darkAudax for writing the tutorials which we used as a basis. Please send me any constructive feedback, positive or negative. Additional troubleshooting ideas and tips are especially welcome.

Assumptions
First, this solution assumes: You are using drivers patched for injection. Use the injection test to confirm your card can inject prior to proceeding. You are physically close enough to send and receive access point packets. Remember that just because you can receive packets from the access point does not mean you will be able to transmit packets to the AP. The wireless card strength is typically less then the AP strength. So you have to be physically close enough for your transmitted packets to reach and be received by the AP. You should confirm that you can communicate with the specific AP by following these instructions. You are using v1.2 of aircrack-ng, as this attack is only supported in this version and later. Ensure all of the above assumptions are true; otherwise the advice that follows will not work. In the examples below, you will need to change wlan0 to the interface name which is specific to your wireless card.

Equipment used
In this tutorial, here is what was used: MAC address of PC running aircrack-ng suite: 00:1f:3c:4e:88:46 BSSID (MAC address of access point): 00:26:0B:2A:BA:40 ESSID (Wireless network name): migrate Access point channel: 8 Wireless interface: wlan0 You should gather the equivalent information for the network you will be working on. Then just change the values in the examples below to the specific network.

Solution
Solution Overview
To crack the WEP key for an access point, we need to gather lots of initialization vectors (IVs). Normal network traffic does not typically generate these IVs very quickly. Theoretically, if you are patient, you can gather sufficient IVs to crack the WEP key by simply listening to the network broadcast traffic (which will be WEP-encapsulated) and saving them. Since none of us are patient, we use a technique called injection to speed up the process. Injection involves having the access point (AP) resend selected packets over and over very rapidly. This allows us to capture a large number of IVs in a short period of time. Once we have captured a large number of IVs, we can use them to determine the WEP key. Here are the basic steps we will be going through: 1. 2. 3. 4. Start the wireless interface in monitor mode on the specific AP channel Start airodump-ng on AP channel with a BSSID filter to collect the new unique IVs Use aireplay-ng to do a fake authentication with the access point Start aireplay-ng in WPA Migration Mode attack mode to inject packets
1/4

www.aircrack-ng.org/doku.php?id=wpa_migration_mode

3/9/13

wpa_migration_mode [Aircrack-ng]

5. Run aircrack-ng to crack key using the IVs collected The following link points to a video of the attack: http://www.youtube.com/watch?v=Zq86oP-dxk4 [http://www.youtube.com/watch?v=Zq86oP-dxk4]

Step 1 - Start the wireless interface in monitor mode on AP channel


The purpose of this step is to put your card into what is called monitor mode. Monitor mode is 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 select some for injection. As well, only (there are some rare exceptions) monitor mode allows you to inject packets. Enter the following command to start the wireless card on channel 8 in monitor mode:
#aro-gsatwa08 imnn tr ln

Substitute the channel number that your AP runs on for 8 in the command above. This is important. You must have your wireless card locked to the AP channel for the following steps in this tutorial to work correctly. The system will respond:
Itrae nefc wa0 ln Cist hpe Itl34AG ne 95B Die rvr il95-[h1 w34 py] (oio md ealdo mn) mntr oe nbe n o0

You will notice that mon0 is reported above as being put into monitor mode. To confirm the interface is properly setup, enter iwconfig.
l o eh t0 wa0 ln n wrls etnin. o iees xesos n wrls etnin. o iees xesos IE 821ag ESDofay EE 0.1b SI:f/n Md:aae Acs Pit NtAscae oeMngd ces on: o-soitd T-oe=5dm xPwr1 B Rty ln lmt7 RStrof Famn trof er og ii: T h:f rget h:f Ecyto kyof nrpin e:f PwrMngmn:f oe aaeetof IE 821ag Md:oio Feuny247Gz T-oe=5dm EE 0.1b oeMntr rqec:.4 H xPwr1 B Rty ln lmt7 RStrof Famn trof er og ii: T h:f rget h:f PwrMngmn:f oe aaeetof

mn o0

In the response above, you can see that mon0 is in monitor mode, on the 2.447GHz frequency which is channel 8 and the Access Point shows the MAC address of your wireless card. Please note that only the madwifi-ng drivers show the MAC address of your wireless card, the other drivers do not do this. 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: http://www.cisco.com/en/US/docs/wireless/technology/channel/deployment/guide/Channel.html#wp134132 [http://www.cisco.com/en/US/docs/wireless/technology/channel/deployment/guide/Channel.html#wp134132] . This will give you the frequency for each channel.

Step 2 - Start airodump-ng to capture the IVs


The purpose of this step is to capture the IVs generated. This step starts airodump-ng to capture the IVs from the specific access point. Open another console session to capture the generated IVs. Then enter:
#ardm-g- 8-bsd0:60:AB:0- otu mn ioupn c -si 02:B2:A4 w upt o0

Where: -c 8 is the channel for the wireless network bssid 00:26:0B:2A:BA:40 is the access point MAC address. This eliminates extraneous traffic. -w capture is file name prefix for the file which will contain the IVs. mon0 is the interface name. While the injection is taking place (later), the screen will look similar to this:
C 8] Easd 3 s] 21-81 1:9 H [ lpe: 6 [ 000-1 21 BSD SI PRRQ Baos W X ecn 39 3 #aa #s C M Dt, / H B 73024 26 03 PR W Rt ae EC CPE AT ESD N IHR UH SI PK mgae S irt

0:60:AB:0 -7 9 02:B2:A4 1 3 BSD SI SAIN TTO

8 5e WA TI 4. P KP

Ls Pces Poe ot akt rbs

0:60:AB:0 0:F3:E8:6 02:B2:A4 01:C4:84 0 0:60:AB:0 0:27:22:E -5 02:B2:A4 00:27:0F 2

2 -1 228 481 4 88 59 0-4 5e 9 0 123 16

Step 3 - Use aireplay-ng to do a fake authentication with the access point


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.
www.aircrack-ng.org/doku.php?id=wpa_migration_mode 2/4

3/9/13

wpa_migration_mode [Aircrack-ng]

The lack of association with the access point is the single biggest reason why injection fails. Remember the golden rule: The MAC you use for injection must be associated with the AP by either using fake authentication or using a MAC from an already-associated client. To associate with an access point, use fake authentication:
#arpa-g- 0- mgae 0:60:AB:0 - 0:f3:e8:6mn ielyn 1 e irt a 02:B2:A4 h 01:c4:84 o0

Where: -1 means fake authentication 0 reassociation timing in seconds -e migrate is the wireless network name -a 00:26:0B:2A:BA:40 is the access point MAC address -h 00:1f:3c:4e:88:46 is our card MAC address mon0 is the wireless interface name Success looks like:
1:74 Wiigfrbao fae(SI:0:60:AB:0 o canl8 22:0 atn o ecn rm BSD 02:B2:A4) n hne 1:74 22:0 1:74 22:0 1:74 22:0 1:74 22:0 SnigAtetcto Rqet(pnSse)[C] edn uhniain eus Oe ytm AK Atetcto scesu uhniain ucsfl SnigAscainRqet[C] edn soito eus AK Ascainscesu :)(I:1 soito ucsfl - AD )

If you get a deauthentication packet, try again. Do not proceed to the next step until you have the fake authentication running correctly.

Step 4 - Start aireplay-ng in WPA Migration Mode attack mode


The purpose of this step is to start aireplay-ng in a mode which attacks Cisco Aironet access points configured in WPA Migration Mode. The program listens for a WEP-encapsulated broadcast ARP packet, bitflips it to make it into an ARP coming from the attacker's MAC address and retransmits it to the access point. This, in turn, causes the access point to repeat the ARP packet with a new IV and also to forward the ARP reply to the attacker with a new IV. The program retransmits the same ARP packet over and over. However, each ARP packet repeated by the access point has a new IV as does the ARP reply forwarded to the attacker by the access point. It is all these new IVs which allow you to determine the WEP key. Again, this is our objective, to obtain a large number of IVs in a short period of time. Open another console session and enter:
#arpa-g- - 0:60:AB:0 - 0:f3:e8:6mn ielyn 8 b 02:B2:A4 h 01:c4:84 o0

It will start listening for ARP requests and when it hears one, aireplay-ng will bitflip it and immediately start to inject it. Here is what the screen looks like when ARP requests are being injected:
1:75 Wiigfrbao fae(SI:0:60:AB:0 o canl8 21:2 atn o ecn rm BSD 02:B2:A4) n hne Svn APrqet i rpa_r-81115.a aig R euss n elyap01-272cp Yusol as satardm-gt cpuerpis o hud lo tr ioupn o atr ele. Rmme t fle tecpuet ol ke WPfae: "sak- 'lnwpi'- cpuecp- otatr.a" eebr o itr h atr o ny ep E rms thr R wa.e.v r atr.a w ucpuecp Ra 386 pces(012AP,7 AK) sn 535pces.(0 ps ed 138 akt 120 Rs 8 Cs, et 91 akt..50 p)

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. Troubleshooting Tips If you receive a message similar to Got a deauth/disassoc packet. Is the source mac associated?, this means you have lost association with the AP. All your injected packets will be ignored. You must return to the fake authentication step (Step 3) and successfully associate with the AP.

Step 5 - 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. Start another console session and enter:
#arrc-g- 1- 0:60:AB:0 icakn a b 02:B2:A4 otu*cp upt.a

Where: - a 1 forces aircrack-ng to detect the access point as a WEP access point. -b 00:26:0B:2A:BA:40 selects the one access point we are interested in. This is optional since when we originally captured the data, we applied a filter to only capture data for this one AP. output*.cap selects all files starting with output and ending in .cap. Here is what success looks like:
Arrc-g12 icakn .

[00:0 Tse 73ky (o 491Is 0:00] etd 6 es gt 78 V) K B dph et bt(oe yevt)

www.aircrack-ng.org/doku.php?id=wpa_migration_mode

3/4

3/9/13
0 1 2 3 4 1 / 3 / 2/ 0 0 / 7 / 3 5 2 1 4

wpa_migration_mode [Aircrack-ng]

E(90)F(62)2(66)5(55)D(55)5(59)7(42)F(42)7(47)8(36)C(30)E(30)E(30 F594 8530 5504 6552 0552 8526 4558 A558 D522 6570 7554 7554 D554 9(67)A(62)6(55)1(54)2(54)3(54)5(54)8(54)6(48)7(48)D(42)6(47)B(47 9556 A530 E552 A500 5500 D500 0500 7500 1574 1574 9558 0522 B522 5(29)5(23)7(23)8(23)C(23)2(28)7(28)7(28)B(28)D(28)4(22)5(22)5(16 1592 F576 C576 F576 5576 3540 6540 7540 5540 D540 7524 C524 3598 B(92)3(75)B(74)5(50)A(50)9(59)E(59)5(48)D(48)6(42)3(47)6(47)4(41 9610 B586 0534 3588 2588 6526 4526 D574 5574 E558 8522 5522 C506 3(67)9(50)4(42)8(42)A(47)0(36)3(36)B(36)F(36)6(30)9(30)1(34)A(34 2556 5588 D558 2558 E522 F570 9570 0570 5570 E554 7554 1528 1528

KYFUD [A:AA:AA:AA:AA:AA:AA ] E ON! AA:AA:AA:AA:AA:AA:A Dcytdcrety 10 erpe orcl: 0%

wpa_migration_mode.txt Last modified: 2010/08/29 19:43 by mister_x

www.aircrack-ng.org/doku.php?id=wpa_migration_mode

4/4

You might also like