TL;DR — The 4-step process
- Put your USB WiFi adapter in monitor mode:
sudo airmon-ng start wlan0 - Capture a 4-way handshake with
airodump-ng(force one withaireplay-ng -0) - Convert the
.capfile to hashcat's.hc22000format withhcxpcapngtool - Crack with
hashcat -m 22000using a wordlist (and rules for better coverage)
Full step-by-step below. Skip to Step 1 if you want to start, or read the prerequisites first.
How WPA2 Cracking Actually Works
WPA2 cracking is the process of capturing a network's 4-way handshake and then testing password guesses against it offline until one matches. Despite what movies suggest, it isn't a magical real-time process — it's offline brute-force, and it works like this:
- Capture a handshake. When a device connects to a WPA2 network, it performs a "4-way handshake" with the access point. This handshake contains cryptographic material derived from the WiFi password — but not the password itself.
- Take the handshake offline. Once you have the captured handshake (a small file, usually under 1 MB), you can disconnect from the area entirely.
- Guess and verify. You feed the handshake to a cracking tool along with a wordlist. The tool hashes each candidate password the same way the device would, then compares it to the captured handshake. If it matches, you've found the password.
This is why WPA2 cracking can never break a truly strong password — it relies entirely on the password being something a wordlist might contain. A 20-character random password like K9$mP2vN!xQ7&hL3wR8 would take longer than the age of the universe to crack. Most home networks, though, use passwords like password123, familyname2024, or the default printed on a router sticker — and those crack in minutes.
Prerequisites
Before you can do anything, you need:
- Kali Linux — physical install or VM with USB passthrough (VirtualBox install guide)
- A USB WiFi adapter that supports monitor mode + packet injection — your laptop's built-in WiFi almost certainly does not. The Alfa AWUS036NHA (AR9271 chipset) is the safest beginner choice. See my complete WiFi adapter guide for current 2026 recommendations including the AWUS036ACH (RTL8812AU) for dual-band and the AWUS036AXML (MT7921AUN) for WiFi 6E.
- A target network you own or have authorization to test — see legal warning above
- A good wordlist — rockyou.txt as a starting point, then larger and targeted lists. See my wordlists guide.
- Optional but recommended: a discrete GPU. Cracking with hashcat on an RTX 4060 or better is roughly 100-185x faster than CPU cracking with aircrack-ng.
Install the tools
Kali ships with aircrack-ng pre-installed. You'll also want hcxtools (modern handshake conversion) and hashcat:
Step 1: Identify Your Wireless Interface
Find the name of your USB WiFi adapter (usually wlan0 or wlan1):
If you don't see your USB adapter in iwconfig output, it may not be recognized. Run lsusb to confirm it's connected and dmesg | tail to check for driver errors.
Step 2: Enable Monitor Mode
Monitor mode lets the adapter capture all wireless traffic in the air, not just packets addressed to you.
airmon-ng start fails: Your adapter may not support monitor mode. Test with sudo aireplay-ng --test wlan0mon — if injection doesn't work, you need a different USB adapter. See the adapter compatibility guide for what works.
Step 3: Scan for Nearby Networks
Use airodump-ng to see all WiFi networks within range:
Key columns to note:
- BSSID: The access point's MAC address (you'll need this exact value)
- PWR: Signal strength. Closer to 0 = stronger. Below -75 is often too weak to capture reliably.
- CH: The channel the AP broadcasts on (you'll lock to this channel)
- ENC: Encryption type.
WPA2is the target for this tutorial.WPA3SAE is not vulnerable to this attack.
Press Ctrl+C to stop scanning. Copy the BSSID and note the channel of your target network — you'll need both in the next step.
Step 4: Capture the Handshake
Now focus airodump-ng on just your target network and write captures to disk:
Leave this running. The output now shows just your target network plus connected clients (devices already connected to it). Watch the top-right corner — when a 4-way handshake is captured, you'll see WPA handshake: AA:BB:CC:DD:EE:FF.
How handshakes happen
A handshake occurs whenever a device first connects (or reconnects) to the network. If you wait, devices will naturally connect throughout the day. But you can also force one with a deauthentication attack.
Step 5: Force a Handshake (Deauth Attack)
Open a second terminal (leave airodump-ng running in the first). Send deauth packets to a connected client, forcing it to reconnect — which produces a handshake:
The -0 5 means "send 5 deauth packets." Watch your first terminal (airodump-ng) — within a few seconds you should see WPA handshake appear at the top.
Once you see "WPA handshake," press Ctrl+C in the airodump-ng terminal. You now have a capture file (e.g., capture-01.cap) in your current directory.
Alternative: The PMKID Attack (No Client Needed)
The classic 4-way handshake method requires a client to be connected and forcing it to re-authenticate. In 2018, researchers discovered the PMKID attack, which can extract crackable material directly from the AP without any client.
This is huge for situations where: (a) no clients are connected, (b) clients are too far away to deauth reliably, or (c) the network uses 802.11w to block deauth attacks.
Note: PMKID extraction isn't fully passive — hcxdumptool sends a single authentication request to the AP. Many modern APs are patched to not include the PMKID in their response, but plenty still leak it. The attack succeeds against routers from most major consumer brands.
Step 6: Convert to Hashcat Format (.hc22000)
The classic .cap format and the older .hccapx format are both deprecated as of hashcat 6.2.4+. Modern hashcat uses the unified .hc22000 format, which handles both 4-way handshakes and PMKIDs in one file format with one mode (-m 22000).
If hcxpcapngtool outputs nothing or reports "no hashes found," the handshake wasn't fully captured. Common causes:
- Only a partial handshake (missed messages 1, 2, 3, or 4 of the 4-way exchange)
- Client was too far from your adapter, causing dropped frames
- You captured the wrong network's traffic
Solution: re-capture with stronger signal, or open the .cap file in Wireshark with the display filter eapol to inspect what was actually captured.
Step 7: Crack with Hashcat (Recommended)
This is where the real cracking happens. Hashcat uses your GPU and is dramatically faster than aircrack-ng's CPU-based cracking.
Basic dictionary attack
Dictionary + rules (much more effective)
Rules tell hashcat to mutate each wordlist entry automatically — appending years, capitalizing letters, substituting characters. A 14M wordlist with best64.rule generates 900M+ candidates without storing them on disk.
Mask attack for known patterns
If you know the password structure (e.g., 8 digits, or starts with a known prefix), mask attacks are much faster than brute force.
Performance tuning
When hashcat finds a match, it shows the result like:
Alternative: Crack with Aircrack-ng (CPU)
If you don't have a GPU or just want the simpler workflow, aircrack-ng can crack directly from the .cap file. It's slower — roughly 14,000 keys/second on a fast CPU versus 2,600,000+ on a modern GPU with hashcat — but it works and the syntax is straightforward.
For anything beyond a basic rockyou.txt run, switch to hashcat. The speed difference is enormous and grows as wordlists get bigger.
Performance Comparison: Aircrack-ng vs Hashcat
| Hardware | Tool | Speed (WPA2) | 14M rockyou.txt time |
|---|---|---|---|
| Intel i7-13700K (CPU) | aircrack-ng | ~14,000 H/s | ~17 minutes |
| RTX 4060 Ti (GPU) | hashcat | ~750,000 H/s | ~19 seconds |
| RTX 4090 (GPU) | hashcat | ~2,600,000 H/s | ~5 seconds |
Numbers are approximate and vary with hashcat version, drivers, and exact silicon. The takeaway: if you have any modern GPU, use hashcat. The conversion step is trivial and the speed difference is the difference between cracking in minutes versus hours.
Wordlist Strategy
The cracking tool is only as good as your wordlist. A few strategic notes:
- Start with rockyou.txt. It cracks a surprising number of weak home WiFi passwords. Pre-installed at
/usr/share/wordlists/rockyou.txt.gz(decompress first). - Add hashcat rules.
best64.ruleturns a 14M wordlist into 900M+ candidates. TheOneRuleToRuleThemAll.ruleis even more aggressive. - Filter by WPA2 length requirements. WPA2 passwords are 8-63 characters. Filter your wordlist:
awk 'length >= 8 && length <= 63' wordlist.txt > wpa-wordlist.txt - Build targeted lists. Use CeWL to scrape company/family/local words. Use CUPP to generate variations from personal info.
- For company audits: Combine company name, location, founding year, common phrases. People reuse these in passwords constantly.
See my complete wordlists and password dictionaries guide for download links and advanced generation techniques.
How to Defend Against This Attack
Understanding the attack also tells you how to defend. If you're protecting a WiFi network:
- Use a strong, random password. At least 15 characters, mix of letter cases, numbers, and symbols. No dictionary words, no personal info.
diceware-style passphrases (5+ random words) are also strong. - Upgrade to WPA3 if possible. WPA3 uses SAE (Simultaneous Authentication of Equals) which is resistant to offline dictionary attacks. The attacks in this article don't work against a properly configured WPA3-only network.
- Enable Protected Management Frames (802.11w). This blocks deauth attacks. Most modern routers support it.
- Disable WPS. WPS PIN attacks bypass the password entirely. There's no good reason to leave WPS enabled.
- Change default credentials. Router stickers with default WiFi passwords end up in wordlists.
Common Issues & Troubleshooting
"Monitor mode not supported"
Your adapter's chipset doesn't support monitor mode. This is the #1 issue beginners hit. Built-in laptop WiFi cards almost never work. You need a USB adapter with a compatible chipset — see my adapter guide for current 2026 options.
"Injection test failed"
Run sudo aireplay-ng --test wlan0mon. If it fails, either the adapter doesn't support packet injection (different from monitor mode) or you're too far from any AP to inject reliably. Get closer or switch adapters.
"No handshake captured even after deauth"
A few possible causes: (1) no clients are actually connected to the target network, (2) the AP uses 802.11w PMF which blocks deauth, (3) your signal is too weak to either deauth the client or capture the handshake response, (4) the AP is on a different channel than you thought.
Try the PMKID attack instead — it doesn't require a client and works even when deauth is blocked.
"hcxpcapngtool says: no hashes written"
The capture file doesn't contain a complete handshake. Re-capture with stronger signal and a longer capture window. Open the file in Wireshark and filter by eapol to see what was actually captured.
"Hashcat: no devices found"
If running Kali in a VM, hashcat can't access the host's GPU. You need to run hashcat on the host OS or on a physical Kali install. Cracking in a VM with software fallback is impractically slow.
Frequently Asked Questions
Can WPA3 be cracked the same way as WPA2?
No. WPA3 uses SAE (Simultaneous Authentication of Equals) which provides forward secrecy and resistance to offline dictionary attacks. The 4-way handshake attack and PMKID attack don't work against WPA3-only networks. There have been some research-level attacks against WPA3 (Dragonblood, 2019) but they're impractical against properly configured modern routers.
How long does it take to crack a WPA2 password?
It entirely depends on (1) the password and (2) your hardware. Weak passwords (in rockyou.txt) crack in seconds. 8-digit numeric passwords brute-force in 5-10 minutes on a modern GPU. 10-character lowercase passwords take hours. A truly random 15+ character password is effectively uncrackable — longer than the age of the universe with current hardware.
Do I need a special WiFi adapter for this?
Yes. Your laptop's built-in WiFi card almost certainly doesn't support monitor mode and packet injection — both required for this attack. You need a USB adapter with a supported chipset. The Alfa AWUS036NHA (AR9271, 2.4 GHz) is the safest budget choice. The AWUS036ACH (RTL8812AU, dual-band) is the current gold standard. See my complete WiFi adapter guide for 2026 recommendations.
What's the difference between modes 2500 and 22000 in hashcat?
Mode 2500 (WPA-EAPOL-PBKDF2) and 16800 (PMKID) are deprecated. They used the older .hccapx format. Modern hashcat 6.0+ uses mode 22000 (WPA-PBKDF2-PMKID+EAPOL) with the unified .hc22000 format, which handles both handshakes and PMKIDs in one mode. Always use 22000 in 2026 — older tutorials referencing 2500 are out of date.
Can I do this from a virtual machine?
Partially. You can do the capture and conversion in a Kali VM if you pass the USB WiFi adapter through to it. But the cracking step needs GPU access, which VirtualBox can't pass through reliably. Two practical setups: (1) capture in the VM, transfer the .hc22000 file to your host, crack on the host. (2) install Kali on physical hardware for full GPU access.
Is the PMKID attack always better than the 4-way handshake?
Not always. PMKID extraction is faster and doesn't require a connected client — major advantages. But many routers have been patched to not leak PMKID, especially newer enterprise gear. The handshake attack works on a wider range of targets. In practice, try PMKID first (it's faster) and fall back to handshake capture if it fails.
Why does the password not crack even with rockyou.txt?
Because the password isn't in rockyou.txt. Try: (1) hashcat rules (-r best64.rule) to mutate the wordlist, (2) larger wordlists like SecLists, (3) a mask attack if you suspect a specific pattern, (4) build a custom wordlist with CeWL or CUPP based on what you know about the target. If the password is truly random and long, no wordlist will work — the network is well-protected.
Is this illegal?
Cracking a network you don't own and don't have explicit permission to test is illegal nearly everywhere. In the US, the CFAA classifies it as unauthorized access to a protected computer. In the UK, the Computer Misuse Act applies. EU countries follow the Cybercrime Convention with similar provisions. Penalties range from fines to years in prison. Practice only on your own networks, dedicated test routers you own, or authorized engagements.
