Wireless Attackswirelesswepwpacracking802.11penetration-testing

aircrack-ng

aircrack-ng is a suite of tools for auditing wireless networks, capable of cracking WEP and WPA-PSK keys from captured packets using statistical attacks and dictionary methods.

Description

aircrack-ng provides a complete set of tools for 802.11 wireless network security assessment. The core aircrack-ng utility recovers WEP keys (40/104/256/512-bit) using optimized FMS attacks and PTW methods, while also supporting WPA/WPA2 cracking via dictionary attacks requiring 4-way handshakes. Supporting tools handle packet capture (airodump-ng), injection (aireplay-ng), monitor mode setup (airmon-ng), and visualization (airgraph-ng).

Use cases include wireless penetration testing, security auditing of enterprise WiFi deployments, educational demonstrations of 802.11 vulnerabilities, and red team operations targeting WPA networks with weak passphrases. The suite supports multi-processor optimization for faster cracking and integrates with databases like airolib-ng for precomputed PMK storage to accelerate repeated attacks.

It excels against legacy WEP networks through IV collection and statistical analysis but requires sufficient handshake captures for WPA-PSK brute-forcing. Tools like wpaclean filter captures for clean handshakes, while airdecap-ng decrypts traffic post-crack.

How It Works

aircrack-ng suite operates on captured 802.11 frames in .cap/.pcap/.ivs formats. For WEP, it collects Initialization Vectors (IVs) and applies FMS/Korek/PTW statistical attacks to derive keystreams and recover keys via vote-based keybyte guessing. WPA-PSK mode requires a 4-way handshake (EAPOL messages), computes Pairwise Master Keys (PMKs) from passphrase+ESSID+nonce via PBKDF2-HMAC-SHA1, then tests against captured handshakes. Tools like aireplay-ng generate traffic/deauths for handshakes, airmon-ng enables monitor mode, airolib-ng precomputes PMK tables, and airgraph-ng visualizes AP-client graphs from CSV dumps.

Installation

bash
sudo apt install aircrack-ng

Flags

-w <words>path to wordlist(s) filename(s) for WPA dictionary attack
-r <DB>path to airolib-ng database (cannot be used with -w)
-e <essid>target selection: network identifier
-b <bssid>target selection: access point's MAC
-a <amode>force attack mode (1/WEP, 2/WPA-PSK)
-p <nbcpu># of CPU to use (default: all CPUs)
-n <nbits>WEP key length: 64/128/152/256/512
-f <fudge>bruteforce fudge factor, default: 2

Examples

Crack WPA handshake in wpa.cap using wordlist password.lst
aircrack-ng -w password.lst wpa.cap
Perform WEP key attack on capture file with IVs
aircrack-ng all-ivs.ivs
Use airolib-ng database to crack WPA capture
aircrack-ng -r airolib-db /root/wpa.cap
Send deauthentication attack to force WPA handshake
aireplay-ng -0 5 -a 8C:7F:3B:7E:81:B6 -c 00:08:22:B9:41:A1 wlan0mon
Capture packets on channel 6 and save to files prefixed chan6
airodump-ng -c 6 -w /root/chan6 wlan0mon
Enable monitor mode on wlan0 fixed on channel 6, creates wlan0mon
airmon-ng start wlan0 6
Filter capture files for 4-way handshakes and save to handshakes.cap
wpaclean /root/handshakes.cap wpa-psk-linksys.cap wpa.cap
Decrypt WPA capture using ESSID test and passphrase biscotte
airdecap-ng -e test -p biscotte wpa.cap
Updated 2026-04-16kali.org ↗