WarFi Labs

aircrack-ng

wifi auditing suite ยท GPL-2.0

The classic wifi security suite: put a card in monitor mode, capture a WPA handshake, and test how long your passphrase would survive an offline attack.

Authorized use only. Run these only on systems you own or have explicit written permission to test. Full notice at the foot of the page.

01What aircrack-ng actually is

aircrack-ng is not one program, it is a small toolbox that works together. airmon-ng prepares your wireless card, airodump-ng listens and records, aireplay-ng injects frames, and aircrack-ng does the final cracking. On your own network the point is simple: capture the four-way handshake your devices use to join, then see whether your passphrase can be guessed offline. If it can, so can an attacker sitting in the car park.

» airmon-ng: enable and disable monitor mode on your card.

» airodump-ng: scan for networks and capture packets to a file.

» aireplay-ng: inject frames, most often a deauthentication to force a reconnect.

» aircrack-ng: run a captured handshake against a wordlist.

02Install and check your card

aircrack-ng ships in every security distro and most package managers. The harder part is the card: it must support monitor mode and, for handshake capture, you do not even need injection, but for deauth you do. Atheros (ath9k) and some Ralink and MediaTek chipsets are the safe bets.

$ sudo emerge net-wireless/aircrack-ng # Gentoo

$ sudo apt install aircrack-ng # Debian / Ubuntu / Kali

$ sudo dnf install aircrack-ng # Fedora / RHEL

Supported interface modes: * IBSS * managed * AP * monitor * mesh point

» If you see monitor in that list, the card and driver can do what you need. If you do not, no amount of command-line effort will fix it; you need a different adapter.

03Put the card in monitor mode

In normal (managed) mode a card only hands you traffic addressed to it. Monitor mode tells the card to report every frame in the air on that channel, which is what capture needs. airmon-ng also kills the background services that would otherwise grab the card back.

$ sudo airmon-ng check kill

$ sudo airmon-ng start wlan0

PHY Interface Driver Chipset phy0 wlan0 ath9k_htc Atheros AR9271 (mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon) (mac80211 station mode vif disabled for [phy0]wlan0)

» Your interface is now wlan0mon. Use that name from here on. When you are done, sudo airmon-ng stop wlan0mon returns the card to normal and you can restart NetworkManager.

↑ contents

04Scan the air with airodump-ng

Run airodump-ng with no filters first to see everything around you. The top half lists access points, the bottom half lists clients. You want three columns: the BSSID (the AP's MAC), the CH (channel), and the ESSID (the network name). Note the channel of your target network, you will lock onto it next.

$ sudo airodump-ng wlan0mon

BSSID PWR Beacons #Data CH MB ENC CIPHER AUTH ESSID AA:BB:CC:11:22:33 -41 182 95 6 270 WPA2 CCMP PSK HomeLab DE:AD:BE:EF:00:01 -67 90 3 11 130 WPA2 CCMP PSK Neighbour-5G BSSID STATION PWR Rate Lost Frames Notes AA:BB:CC:11:22:33 66:77:88:99:AA:BB -44 1e- 6e 0 210

» Here the target HomeLab is on channel 6 with one client already associated. A connected client is what makes the next step fast: you can nudge it to reconnect and catch the handshake.

05Lock onto one network and record

Now pin airodump-ng to the target's channel and BSSID and write everything to a file. Staying on one channel means you will not miss the handshake while hopping. Leave this window running; it is your capture.

$ sudo airodump-ng -c 6 --bssid AA:BB:CC:11:22:33 -w homelab wlan0mon

CH 6 ][ Elapsed: 48 s ][ 2026-10-07 14:12 ][ WPA handshake: AA:BB:CC:11:22:33 BSSID PWR RXQ Beacons #Data CH ENC CIPHER AUTH ESSID AA:BB:CC:11:22:33 -41 100 512 140 6 WPA2 CCMP PSK HomeLab

» The prize is that top-right line: WPA handshake: AA:BB:CC:11:22:33. Once it appears, you have captured the four-way handshake and can stop. The -w homelab flag has been writing homelab-01.cap the whole time.

06Force a reconnect to catch the handshake

If no device joins while you watch, you can speed things up by deauthenticating a connected client. The client drops for a moment, reconnects automatically, and that reconnection is the handshake. Send only a few frames; a continuous flood is noisy, disruptive, and unnecessary.

$ sudo aireplay-ng --deauth 5 -a AA:BB:CC:11:22:33 -c 66:77:88:99:AA:BB wlan0mon

14:13:02 Waiting for beacon frame (BSSID: AA:BB:CC:11:22:33) on channel 6 14:13:02 Sending 64 directed DeAuth (code 7). STMAC: [66:77:88:99:AA:BB] [ 32|63 ACKs] 14:13:03 Sending 64 directed DeAuth (code 7). STMAC: [66:77:88:99:AA:BB]

» Flip back to the airodump-ng window. Within a second or two the WPA handshake banner should appear. Targeting a specific client with -c is cleaner and more reliable than a broadcast deauth, and it only touches the one device you chose.

↑ contents

07Run the handshake against a wordlist

WPA2 cannot be brute-forced in the air; the only offline attack is to guess the passphrase and check it against the captured handshake. That is exactly what aircrack-ng does. Point it at a wordlist and the capture file. Speed depends on your CPU, but this is where you learn whether your passphrase is in a common list.

$ aircrack-ng -w /usr/share/wordlists/rockyou.txt homelab-01.cap

Aircrack-ng 1.7 [00:02:11] 184726/14344392 keys tested (1421.33 k/s) Current passphrase: summer2019 KEY FOUND! [ password123 ] Master Key : CD 69 0D 11 8E AC 2C 8B 3F 1A ... Transient Key : 5F A4 2E 77 90 1B ... EAPOL HMAC : 8C 3D 6E 1F ...

» KEY FOUND means your passphrase was in the list, which is the result you never want to see on your own network. If aircrack-ng exhausts the wordlist without a hit, it prints Passphrase not in dictionary. That is good news, but only as good as the list you tried.

08Hand the capture to hashcat for real speed

aircrack-ng cracks on the CPU. For a serious test against a large wordlist with rules, convert the capture and let a GPU do the work in hashcat, which is far faster. The modern path uses the hcxtools suite to produce a 22000-format hash.

$ hcxpcapngtool -o homelab.22000 homelab-01.cap

$ hashcat -m 22000 homelab.22000 /usr/share/wordlists/rockyou.txt

» See the hcxtools and hashcat guides for the full workflow. For wardriving-scale capture of many networks at once, hcxdumptool replaces the airodump-ng and aireplay-ng steps with a single efficient tool.

09A note on WEP

You will still meet WEP on old cameras, printers, and industrial kit. WEP is broken by design: capture enough data frames (the initialisation vectors) and aircrack-ng recovers the key by statistics, no wordlist needed, often in minutes. If you find WEP anywhere you are responsible for, that is the finding; there is nothing to crack, only something to replace.

$ aircrack-ng homelab-01.cap

» With enough IVs captured, aircrack-ng prints KEY FOUND and the key in hex. The lesson is not the technique, it is that any WEP network should be treated as already compromised.

10Turn the result into hardening

Everything above is a test you run so you can fix what it finds. The defensive takeaways are concrete and worth writing into your own checklist.

» Use WPA2 or WPA3 with a long passphrase that is not a word, a date, or a pattern; aim for a random passphrase of real length rather than something memorable.

» A long random passphrase defeats the offline attack entirely, because it will never be in a wordlist.

» Enable 802.11w (protected management frames) to blunt deauthentication; WPA3 requires it.

» Retire WEP and WPA-TKIP anywhere you find them; replace the device if it supports nothing better.

» Treat the capture-and-crack cycle as a periodic check, not a one-off, especially after anyone shares your wifi password.

If your own handshake cracks in seconds, that is not a failure of the exercise, it is the exercise working. Change the passphrase, enable PMF, and run it again until the wordlist comes up empty.

↑ contents

Authorized use only

The tools and techniques in these guides are for defending, testing, and understanding systems you own or have explicit written permission to assess. Unauthorized access to computers, networks, accounts, or data is a criminal offense in nearly every jurisdiction, and the penalties are real.

A few of the laws that apply, by way of example:

Wherever you are, the rule is the same: get authorization in writing, stay within the agreed scope, and never touch a system that is not yours to test. If you are unsure whether something is permitted, treat it as not permitted until you have clear authorization.

This is general information, not legal advice.