Cracking Wifi WPA/WPA2 passwords using pyrit cowpatty in Kali Linux

Cracking Process

We can crack using few different process.

  1. Using Pyrit
  2. Using Cowpatty

Attack a handshake with PMKs from the db using Pyrit

Simple. Just use the following command to start the cracking process.

pyrit -r hs/BigPond_58-98-35-E9-2B-8D.cap attack_db

21-pyrit-attack_db-Cracking-Wifi-WPAWPA2-passwords-using-pyrit-and-cowpatty-blackMORE-Ops

That’s it. It will take few minutes to go through the whole Database Table to get the password if it existed in the Dictionary. As you can see, 159159186.00 PMK‘s per second was the speed and it took less than 1 second to crack it. This is by far the fastest. I also had to blank out much of the screenshot.

Note: I tried it from a different workstation with a NVIDIA GTX460 Graphics card with CUDA and Cpyrit-CUDA installed. Obviously, this was much faster than my Laptop. But either way, this is super fast.

Attack a handshake with passwords from a file or Dictionary using Pyrit

If you don’t want to create Datbase and crunch through Dictionary file directly (much slower), following is what you can do:

pyrit -r hs/BigPond_58-98-35-E9-2B-8D.cap -i /root/wpa.lst attack_passthrough

Speed this way? 7807 PMKs per second. Much slower for my taste.

Crack using Cowpatty

To crack using cowpatty, you need to export in cowpatty format and then start the cracking process.

Export to cowpatty

I hope up to this point, everything went as planned and worked out. From Pyrit, we can push our output to either cowpatty or airolib-ng. All my tests shows that cowpatty is a lot more faster, so I’ll stick with that.

So let’s make our cowpatty file. This is again simple, issue the following command to export your output to cowpatty.

pyrit -e BigPond -o cow.out export_cowpatty

12-pyrit-export-to-cowpatty-Cracking-Wifi-WPAWPA2-passwords-using-pyrit-and-cowpatty-blackMORE-Ops

Let it rip: Crack WPA WPA2 PSK password using cowpatty

Now that we have our cowpatty output, let’s try to crack WPA2/PSK passphrase. Issue the following command to start the cracking process.

cowpatty -d cow.out -s BigPond -r hs/BigPond_58-98-35-E9-2B-8D.cap

13-crack-wpa-wpa2-psk-password-cowpatty-Cracking-Wifi-WPAWPA2-passwords-using-pyrit-and-cowpatty-blackMORE-Ops

Once you type it in, you’ll a bunch of passwords being tried against your hash file. This will keep going until the end of the file. Once a matching password is found in the dictionary file, the cracking process will stop with an output containing the password.

14-cracked-it-wpa-wpa2-psk-password-cowpatty-Cracking-Wifi-WPAWPA2-passwords-using-pyrit-and-cowpatty-blackMORE-Ops

And bingo, it found a matching password. Look at the number of passwords tried in a seconds 164823.00 passphrases/second.

NOTE: cowpatty will fail if your password/dictionary file is larger than 2GB. You’ll have to stick to airolib-ng even though that’s slower.

52 COMMENTS

  1. This is a newbie question, but here goes: if I have two different handshakes from two different ESSID that I want to crack, do I have to run the batch process twice?

  2. hey if u have time please add a tread how to start from Rasberry p ..i want to start with Kali Linux and i don`t know anything have to learn commands and all ill b very thankful if you could do this i come from windows and Kali seems much greater ..i`ll come baq here soon :) mayb u can drop a link if u have time for that thank u for all what u doin to share your knowledge

  3. You state that when using attack_cowpatty we don’t have to batch process. But when I try to do that i get an error, “0 entries written. All done’

    Even if attack_db is much faster, it doesn’t matter because creating the database takes so long. do you only create the db once per wordlist? because otherwise the speed from attack_db or attack_cowpatty doesn’t matter, all that matters is the speed of creating the database, which for me was about 8000/s

    Am I doing something wrong? I don’t understand why you wouldn’t just recommend the attack_cowpatty method if you really can do it w/o creating a batch process to create tables. because of course someone would rather do that at 31 million keys per second than the 15 thousand keys per second you got creating tables.

  4. Hi BlackmoreOps !
    I am new to Kali-Linux, and I find out that most of your posts are very useful for newbie like me. I followed all your steps to install Nvidia driver, pyrit and cpyrit. However, my result comes out poorly with computed just 3681 MPK/ps. I don’t know how to make cpyrit computed around 40,000 MPK/ps. My laptop is Sony vaio VPCF15FM, Nvidia Graphic Card is GT 216 (Getforce: GT 330M)
    Computed 3686.29 PMKs/s total
    #01: CUDA-Device #1: ‘GeForce GT 330M”: 2431.1 PMKs/s (RTT 2.9)
    #02: ‘CPU-Core (SSE2)’: 222.6 PMKs/s (RTT 3.0)
    #03: ‘CPU-Core (SSE2)’: 221.1 PMKs/s (RTT 3.0)
    #04: ‘CPU-Core (SSE2)’: 224.2 PMKs/s (RTT 3.0)
    #05: ‘CPU-Core (SSE2)’: 221.4 PMKs/s (RTT 2.9)
    #06: ‘CPU-Core (SSE2)’: 222.4 PMKs/s (RTT 3.0)
    #07: ‘CPU-Core (SSE2)’: 221.3 PMKs/s (RTT 3.0)
    #08: ‘CPU-Core (SSE2)’: 224.3 PMKs/s (RTT 3.0)
    It is very slow compared to your result. Can you tell me what is wrong with it, please. Thank you buddy.

    • I’m having the same exact issue. I have a Sony Vaio F Series : VPCF226FM it has Nvida GeForce with CUDA. Followed all installation steps but it does not seem to be offloading processing to the graphics card. Do you know of any troubleshooting steps I could follow to figure out why and resolve the issue.

      • did you use the version of pyrit from the repository
        svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn

        download that and

        cd ~/pyrit_svn/pyrit
        ./setup.py build install.

        instead of going int the ../cpyrit_callpp folder go into../cpyrit_opencl
        ./setup.py build install

        when done…

        pyrit list _cores

        see how you go.

    • The CPU on a good graphics card can compute the encessary hashes faster than the CPU of motherboard can. so with the proprietary NVIDA or AMD drivers loaded, processing can be offloaded to the Graphics card.

  5. i have 2 diffrent handshake, can I just add the essid of the other hand shake into the databse and tun the batch once? Ihave 112gb of wordlist to import and right now im on the 24th hour of importing if I batch this twice maybe I have to wait for a weej to crack that AP. Its a 8-10 digit password.0-9 diffrwnt combination can you crack this hand shake in your DB?

  6. Thank you for this tremendous documentation. Just to let you know there is a typo on the command concerning Import Dictionary in Pyrit.
    It should be: pyrit -I wpa.lst import_passwords as shown in the screen captured I.e without /root/cudacapture/ path
    Regards

    • Reaver, honestly. Pixie Dust attacks work great as well with Reaver. I’m commenting to come back to this since I’m generally curious to the answer as well.

  7. Just wondering My box seems to hang when its flushing the buffers is this usual? I set it to import the passwords before i went to bed but woke up to find my laptop had rebooted running x64 kali on x64 Vbox via win7 x64. Tried to get aircrack going on a wheezy install on another lappy to see if there was a difference but cant get the backport version working and the wiki is out of date.

    Any help? Vheers

    • Not too sure mate, I never tried this in VBox, only HDD installation. VBox got 3d Memory limitation (128mb?) which might be causing this issue. Also, you don’t really need GUI to do this, it’s better off doing in CLI so that you can put every bit of CPU and Gfx into the job. Hope someone else who had similar issues replies back to. Good luck. Cheers,
      -BMO

  8. I am wondering why my GPU only works 3% based on status from nvidia-smi either working in pyrit batch process or attack_passthrough directly without batching process. I have been monitoring nvidia-smi every 1 seconds and getting the same value of 3%. I am using NVIDIA GT335 with driver 304.125. I have tried to install the current one for this series (340.76) but didn’t work.

  9. Dear… thank you for all your time and effort .. and for helping us , if i win one day a lottery you will get some money from me , you are inspiring me..

    can you help me with this question ? maybe it is the most easiest part of your tut.. but why am i not able to follow this command or it wont work ;cat rockyou.txt | sort | uniq | pw-inspector -m 8 -M 63 > newrockyou.txt

    Can you explain me what i am doing wrong i tried serveral things but cant figure it out ! , I hope you will contact me soon ,

    Kindly regards,

    Stephan from Holland

    • Dear blackmore Ops .. i think i figured it out .. i just copied the Original file to the root folder , then fill in your command in the terminal and it worked ! thank you a lot and apoligize for interrupting ! hope i can get your help with some more difficult questions in the pas. Ciao for now

  10. Can you create a database only 1 time for a wordlist and use it over again for different passwords?
    Can you use Cowpatty-> pyrit without creating databases?

  11. Thanks blackmore. I followed this very easily nice and clear. no results yet. but im smashing 30k P M K’s after followin your other guide on cpyrit. unfortunately i can’t get cal…++ working so had to settle for O C L. using 1.1/ 3.18 i tried about 5 fresh installs using AMD 2.7 -2.8 -2.9. …i get them all installed properly but i get an operation error every time. Any ideas? i cant really do apt -get upgrade because im tethering from my cell phone,which is why I’m kinda here in the first place lol.

  12. Is it possible to create the Pyrit database with the ESSID and wordlist when you aren’t within range of the AP or do you have to be within range the whole time?

      • Thank you. I did some research and found the answer to my question a long time ago, but thanks anyways. Have you done this process before? If so, how many PMK’s/s could your computer calculate during the database batch process? Any feedback is appreciated.

  13. This article mentions you don’t need to commence the batch process with Cowpatty. Does this mean you don’t have to pre compute any sort of database at all and can attack the pcap file directly after you capture it?

  14. Ok. In comand ~ wifite -wpa ~ didn’t get any handshake but when I type ~ wifite – wpa -aircrack ~ I get a handshake. I’m on Kali by the way.

  15. boys please it is possible to run pyrit in way that it will compute PMKs on the fly? I mean i have created pyrit database and ssid on external drive and since database is too big and i want try mulitple ssids i want to skip batch processing and compute PMKs realtime with hacking attempt. Precomputing PMKs with big database for multiple SSIDs is time consuming either.

  16. I added a 10,000,000 word dictionary to Pyrit.
    I added 1 essid (Wi-Fi name) to Pyrit.
    I ran BATCH and it compiled in about 2 hours.
    Everything worked fine.

    Later I might wish to add another dictionary of 100 words.
    Will I have to execute BATCH again?
    Will it take another 2 hours…. or will it just quickly process the new 100 words?

    Later I might wish to add a 2nd essid (Wi-Fi name).
    Will I have to execute BATCH yet again?
    Will it take another 2 hours… or will it just quickly process the 1 new essid?

  17. I dont understand can you have time i want to hack grandmother wifi any tell me how

    And can you give your number

    It work in Android device yes or no

    • Mmm Grandma! Dude my grandma didn’t even have WiFi, she would have told me if I asked, why don’t you just ask her? Did your Gramdma not give you guns to go outback shooting? I think that’s what’s wrong with the word I was at this nursing home with by grandma before she died and I noticed old peoples don’t like when they kids are on the phone typing all day (your mom and dad) which probably pisses her off to see you sit around with your thumbs on a phone all day, watch TV with her go to the American legal and chill with her while she drinks her rum n coke and keep your phone in your pocket.

  18. Granted I don’t understand WPA handshakes. So have to wonder why, once a valid handshake is captured, it must be “hit or miss” from a dictionary list. If a guess is say, 50% right, wouldn’t whatever values are being generated with aircrack or similar be at least partially correct when compared to the capture? Then, with that knowledge, couldn’t the key be honed in on more intelligently? (I’ll probably end up dissecting the source of aircrack-ng to understand, which is the only way I learn)

  19. Hi I don’t why at the last step for pyrit attack it’s saying the essid can’t​ be found all the first steps were perfect

  20. What a STUPID-ass, totally INCORRECT, internet-MISINFO, TOTAL-TIME-WASTE tute is this???

    This STUPID, IGNORANT time-wasting-bastard puts out a TUTE in this pompous website and NEVER even adds the .cap capture file into the Pyrit Database. HA!!!

    Before the “pyrit -e ‘ESSID-name’ create-essid” command, one MUST do the following:
    “pyrit -r /’full-path-to-cap-file’/capture.cap analyse”

    WIthout doing this most important step, what in the world is Pyrit cracking upon?!?!

    FOLKS, BEWARE of such mis-informing IDIOT-HEADS on the internet and steer clear of such TIME-WASTE BLOGS.

    ALWAYS read the manuals from the ORIGINAL publishers/authors of any tool/OS, i.e., in this case refer:

    https://tools.kali.org/wireless-attacks/pyrit

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Articles

Discover more from blackMORE Ops

Subscribe now to keep reading and get access to the full archive.

Continue reading