What is Aircrack-ng?
Aircrack-ng is a comprehensive suite of tools for assessing WiFi network security. It’s one of the most popular wireless security tools included in Kali Linux, used for:
- Monitoring WiFi networks
- Capturing packets
- Testing WiFi cards and drivers
- Cracking WEP and WPA/WPA2-PSK keys
- Performing various WiFi attacks
The suite includes over 20 different tools that work together to analyze and exploit wireless networks.
How Aircrack-ng Works
Aircrack-ng operates through several phases:
- Monitoring: Putting the wireless card in monitor mode to capture all traffic
- Packet Capture: Collecting wireless frames and saving them to a file
- Attack: Performing specific attacks to generate traffic or exploit vulnerabilities
- Cracking: Analyzing captured data to recover encryption keys
For WEP cracking, it uses statistical attacks on the weak RC4 implementation. For WPA/WPA2, it performs dictionary attacks against captured handshakes.
Installation
Aircrack-ng comes pre-installed in Kali Linux. To verify or install:
# Check if installed
aircrack-ng
# Install/update in Kali
sudo apt update
sudo apt install aircrack-ng
# Install on other Debian/Ubuntu systems
sudo apt install aircrack-ng
# Install from source
git clone https://github.com/aircrack-ng/aircrack-ng
cd aircrack-ng
autoreconf -i
./configure
make
sudo make install
sudo airodump-ng-oui-updateBasic Usage Examples
1. Check WiFi adapter compatibility
sudo airmon-ng2. Put interface in monitor mode
sudo airmon-ng start wlan03. Scan for networks
sudo airodump-ng wlan0mon4. Capture packets from a specific network
sudo airodump-ng -c 6 --bssid 00:11:22:33:44:55 -w capture wlan0mon5. Crack WEP key
sudo aircrack-ng -b 00:11:22:33:44:55 capture-01.cap6. Crack WPA handshake (with wordlist)
sudo aircrack-ng -w wordlist.txt -b 00:11:22:33:44:55 capture-01.capAdvanced Usage Examples
1. Deauthentication attack to capture handshake
sudo aireplay-ng --deauth 10 -a 00:11:22:33:44:55 -c FF:FF:FF:FF:FF:FF wlan0mon2. Create a fake AP (Evil Twin)
sudo airbase-ng -a 00:11:22:33:44:55 --essid "FreeWiFi" -c 6 wlan0mon3. WPA PMKID attack (no clients needed)
sudo hcxdumptool -i wlan0mon -o pmkid.pcapng --enable_status=1
sudo hcxpcaptool -z hashes.txt pmkid.pcapng
sudo aircrack-ng -w wordlist.txt hashes.txt4. Using the GPU for faster cracking
sudo aircrack-ng -w wordlist.txt -b 00:11:22:33:44:55 --backend-opt=workload=high capture-01.cap5. WPS PIN attack
sudo reaver -i wlan0mon -b 00:11:22:33:44:55 -vvCommand-Line Options (Key Tools)
1. Core AP Configuration
| Option | Description |
|---|---|
-a | Sets the MAC address of the fake AP. |
-c | Sets the channel for the AP. |
--essid | Sets the network name (ESSID). |
-X | Hides the ESSID (makes network “hidden”). |
-A | Enables Ad-Hoc mode (peer-to-peer networking). |
-W 0|1 | Forces WEP flag in beacons (0 = off, 1 = on). |
-I | Sets beacon interval in milliseconds (default: 100ms). |
2. Encryption & Authentication
| Option | Description |
|---|---|
-w | Sets a WEP key for the fake AP. |
-s | Forces shared key authentication (WEP). |
-S | Sets shared key challenge length (default: 128). |
-0 | Enables all security modes (WPA/WEP/Open). |
-z | Sets WPA1 encryption type (1=WEP40, 2=TKIP, 3=WRAP, 4=CCMP, 5=WEP104). |
-Z | Same as -z, but for WPA2. |
-V | Fakes EAPOL handshake (1=MD5, 2=SHA1, 3=auto). |
3. Attack Modes
| Option | Description |
|---|---|
-L | Caffe-Latte attack (extracts WEP key from clients). |
-N | cfrag attack (alternative WEP attack, recommended). |
-P | Responds to all probe requests (even if ESSID not specified). |
-C | Broadcasts probed ESSIDs (requires -P). |
-y | Disables responses to broadcast probes. |
4. Traffic Control & Logging
| Option | Description |
|---|---|
-x | Sets packets per second rate (default: 100). |
-F | Saves all sent/received frames to a pcap file. |
-q | Quiet mode (no statistics). |
-v | Verbose mode (more details). |
5. Filtering Options
| Option | Description |
|---|---|
--bssid | Filters by BSSID. |
--bssids | Reads BSSIDs from a file. |
--client | Filters by client MAC. |
--clients | Reads client MACs from a file. |
--essids | Reads ESSIDs from a file. |
Practical Examples
1. Basic Evil Twin Attack
sudo airbase-ng -a 00:11:22:33:44:55 --essid "Starbucks_FreeWiFi" -c 6 wlan0mon- Creates a fake AP named “Starbucks_FreeWiFi” on channel 6.
2. WEP Caffe-Latte Attack
sudo airbase-ng -L -c 6 wlan0mon- Attempts to extract WEP keys from connected clients.
3. Capturing WPA Handshakes
sudo airbase-ng -P -C 30 --essid "VictimWiFi" wlan0mon- Broadcasts “VictimWiFi” and logs handshakes.
4. MITM with Fake EAPOL
sudo airbase-ng -V 3 -a 00:11:22:33:44:55 --essid "CorporateWiFi" wlan0mon- Fakes EAPOL handshakes to capture credentials.
airodump-ng (packet capture)
--channel/-c : Channel to monitor
--bssid/-d : MAC of AP
-w <prefix> : Output file prefix
--ivs : Capture IVs only (WEP)
--output-format : Format for output filesaireplay-ng (packet injection)
--deauth <count> : Deauthentication attack
--fakeauth <delay> : Fake authentication
--arpreplay : ARP replay attack
--interactive : Interactive frame selectionReal-World Use Cases
-
Penetration Testing: Security professionals use Aircrack-ng to test the security of their organization’s wireless networks.
-
Network Troubleshooting: Analyzing WiFi performance issues and interference problems.
-
Digital Forensics: Capturing wireless traffic for forensic analysis.
-
Security Research: Studying wireless protocols and vulnerabilities.
-
Lost Password Recovery: Recovering forgotten WiFi passwords (with permission).
-
Educational Purposes: Learning about wireless security in controlled environments.
Troubleshooting Tips
Common Issues and Solutions:
-
Monitor mode not working:
- Check if your wireless card supports monitor mode
- Try different drivers
- Use
sudo airmon-ng check killto stop interfering processes
-
No packets captured:
- Verify you’re on the correct channel
- Ensure you’re close enough to the target
- Check if your card supports packet injection
-
WPA cracking too slow:
- Use a more powerful wordlist
- Consider GPU acceleration (hashcat)
- Use rules for wordlist mutation
-
Can’t capture WPA handshake:
- Perform deauthentication attack when clients are active
- Be patient – wait for legitimate clients to connect
-
Driver issues:
- Research your specific wireless chipset
- Consider external adapters (Alfa AWUS036ACH recommended)
-
Legal considerations:
- Always get proper authorization before testing
- Be aware of local laws regarding wireless scanning
Aircrack-ng Packages & Binaries Overview
Core Tools
These are the most commonly used tools in the suite:
| Binary | Description |
|---|---|
aircrack-ng | The main tool for cracking WEP/WPA/WPA2 keys using captured packets. |
airodump-ng | Captures wireless packets and displays real-time network info (BSSID, ESSID, signal strength, clients). |
aireplay-ng | Packet injection tool (used for deauth attacks, fake auth, ARP replay, etc.). |
airmon-ng | Enables monitor mode on wireless interfaces. |
airolib-ng | Stores and manages precomputed WPA/WPA2 PMK (Pairwise Master Key) for faster cracking. |
airbase-ng | Creates fake APs (Evil Twin attacks). |
airdecap-ng | Decrypts WEP/WPA/WPA2 capture files if the key is known. |
airdecloak-ng | Removes WEP cloaking from pcap files. |
airserv-ng | Allows remote access to a wireless card over a network. |
airtun-ng | Creates virtual tunnel interfaces for raw packet injection. |
Attack-Specific Tools
These tools perform specialized attacks:
| Binary | Description |
|---|---|
besside-ng | Automated tool that cracks WEP and WPA while logging all network traffic. |
easside-ng | Allows communication with an AP without the WEP key (deprecated). |
tkiptun-ng | Performs WPA-TKIP attacks (exploits weaknesses in TKIP encryption). |
wesside-ng | Automated WEP cracking tool (deprecated). |
packetforge-ng | Creates encrypted packets for injection (used in ARP replay attacks). |
Capture & Analysis Utilities
These tools help in processing and analyzing captured data:
| Binary | Description |
|---|---|
ivstools | Manipulates IVS (Initialization Vector) files for WEP cracking. |
makeivs-ng | Generates IVS files from pcap files. |
wpaclean | Cleans a pcap file to contain only WPA handshakes. |
airodump-join | Merges multiple pcap files from airodump-ng. |
Helper & Utility Tools
Additional tools for managing and optimizing attacks:
| Binary | Description |
|---|---|
airodump-ng-oui-update | Updates the OUI (Organizationally Unique Identifier) database for MAC vendor lookup. |
airventriloquist-ng | (Experimental) Simulates multiple fake clients on a network. |
buddy-ng | (Deprecated) Used for WEP cracking automation. |
dcrack | Distributed WEP cracking tool (deprecated). |
kstats | Displays WEP key statistical information. |