aircrack-ng

The aircrack-ng Suite Explained

Introduction

The aircrack-ng suite is the classic toolkit for authorized WPA/WPA2 testing. Four programs do most of the work: airmon-ng puts a wireless adapter into monitor mode, airodump-ng captures traffic, aireplay-ng injects frames (including deauthentication), and aircrack-ng attempts to recover the pre-shared key from a captured handshake. This post explains what each tool does and how they fit together in a single workflow.

airmon-ng: enabling monitor mode

airmon-ng is the starting point for any capture. It lists compatible interfaces, stops processes that interfere with monitor mode, and switches the adapter over. Monitor mode is what lets the adapter receive every 802.11 frame on a channel, not just frames addressed to it.

# List interfaces
airmon-ng

# Stop interfering processes
airmon-ng check kill

# Enable monitor mode on wlan0
airmon-ng start wlan0

# Verify the new monitor interface (often wlan0mon)
iw dev

On current kernels the tool may put wlan0 into monitor mode in place rather than creating a separate wlan0mon interface. The --verbose flag prints driver detail that helps when troubleshooting adapter support.

airodump-ng: packet capture

With the adapter in monitor mode, airodump-ng shows live access points and clients and writes captures to disk. Running it with no filters surveys every channel so you can find your target's BSSID, channel, and encryption.

Useful options:

  • -c <channel>: lock to one channel.
  • --bssid <MAC>: focus on one access point.
  • -w <prefix>: write captured packets to <prefix>-01.cap.
  • --write-interval <seconds>: set how often the CSV and kismet summary files are rewritten.
# Capture on channel 6, focus on one AP, write to a file
airodump-ng -c 6 --bssid 00:11:22:33:44:55 -w capture_001 wlan0mon

When a client connects or reconnects, the capture records the four-way handshake you need for cracking. Watch the top-right of the airodump-ng display for the WPA handshake notice.

aireplay-ng: packet injection and deauth

You can wait for a client to reconnect on its own, or, in an authorized test, force it with a deauthentication frame. aireplay-ng's deauth mode disconnects a client, which then re-associates and produces a fresh handshake.

# Deauth one client on the target AP (preferred: targeted)
aireplay-ng -0 5 -a 00:11:22:33:44:55 -c 66:77:88:99:AA:BB wlan0mon

# Broadcast deauth (omit -c) affects all clients; use sparingly
aireplay-ng -0 5 -a 00:11:22:33:44:55 wlan0mon
  • -0: deauth mode.
  • 5: number of deauth bursts to send.
  • -a: BSSID of the target AP.
  • -c: MAC of a specific client. Targeting one client is cleaner and less disruptive than a broadcast deauth.

Deauthentication is active interference and may be illegal without permission. Capture passively where you can.

aircrack-ng: password cracking

Given a .cap file with a complete handshake, aircrack-ng tries to recover the PSK with a dictionary attack. It is CPU-based and tests each candidate passphrase from a wordlist:

aircrack-ng -w /usr/share/wordlists/rockyou.txt -b 00:11:22:33:44:55 capture_001-01.cap

A few points worth keeping straight:

  • For WPA/WPA2-PSK, aircrack-ng runs dictionary attacks on the CPU. Its PTW and statistical attacks apply only to WEP. It has no GPU, mask, or rule-based hybrid modes.
  • For GPU acceleration, masks, or rules, convert the capture with hcxpcapngtool -o hash.22000 capture_001-01.cap and run hashcat in mode 22000. oclHashcat was merged into hashcat years ago.
  • There is no --pmkid flag. Since version 1.4, aircrack-ng detects a PMKID in a loaded capture automatically and cracks it like a handshake, with the same wordlist requirement. Dedicated PMKID capture is usually done with hcxdumptool, followed by hashcat mode 22000.

A full testing workflow

  1. Authorize. Get written permission and pick a monitor-capable adapter.
  2. Monitor mode with airmon-ng start wlan0.
  3. Survey with airodump-ng wlan0mon to find the BSSID and channel.
  4. Focus the capture on that AP and channel, writing to a file.
  5. Trigger a handshake by waiting for a reconnect, or with a targeted aireplay-ng deauth.
  6. Verify the handshake in the airodump-ng banner or by opening the .cap in Wireshark and filtering on eapol.
  7. Crack with aircrack-ng, or convert and run hashcat for GPU speed.
  8. Report with concrete recommendations such as a longer passphrase or WPA3.
flowchart TD
    A[Authorized test] --> B[airmon-ng start wlan0]
    B --> C[airodump-ng survey]
    C --> D[airodump-ng -c CH --bssid BSSID -w cap]
    D --> E{Handshake captured?}
    E -- No --> F[aireplay-ng targeted deauth]
    F --> D
    E -- Yes --> G[aircrack-ng -w list -b BSSID cap.cap]
    G --> H{Key found?}
    H -- No --> I[Convert to 22000, crack with hashcat]
    H -- Yes --> J[Report and remediate]
    I --> J

Capturing handshakes with the BLEShark Nano

The BLEShark Nano can capture WPA handshakes in a handheld form factor and save them as PCAP on the host, which you then analyze with the same tools above. It is a capture device, not a reimplementation of aircrack-ng; the cracking still happens on your computer with aircrack-ng or hashcat.

# Capture a handshake to a host PCAP (and a hashcat 22000 file)
infishark wifi handshake --ssid LabAP

# Listen without sending deauth frames
infishark wifi handshake --ssid LabAP --passive

EU firmware disables deauth, so on those units handshake capture is passive-listen only. See docs.infishark.com for the full command reference. If you run several Nanos on a Shiver mesh, each one captures locally and announces which networks it has covered so the group does not re-capture the same handshake; the PCAP files are gathered later with Shiver Sync.

Conclusion

The aircrack-ng suite covers the full chain of an authorized WPA2 audit: monitor mode, capture, optional deauth, and dictionary cracking. For heavier cracking, hand the capture to hashcat. Whatever tools you use, the discipline matters more than the commands: get permission, document each step, and give the owner clear remediation advice.

The information in this article is for educational purposes. Only test networks you own or have explicit written permission to assess.

Get the BLEShark Nano

Back to blog

Leave a comment