WARNING Only on your own network. This checks whether your Wi-Fi passphrase would hold up. Running it against a network you do not own or administer is illegal in most jurisdictions – do not do it.
The idea is simple: capture the WPA handshake of your own access point and test offline whether a weak passphrase falls quickly. If it does, change it.
possibly outdated More than two years have passed since publication. The content may no longer hold.
Definitions
-
$NIC– the monitor interface; -
$BSSID– the MAC of your access point; -
$CLIENTMAC– the MAC of a device already connected to your network; -
$FILE– a filename prefix (e.g. the SSID).
1. Find your access point
airodump-ng $NIC
2. Capture your handshake
airodump-ng $NIC --channel N --bssid $BSSID -w $FILE
The handshake is captured when a device (re)connects. You can prompt one of your own devices to reconnect:
aireplay-ng -0 4 -a $BSSID -c $CLIENTMAC $NIC
3. Test the passphrase offline
Feed candidate passphrases from John the Ripper into aircrack-ng:
john --stdout --incremental:all | aircrack-ng -b $BSSID -w - $FILE.cap
The space before the filename (-w - $FILE.cap) is mandatory.
Notes
- Stop with
Ctrl+Cand resume with progress preserved:
john --restore | aircrack-ng -b $BSSID -w - $FILE.cap
- John saves progress to
john.recroughly every 10 minutes. - What the result means: if a weak passphrase is found quickly, that is the point – replace it with a long, random one. A good passphrase should not fall this way.
_Originally published in January 2013._