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

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

by blackMORE

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.

You may also like

52 comments

ali October 30, 2014 - 9:36 pm

nice thanks bro

Reply
dave March 3, 2017 - 9:12 am

dude all you aredoing is showing me what wifite can do not HOW TO ENTER COMMANDS TO USE A DICTIONARY FILE or HOW TO INSTALL COWPATTY

Reply
Vinicio April 11, 2017 - 7:36 am

You see those “Page: 1234” buttons? click on them

Reply
b rass November 26, 2014 - 5:18 am

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?

Reply
D-Maub December 15, 2014 - 3:12 pm

No assuming that you are using the same password file you uploaded

Reply
D-Mub December 16, 2014 - 7:02 am

Sorry after further research, Yes you would need to use the batch process twice. This is because the ESSID acts as a salt to the hashes.

Reply
xyxyxyxyxy@gmail.com December 11, 2014 - 3:46 am

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

Reply
Melvin December 12, 2014 - 4:44 pm

Hi, how about cleanup the passwords in Pyrit?

Reply
gilbert enriquez December 12, 2014 - 11:53 pm

I have a .cap file,can you crack it?

Reply
Melvin December 17, 2014 - 2:17 pm

I can.

Reply
ChronicStyle January 19, 2015 - 7:05 pm

How would you go about helping ? I am working on this for class and its DRIVING ME INSANE! I have used aircrack /bully/reaver as well as crunch but having issues with speeding up the process with hashcat , could you giving me a hand with a file?

Reply
gilbert1013 September 22, 2015 - 8:44 pm

hi melvin how about this? https://drive.google.com/folderview?id=0B8hyOFR0kh83RER2MVFLWEx0bGs&usp=sharing
I hope you can…thanks in advance also.

Reply
KaliHacker2014 December 15, 2014 - 3:22 pm

Thank-you, very helpful ;)

Reply
Melvin December 17, 2014 - 2:15 pm

Hi, I think need to add -e option for pyrit BigPond delete_essid

Reply
edcion January 3, 2015 - 11:42 am

you blanked the essid of all your screenshots expect “check out the temp of my cores”

Reply
kl January 3, 2015 - 5:02 pm

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.

Reply
Eric January 11, 2015 - 10:44 am

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.

Reply
guest June 3, 2015 - 2:08 pm

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.

Reply
BlancPyrit September 2, 2015 - 2:34 pm

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.

Reply
mellerbeck January 17, 2015 - 3:36 am

My box liked this command pyrit -e BigPond delete_essid (needed -e) in order to delete

Reply
frafri (@frafrii) January 18, 2015 - 1:43 am

I did not understand that NVIDIA AMD part.

Reply
DrDeve May 21, 2015 - 8:58 am

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.

Reply
flappybird February 4, 2015 - 2:35 am

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?

Reply
CyBeR570 February 14, 2015 - 11:11 pm

u can just use crunch # # 0123456790abcdefg… | pyrit -r (cap file) -e essid -i – attack_passthrough

Reply
Mayi Boya February 20, 2015 - 1:39 am

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

Reply
pinkun March 20, 2015 - 3:42 am

want to really hack wifi just see my latest wifi hacking

Reply
anon4cechulk April 26, 2015 - 1:30 pm

Im running a laptop running intel graphics chip. What would be my best route for wifi cracking?

Reply
aqueous February 15, 2016 - 5:12 pm

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.

Reply
ian April 26, 2015 - 5:54 pm

How can Idownload dictionarys I am using backbox does it have any

Reply
Nobby Doldrems June 12, 2015 - 9:54 pm

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

Reply
blackMORE Ops June 14, 2015 - 3:12 am

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

Reply
Frank June 18, 2015 - 6:55 pm

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.

Reply
Andy July 11, 2015 - 4:24 pm

It stays at listening to a handshake for a long time and doesn’t quit

Reply
stefan July 27, 2015 - 9:57 am

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

Reply
Stefan July 27, 2015 - 10:23 am

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

Reply
Chris Jackson August 9, 2015 - 4:57 am

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?

Reply
BlancPyrit September 2, 2015 - 2:16 pm

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.

Reply
Onbekende Bestemming October 16, 2015 - 10:08 pm

xsukax Wifi Cracker Script – Kali Linux 2.0

Reply
Aqueous January 18, 2016 - 3:44 pm

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?

Reply
Jhemz Aliga-Silos February 2, 2016 - 6:35 pm

No. Capturing the handshake is the only part where you need to be within the range of the AP. Thereafter, everything else can be done offline.

Reply
aqueous February 15, 2016 - 5:10 pm

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.

Reply
Aqueous April 1, 2016 - 10:13 am

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?

Reply
Me May 2, 2016 - 8:05 pm

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.

Reply
Michal June 10, 2016 - 12:51 am

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.

Reply
null November 9, 2016 - 11:26 am

well i can’t find the .cap file !!

Reply
Patty R. December 17, 2016 - 6:15 am

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?

Reply
farhan January 9, 2017 - 8:24 pm

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

Reply
GramdmasBoy October 27, 2017 - 9:44 am

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.

Reply
Goran Ilic June 14, 2017 - 3:01 am

All dictionary “atacks” is like gambling for jackpot in casino in Vegas,crap

Reply
Richard Evans October 17, 2017 - 1:33 am

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)

Reply
Rayan January 18, 2019 - 7:53 am

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

Reply
Bramha June 12, 2019 - 2:00 pm

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

Reply

Leave your solution or comment to help others.

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