Lesson 8 of 13 · 13m
Evil Twins, KARMA, and the AP That Only Has to Shout Louder
Clients authenticate to a name, not an AP — so a rogue AP with the same SSID and a stronger signal wins, and probe requests make it automatic.
The client authenticates nothing about the AP. It finds a name it knows, checks the signal, and joins. An evil twin only has to claim the name and shout louder than the original. Everything else is refinement.
The basic move
Broadcast SSID CorpNet from an attacker AP — a laptop with hostapd, a $200 Wi-Fi Pineapple, a travel router. Same name, stronger signal, no WPA handshake needed if you make yours open or use your own PSK. Deauth the clients off the real AP and they migrate to the stronger signal automatically; client reassociation logic prefers strong BSSIDs and asks no questions.
What you get depends on the flavor:
- Open twin: raw MITM. Every byte of cleartext traffic, DNS, captive portal redirects.
- WPA2 twin with a known-to-attacker PSK: a "secured" network that harvests the victim's handshake — and the captive portal you put behind it gets their creds too.
- Enterprise twin: PEAP clients that skip cert validation hand you MSCHAPv2 challenge/responses.
Building one
The attacker-side tooling is unglamorous: hostapd on a laptop with a USB radio does the AP work, and a second radio or the wired side provides the uplink. The Wi-Fi Pineapple wraps all of it — twin broadcasting, probe-response spoofing, a captive-portal module — in a product a junior can run. Nothing about the setup is exotic, which is the point: the client does all the hard work by trusting the name.
KARMA: answering the probes
Phones don't only listen — they actively probe for networks they remember. KARMA, originally by Dino Dai Zovi and Shane Macaulay, and its modern descendant MANA (SensePost, 2015) make the rogue AP answer every probe with the matching SSID: probe for "Hilton Honors" and the AP becomes Hilton Honors for that client. The Pineapple productized this. Modern clients probe less aggressively and randomize MACs, which blunted classic KARMA — but "improved" doesn't mean "gone", and pinned enterprise SSIDs still get probed.
The captive portal layer
OSes detect portals with canary probes — Apple hits captive.apple.com, Android hits connectivitycheck.gstatic.com, Firefox hits detectportal.firefox.com. A rogue open network that answers the canary with a portal redirect gets an instant browser window in the victim's face. Clone the hotel/airport/employer login page and harvest. This is why captive portals are the weakest trust ritual in computing: the portal can ask for anything and the network never had to prove itself first.
Downgrade as a tactic
Clients pick by band and signal. Jam or deauth clients off 5 GHz and they look at 2.4 GHz — where your twin lives. In WPA3 transition mode, offering the WPA2 cipher on the twin SSID makes modern clients run the crackable handshake. Every "backward compatible" toggle is an attacker's lever, and the client's band preference does the steering for free.
Why clients fall for it
The client never authenticated the network in the first place — it proved it knew the password, but nothing ever proved the AP deserved to ask. A stronger BSSID wins reassociation logic, and "the Wi-Fi reconnected" is invisible to the user. The protocol-level fix exists on enterprise gear: the AP's certificate, verified during 802.1X. On PSK networks there is no AP identity at all, which is why evil twins remain undefeated against PSK auth.
What to do
- Kill auto-join for anything untrusted. A remembered open network is a standing invitation.
- PEAP must pin CA + server name (or the cert prompt means nothing); EAP-TLS makes the whole phishing angle irrelevant.
- A VPN past the Wi-Fi layer confines an open-twin compromise to the tunnel endpoint.
- Detection: an SSID your org owns suddenly present on a foreign BSSID or the wrong channel is the signature — catch it in a survey before users do.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
The Same Researcher Broke apt the Same Way Twice, Seven Years Apart
In 2019 Max Justicz showed apt would install a package an attacker swapped in over a redirect. In November 2026 he did it again, CVE-2026-109518, through a different door that ends in the same place: code as root from a man in the middle. The fix shows how apt reuses files on disk.
A 257-Byte Password Is the Key: Inside the OpenSSH musl Bypass
CVE-2026-123158 lets an attacker log into a locked account on musl-based systems like Alpine by sending a password nobody set. The trigger is one number, 257, and the reason is a C library returning a single asterisk. I reproduced the exact boundary against musl 1.2.4 and read the fix.
Zero-Trust Access for Homelabbers: Teleport vs. Tailscale vs. WireGuard vs. Cloudflare Tunnel
Four tools solve four different problems that all get pitched as the same problem. Here's what each one does, where each one breaks, and the combination that covers a real homelab without paying an SSO tax you didn't see coming.
Zero Trust Everything: The Complete Guide to Self-Hosting Teleport for Secure Infrastructure Access
SudoSecurity runs Teleport internally for everything — admin panel access, secure database connections, Kubernetes, and zero-trust philosophy across our entire team. This is the complete technical guide to installing, configuring, and running your own self-hosted Teleport cluster from scratch.