aircrack-ng: A suite for monitoring, attacking, testing, and cracking Wi-Fi networks

aircrack-ng: A suite for monitoring, attacking, testing, and cracking Wi-Fi networks

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:

  1. Monitoring: Putting the wireless card in monitor mode to capture all traffic
  2. Packet Capture: Collecting wireless frames and saving them to a file
  3. Attack: Performing specific attacks to generate traffic or exploit vulnerabilities
  4. 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:

Bash
# 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-update

Basic Usage Examples

1. Check WiFi adapter compatibility

Bash
sudo airmon-ng

2. Put interface in monitor mode

Bash
sudo airmon-ng start wlan0

3. Scan for networks

Bash
sudo airodump-ng wlan0mon

4. Capture packets from a specific network

Bash
sudo airodump-ng -c 6 --bssid 00:11:22:33:44:55 -w capture wlan0mon

5. Crack WEP key

Bash
sudo aircrack-ng -b 00:11:22:33:44:55 capture-01.cap

6. Crack WPA handshake (with wordlist)

Bash
sudo aircrack-ng -w wordlist.txt -b 00:11:22:33:44:55 capture-01.cap

Advanced Usage Examples

1. Deauthentication attack to capture handshake

Bash
sudo aireplay-ng --deauth 10 -a 00:11:22:33:44:55 -c FF:FF:FF:FF:FF:FF wlan0mon

2. Create a fake AP (Evil Twin)

Bash
sudo airbase-ng -a 00:11:22:33:44:55 --essid "FreeWiFi" -c 6 wlan0mon

3. WPA PMKID attack (no clients needed)

Bash
sudo hcxdumptool -i wlan0mon -o pmkid.pcapng --enable_status=1
sudo hcxpcaptool -z hashes.txt pmkid.pcapng
sudo aircrack-ng -w wordlist.txt hashes.txt

4. Using the GPU for faster cracking

Bash
sudo aircrack-ng -w wordlist.txt -b 00:11:22:33:44:55 --backend-opt=workload=high capture-01.cap

5. WPS PIN attack

Bash
sudo reaver -i wlan0mon -b 00:11:22:33:44:55 -vv

Command-Line Options (Key Tools)

1. Core AP Configuration

OptionDescription
-a Sets the MAC address of the fake AP.
-c Sets the channel for the AP.
--essid Sets the network name (ESSID).
-XHides the ESSID (makes network “hidden”).
-AEnables Ad-Hoc mode (peer-to-peer networking).
-W 0|1Forces WEP flag in beacons (0 = off, 1 = on).
-I Sets beacon interval in milliseconds (default: 100ms).

2. Encryption & Authentication

OptionDescription
-w Sets a WEP key for the fake AP.
-sForces shared key authentication (WEP).
-S Sets shared key challenge length (default: 128).
-0Enables 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

OptionDescription
-LCaffe-Latte attack (extracts WEP key from clients).
-Ncfrag attack (alternative WEP attack, recommended).
-PResponds to all probe requests (even if ESSID not specified).
-C Broadcasts probed ESSIDs (requires -P).
-yDisables responses to broadcast probes.

4. Traffic Control & Logging

OptionDescription
-x Sets packets per second rate (default: 100).
-F Saves all sent/received frames to a pcap file.
-qQuiet mode (no statistics).
-vVerbose mode (more details).

5. Filtering Options

OptionDescription
--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

Bash
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

Bash
sudo airbase-ng -L -c 6 wlan0mon
  • Attempts to extract WEP keys from connected clients.

3. Capturing WPA Handshakes

Bash
sudo airbase-ng -P -C 30 --essid "VictimWiFi" wlan0mon
  • Broadcasts “VictimWiFi” and logs handshakes.

4. MITM with Fake EAPOL

Bash
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)

Bash
--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 files

aireplay-ng (packet injection)

Bash
--deauth <count> : Deauthentication attack
--fakeauth <delay> : Fake authentication
--arpreplay      : ARP replay attack
--interactive    : Interactive frame selection

Real-World Use Cases

  1. Penetration Testing: Security professionals use Aircrack-ng to test the security of their organization’s wireless networks.

  2. Network Troubleshooting: Analyzing WiFi performance issues and interference problems.

  3. Digital Forensics: Capturing wireless traffic for forensic analysis.

  4. Security Research: Studying wireless protocols and vulnerabilities.

  5. Lost Password Recovery: Recovering forgotten WiFi passwords (with permission).

  6. Educational Purposes: Learning about wireless security in controlled environments.

Troubleshooting Tips

Common Issues and Solutions:

  1. Monitor mode not working:

    • Check if your wireless card supports monitor mode
    • Try different drivers
    • Use sudo airmon-ng check kill to stop interfering processes
  2. 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
  3. WPA cracking too slow:

    • Use a more powerful wordlist
    • Consider GPU acceleration (hashcat)
    • Use rules for wordlist mutation
  4. Can’t capture WPA handshake:

    • Perform deauthentication attack when clients are active
    • Be patient – wait for legitimate clients to connect
  5. Driver issues:

    • Research your specific wireless chipset
    • Consider external adapters (Alfa AWUS036ACH recommended)
  6. 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:

BinaryDescription
aircrack-ngThe main tool for cracking WEP/WPA/WPA2 keys using captured packets.
airodump-ngCaptures wireless packets and displays real-time network info (BSSID, ESSID, signal strength, clients).
aireplay-ngPacket injection tool (used for deauth attacks, fake auth, ARP replay, etc.).
airmon-ngEnables monitor mode on wireless interfaces.
airolib-ngStores and manages precomputed WPA/WPA2 PMK (Pairwise Master Key) for faster cracking.
airbase-ngCreates fake APs (Evil Twin attacks).
airdecap-ngDecrypts WEP/WPA/WPA2 capture files if the key is known.
airdecloak-ngRemoves WEP cloaking from pcap files.
airserv-ngAllows remote access to a wireless card over a network.
airtun-ngCreates virtual tunnel interfaces for raw packet injection.

Attack-Specific Tools

These tools perform specialized attacks:

BinaryDescription
besside-ngAutomated tool that cracks WEP and WPA while logging all network traffic.
easside-ngAllows communication with an AP without the WEP key (deprecated).
tkiptun-ngPerforms WPA-TKIP attacks (exploits weaknesses in TKIP encryption).
wesside-ngAutomated WEP cracking tool (deprecated).
packetforge-ngCreates encrypted packets for injection (used in ARP replay attacks).

Capture & Analysis Utilities

These tools help in processing and analyzing captured data:

BinaryDescription
ivstoolsManipulates IVS (Initialization Vector) files for WEP cracking.
makeivs-ngGenerates IVS files from pcap files.
wpacleanCleans a pcap file to contain only WPA handshakes.
airodump-joinMerges multiple pcap files from airodump-ng.

Helper & Utility Tools

Additional tools for managing and optimizing attacks:

BinaryDescription
airodump-ng-oui-updateUpdates 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.
dcrackDistributed WEP cracking tool (deprecated).
kstatsDisplays WEP key statistical information.

Total
0
Shares

Leave a Reply

Previous Post
spooftooph: Bluetooth hacking tool for sniffing, spoofing, and cracking Bluetooth devices

spooftooph: Bluetooth hacking tool for sniffing, spoofing, and cracking Bluetooth devices

Next Post
kismet: A wireless network detector, sniffer, and intrusion detection system

kismet: A wireless network detector, sniffer, and intrusion detection system

Related Posts