How to Hack Wi-Fi: Cracking WPA2-PSK Passwords with Cowpatty « Null Byte :: WonderHowTo

Welcome, my hacker novitiates!As part ofmy series on hacking Wi-Fi, I want to demonstrate another excellent piece of hacking software for cracking WPA2-PSK passwords. In my last post, wecracked WPA2 using aircrack-ng. In this tutorial, we'll use a piece of software developed by wireless security researcher Joshua Wright calledcowpatty(often stylized as coWPAtty). This app simplifies and speeds up the dictionary/hybrid attack against WPA2 passwords, so let's get to it!Need a wireless network adapter?Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2017For this to work, we'll need to use a compatible wireless network adapter. Check out our 2017 list of Kali Linux and Backtrack compatible wireless network adapters in the link above, or you can grabour most popular adapter for beginners here.Step 1: Find CowpattyCowpatty is one of the hundreds of pieces of software that are included in theBackTracksuite of software. For some reason, it was not placed in the/pentest/wirelessdirectory, but instead was left in the/usr/local/bindirectory, so let's navigate there.cd /usr/local/binBecause cowpatty is in the/usr/local/bindirectory and this directory should be in your PATH, we should be able to run it from any directory in BackTrack.Step 2: Find the Cowpatty Help ScreenTo get a brief rundown of the cowpatty options, simply type:cowpattyBackTrack will provide you a brief help screen. Take a note that cowpatty requires all of the following.a word lista file where the password hash has been capturedthe SSID of the target APStep 3: Place the Wireless Adapter in Monitor ModeJust as incracking with aircrack-ng, we need to put the wireless adapter into monitor mode.airmon-ng start wlan0Step 4: Start a Capture FileNext, we need to start a capture file where the hashed password will be stored when we capture the 4-way handshake.airodump-ng --bssid 00:25:9C:97:4F:48 -c 9 -w cowpatty mon0This will start a dump on the selected AP (00:25:9C:97:4F:48), on the selected channel (-c 9) and save the the hash in a file namedcowcrack.Step 5: Capture the HandshakeNow when someone connects to the AP, we'll capture the hash and airdump-ng will show us it has been captured in the upper right-hand corner.Step 6: Run the CowpattyNow that we have the hash of the password, we can use it with cowpatty and our wordlist to crack the hash.cowpatty -f /pentest/passwords/wordlists/darkc0de.lst -r /root/cowcrack-01.cap -s Mandela2As you can see in the screenshot above, cowpatty is generating a hash of every word on our wordlist with the SSID as a seed and comparing it to the captured hash. When the hashes match, it dsplays the password of the AP.Step 7: Make Your Own HashAlthough running cowpatty can be rather simple, it can also be very slow. The password hash is hashed with SHA1 with a seed of the SSID. This means that the same password on different SSIDs will generate different hashes. This prevents us from simply using a rainbow table against all APs. Cowpatty must take the password list you provide and compute the hash with the SSID for each word. This is very CPU intensive and slow.Cowpatty now supports using a pre-computed hash file rather than a plain-text word file, making the cracking of the WPA2-PSK password 1000x faster! Pre-computed hash files are available from theChurch of WiFi, and these pre-computed hash files are generated using 172,000 dictionary file and the 1,000 most popular SSIDs. As useful as this is, if your SSID is not in that 1,000, the hash list really doesn't help us.In that case, we need to generate our own hashes for our target SSID. We can do this by using an application calledgenpmk. We can generate our hash file for the "darkcode" wordlist for the SSID "Mandela2" by typing:genpmk -f /pentest/passwords/wordlists/darkc0de.lst -d hashes -s Mandela2Step 8: Using Our HashOnce we have generated our hashes for the particular SSIDs, we can then crack the password with cowpatty by typing:cowpatty -d hashfile -r dumpfile -s ssidStay Tuned for More Wireless Hacking GuidesIf you're looking for a cheap, handy platform to get started using Cowpatty, check out our Kali Linux Raspberry Pi build usingthe $35 Raspberry Pi.Get started using Cowpatty with the Raspberry Pi.Image by SADMIN/Null ByteGet Started Hacking Today:Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxKeep coming back for more on Wi-Fi hacking and other hacking techniques! Haven't seen the other Wi-Fi hacking guides yet? Check them outhere. If you have questions on any of this, please ask them in the comments below. If it's something unrelated, try asking in theNull Byte forum.Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseRelatedHow to Hack Wi-Fi:Selecting a Good Wi-Fi Hacking StrategyHow to Hack Wi-Fi:Cracking WPA2-PSK Passwords Using Aircrack-NgHow to Hack Wi-Fi:Getting Started with Terms & TechnologiesHow To:Crack WPA & WPA2 Wi-Fi Passwords with PyritHow to Hack Wi-Fi:Cracking WPA2 Passwords Using the New PMKID Hashcat AttackHow To:Null Byte & Null Space Labs Present: Wi-Fi Hacking, MITM Attacks & the USB Rubber DuckyHow to Hack Wi-Fi:Breaking a WPS PIN to Get the Password with BullyHow To:Spy on Traffic from a Smartphone with WiresharkHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsHow To:Crack Wi-Fi Passwords—For Beginners!Video:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Hack Wi-Fi Networks with BettercapHow to Hack Wi-Fi:Get Anyone's Wi-Fi Password Without Cracking Using WifiphisherHow To:The Beginner's Guide to Defending Against Wi-Fi HackingHow To:iOS 6 Broke Your Wi-Fi? Here's How to Fix Connection Problems on Your iPhone or iPadHow to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Easily Store Your iPhone's Wi-Fi Passwords & Share Them with Anybody — Even Android UsersHow to Hack Wi-Fi:Cracking WEP Passwords with Aircrack-NgHow To:Automate Wi-Fi Hacking with Wifite2How To:Recover a Lost WiFi Password from Any DeviceHow To:Hack WiFi Passwords for Free Wireless Internet on Your PS3How to Hack Wi-Fi:Hunting Down & Cracking WEP NetworksHow To:Hack Wi-Fi & Networks More Easily with Lazy ScriptHow To:Hack WPA & WPA2 Wi-Fi Passwords with a Pixie-Dust Attack Using AirgeddonHow To:Easily See Passwords for Wi-Fi Networks You've Connected Your Android Device ToHow To:This Widget Lets You Open Wi-Fi Settings Faster, Share Passwords & More on Your iPhoneHack Like a Pro:How to Crack Passwords, Part 1 (Principles & Technologies)How To:Crack Wi-Fi Passwords with Your Android Phone and Get Free Internet!How To:The Easiest Way to Share Your Complicated WiFi Password with Friends & Family—No Typing RequiredHow To:Share Wi-Fi Adapters Across a Network with Airserv-Ng2014's Hottest How-Tos:Hacks, Mods, and...Veggies?How To:How Hackers Steal Your Internet & How to Defend Against It