Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Crack WEP and WPA Wireless Networks

· 5 min read · Home Networking

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide shows you how to test the security of your own Wi-Fi network by cracking its WEP or WPA password. You'll learn the exact steps to capture handshakes and recover the passphrase using common tools. This is for educational and authorized testing only—cracking a network you don't own is illegal in most places.

What You'll Need

  • A computer with a wireless network adapter that supports monitor mode and packet injection. Most USB adapters with chipsets like Atheros, Ralink, or Realtek (e.g., Alfa AWUS036ACH) work. Internal laptop cards often don't.
  • Kali Linux (or any Linux distro) installed on a USB drive or virtual machine. You'll need root access.
  • Tools: aircrack-ng suite (includes airmon-ng, airodump-ng, aireplay-ng, aircrack-ng), and optionally a wordlist like rockyou.txt (usually at /usr/share/wordlists/rockyou.txt).
  • For WPA cracking, a strong wordlist or a GPU-based tool like hashcat if you have a powerful graphics card.
  • Physical proximity to the target network—you need to be within range to capture packets.

Step-by-Step

  1. Put your adapter in monitor mode. Open a terminal and run sudo airmon-ng check kill to stop interfering processes. Then run sudo airmon-ng start wlan0 (replace wlan0 with your adapter's name). Your interface will become something like wlan0mon. Verify with iwconfig—it should show "Mode:Monitor".
  2. Scan for target networks. Run sudo airodump-ng wlan0mon. Wait a few seconds to see nearby networks. Note the BSSID (MAC address) and channel of your target. Press Ctrl+C to stop.
  3. Capture packets from the target. Run sudo airodump-ng -c [channel] --bssid [BSSID] -w capture wlan0mon (e.g., sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w capture wlan0mon). This starts saving packets to files named capture-01.cap etc. Leave this running.
  4. Force a client to reconnect (for WPA/WPA2). In a second terminal, run sudo aireplay-ng -0 5 -a [BSSID] wlan0mon to send deauthentication packets. This kicks connected devices off, forcing them to reconnect and generate a new handshake. You'll see the handshake appear in the airodump window as "WPA handshake: [BSSID]".
  5. For WEP, inject ARP requests. If cracking WEP, run sudo aireplay-ng -3 -b [BSSID] wlan0mon to perform ARP request replay. This generates IVs (initialization vectors) quickly. Wait until airodump shows a high IV count (e.g., 20,000+).
  6. Stop capturing. Once you have the handshake (WPA) or enough IVs (WEP), press Ctrl+C in both terminals. The capture file is now saved.
  7. Crack WEP. Run sudo aircrack-ng capture-01.cap. It will automatically detect WEP and try to recover the key. With enough IVs, it usually succeeds within minutes.
  8. Crack WPA/WPA2. Run sudo aircrack-ng -w /usr/share/wordlists/rockyou.txt capture-01.cap. This tries each password in the wordlist against the handshake. The process can take seconds to hours depending on the wordlist size and your CPU. For faster cracking, you can convert the .cap to .hccapx and use hashcat with a GPU.

Common Mistakes

  • Wrong adapter: Using an internal card that doesn't support monitor mode. Check with airmon-ng—if your adapter isn't listed, it won't work.
  • Not killing interfering processes: Skipping airmon-ng check kill can cause the adapter to drop out of monitor mode.
  • Wrong channel: If you don't set the channel with -c, airodump scans all channels, missing packets and handshakes.
  • Too few IVs for WEP: Cracking WEP with less than 20,000 IVs often fails. Be patient.
  • Weak wordlist for WPA: Using a tiny wordlist will miss the password. Use a large, common list like rockyou or a custom list based on the target.

Tips

  • Position yourself close to the target to get a stronger signal, which reduces packet loss.
  • For WPA, capture the handshake even if you don't crack it immediately—you can crack it later with more powerful hardware.
  • Use a USB extension cable to move the adapter away from the computer to reduce interference.
  • If you're testing your own network, note the password you set—it's a good way to verify the cracking works.
  • For WEP, use a tool like besside-ng which automates the whole process (capture and crack).

Troubleshooting

  • Adapter not entering monitor mode: Run sudo airmon-ng stop wlan0mon, then sudo airmon-ng start wlan0 again. If it still fails, try a different USB port or reboot.
  • No handshake captured: The client might be too far or not reconnecting. Increase the number of deauth packets (e.g., -0 10) and wait longer. Also ensure you're on the correct channel.
  • aireplay-ng fails with "no such BSSID": Check that you typed the BSSID correctly and that the target is still in range. Re-scan with airodump.
  • WEP cracking takes forever: You need more IVs. Let airodump run longer, or use a faster injection method like aireplay-ng -4 (chopchop) to generate packets.
  • WPA cracking doesn't find the password: The password is not in your wordlist. Try a bigger list or use a rule-based attack in hashcat. If you know the password pattern, generate a custom wordlist with crunch.
  • Capture file is empty: Check that the file name is correct (e.g., capture-01.cap). Ensure airodump was writing to the right directory.

Frequently Asked Questions

Is it legal to crack Wi-Fi passwords?

Only if you own the network or have explicit written permission from the owner. Unauthorized access is a crime in most jurisdictions.

Can I crack WPA3?

No, WPA3 uses SAE (Simultaneous Authentication of Equals) which is resistant to offline dictionary attacks. The methods here apply only to WEP and WPA/WPA2.

How long does it take to crack WPA?

It depends on the password complexity and your hardware. A simple password like "password123" might crack in seconds with a good wordlist; a long random one could take years.

Do I need a powerful GPU?

For WEP, no—CPU is fine. For WPA, a GPU with hashcat can be 100x faster than CPU, but it's not required for short passwords.

Can I crack a network without clients?

For WEP, you can use a fake authentication attack (aireplay-ng -1) to associate with the AP and then inject ARP requests. For WPA, you cannot capture a handshake without at least one client connecting.

What if my adapter doesn't support monitor mode?

You'll need to buy a compatible USB adapter. Check the aircrack-ng compatibility list before purchasing.