0Pricing
Cloud & IT Cert Prep · Lesson

Wireless Attacks: Evil Twin, Deauth, and Rogue AP

Understand how attackers set up rogue access points, deauthenticate clients, and perform evil-twin attacks to intercept credentials.

Wireless Attacks: Evil Twin, Deauth, and Rogue AP is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

The Wireless Threat Landscape

Wireless networks are particularly vulnerable because the signal cannot be contained to a physical boundary. Attackers can operate from a car in a parking lot, a neighboring office, or even use long-range directional antennas from hundreds of meters away. The primary wireless attack categories covered on Security+ are evil twin attacks, deauthentication attacks, and rogue access points. Each exploits different weaknesses in how Wi-Fi clients discover, connect to, and trust access points.

Rogue Access Points

A rogue access point is an unauthorized wireless AP connected to a corporate network — either installed by an attacker who gained physical access or set up by a well-intentioned employee for convenience. A rogue AP can bypass the organization's wired security controls by giving attackers or malware a wireless entry point into the internal network. Wireless intrusion detection systems (WIDS) and regular RF surveys detect rogue APs by correlating MAC addresses seen over the air with the authorized AP inventory.

# Detect rogue APs using airodump-ng:
airodump-ng wlan0mon

# Look for BSSIDs not in your authorized AP inventory.
# Rogue AP indicators:
#   - Unknown BSSID transmitting on corporate SSID
#   - Open security on a segment that should be WPA2-Enterprise
#   - Unusual channel or signal strength pattern

Evil Twin Attacks

An evil twin is a rogue AP that impersonates a legitimate access point by broadcasting the same SSID (network name). Clients configured to auto-connect to known SSIDs may connect to the evil twin instead of the legitimate AP, especially if the attacker's signal is stronger. Once connected, the attacker can perform MitM attacks, capture credentials over HTTP, and intercept unencrypted traffic. Evil twin attacks are especially effective against public Wi-Fi networks where clients cannot distinguish the real AP from a fake one.

# Evil twin setup (educational reference):
# hostapd-wpe automates the process for WPA2-Enterprise captures
#
# Basic hostapd evil twin config:
# interface=wlan0
# ssid=CoffeeShop-Free-WiFi   (matches target SSID)
# hw_mode=g
# channel=6
# auth_algs=1
# wpa=0    (open, so clients connect without WPA password)
#
# Traffic then routed through attacker for MitM inspection

Deauthentication (Deauth) Attacks

The 802.11 standard includes management frames for controlling connections, including deauthentication frames that tell a client it has been disconnected from the AP. Without 802.11w (Protected Management Frames), these frames are unauthenticated and anyone can forge them. A deauthentication attack sends spoofed deauth frames to a client, forcing it to disconnect and reconnect. Attackers use deauth attacks to force clients to reveal their 4-way handshake (for WPA2 cracking) or to redirect clients to an evil twin AP with a stronger signal.

# Deauth flood using aireplay-ng (educational reference):
# -0 sends deauthentication frames
# -a = AP BSSID, -c = client MAC (omit to broadcast)
aireplay-ng -0 5 -a AA:BB:CC:DD:EE:FF -c 11:22:33:44:55:66 wlan0mon

# Defense: Enable Protected Management Frames (PMF)
# WPA3 requires PMF; WPA2 supports it with ieee80211w=2 in hostapd

Captive Portal Attacks

Many public Wi-Fi networks use captive portals — web pages that require acceptance of terms or credential entry before granting internet access. Attackers can deploy a rogue AP that redirects clients to a fake captive portal, harvesting credentials or installing malware. Captive portals typically use HTTP (not HTTPS), making them susceptible to MitM. WPA3's OWE (Opportunistic Wireless Encryption) addresses open networks by providing unauthenticated encryption, but captive portals are still common and dangerous. Users should use VPNs on any captive-portal network.

# Detect suspicious captive portals:
# - Certificate validation errors on HTTPS sites
# - Unexpected HTTP redirects from known HTTPS domains
# - SSL stripping: site loads over HTTP when it should use HTTPS
#
# Best practice for users on public Wi-Fi:
# Use a VPN tunnel that encrypts traffic before it leaves the device
# Enable HTTPS-only mode in browser settings

Wireless Evil Twin Detection

Enterprises detect evil twin attacks using Wireless Intrusion Detection Systems (WIDS) that monitor the RF environment continuously. WIDS sensors identify APs broadcasting the corporate SSID with a BSSID not in the approved list, or detect clients connecting to unauthorized APs. Correlation with wired network data helps confirm whether a suspicious AP is actually connected to the internal network (rogue) or is purely external (evil twin). Enterprise WLAN controllers (Cisco, Aruba, Juniper) often have built-in WIDS capabilities that automate this detection.

# WIDS detection logic:
# 1. Baseline: catalog all authorized BSSIDs per SSID
# 2. Monitor: alert on unknown BSSID transmitting corporate SSID
# 3. Wired correlation: scan switch ports for unauthorized APs
#    nmap -p 80 --open 192.168.0.0/24 (find AP management pages)
# 4. Client monitoring: alert when client connects to unknown BSSID
# 5. Automatic countermeasures: WIDS sends deauth to disconnect clients from rogue AP

Jamming and RF Interference

RF jamming is the deliberate transmission of radio frequency signals on the same channel as a target network to cause interference and render it unusable — effectively a wireless DoS attack. Jamming may be illegal in many jurisdictions. Unintentional interference from microwave ovens, baby monitors, and neighboring networks on the same channel is more common and can cause similar symptoms. Organizations experiencing persistent interference should conduct RF spectrum analysis to distinguish jamming from interference and move to clear channels or the 5 GHz / 6 GHz bands where available.

# RF spectrum analysis:
# inSSIDer or Kismet to see channel utilization
# Wi-Fi analyzers show signal strength and channel overlap
#
# Jamming indicators:
#   - All clients lose connectivity simultaneously
#   - Retransmission rates spike on all APs
#   - Spectrum analyzer shows continuous energy on channel
#
# Response: change channel, report to authorities if malicious jamming suspected

WPA2-Enterprise and RADIUS Certificates

WPA2-Enterprise with 802.1X prevents evil twin credential capture because clients authenticate to a RADIUS server using EAP (Extensible Authentication Protocol). The client should validate the RADIUS server's TLS certificate before sending credentials. If clients are not configured to validate the server certificate and pin the expected CA, an evil twin can run a rogue RADIUS server and capture EAP credentials. Certificate validation must be enforced through MDM profiles on corporate devices to prevent this downgrade.

# wpa_supplicant.conf with certificate validation:
# network={
#   ssid='CorporateWiFi'
#   key_mgmt=WPA-EAP
#   eap=PEAP
#   identity='user@company.com'
#   password='SecurePass'
#   ca_cert='/etc/ssl/company-root-ca.pem'
#   phase2='auth=MSCHAPV2'
# }
# ca_cert MUST be set; omitting it enables evil twin RADIUS attacks

Disassociation vs Deauthentication Frames

The 802.11 standard defines two distinct management frame types used to terminate connections. A deauthentication frame tears down the authentication state, while a disassociation frame removes the client from the AP's association table but preserves authentication. Both can be forged without 802.11w. Security+ candidates should understand that both frame types are valid attack vectors for forcing reconnection. The 802.11w amendment (incorporated into WPA2 as optional, mandatory in WPA3) adds a Message Integrity Code (MIC) to these frames, preventing forgery.

Physical Security for Wireless APs

Technical wireless security controls must be complemented by physical security. An AP installed in an accessible area can be factory-reset to default settings, bypassing all security configurations. Best practices include mounting APs in secured or elevated positions, using tamper-evident screws or AP security cages, disabling the reset button via software where possible, and including APs in asset inventory audits. PoE switches that power APs should also be in locked wiring closets so that an attacker cannot simply unplug a legitimate AP and connect their own device.

Wireless Attack Summary and Defenses

To defend against the full range of wireless attacks: enable WPA3 or WPA2-Enterprise to prevent PSK cracking; enforce PMF (802.11w) to block deauthentication attacks; deploy a WIDS to detect evil twins and rogue APs; validate RADIUS certificates to prevent evil twin RADIUS capture; disable WPS to eliminate PIN brute-force; and segment wireless networks by role (corporate, guest, IoT) using separate SSIDs mapped to different VLANs. Combine these controls for a defense-in-depth wireless posture.

Quick Check

Test your understanding of CompTIA Security+ (SY0-701) concepts from this lesson.

Lesson Recap

In this lesson you learned: a rogue AP is an unauthorized access point on the corporate network that bypasses wired security controls, an evil twin impersonates a legitimate SSID to intercept client traffic via MitM, and deauthentication attacks forge 802.11 management frames to disconnect clients — a threat mitigated by Protected Management Frames (802.11w) required by WPA3. Next up we explore enterprise wireless with 802.1X and RADIUS.

Frequently asked questions

Is the “Wireless Attacks: Evil Twin, Deauth, and Rogue AP” lesson free?

Yes — the full text of “Wireless Attacks: Evil Twin, Deauth, and Rogue AP” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.

What will I learn in “Wireless Attacks: Evil Twin, Deauth, and Rogue AP”?

Understand how attackers set up rogue access points, deauthenticate clients, and perform evil-twin attacks to intercept credentials. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cloud & IT Cert Prep?

No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Wireless Attacks: Evil Twin, Deauth, and Rogue AP” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cloud & IT Cert Prep lesson?

Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Wi-Fi Security Protocols: WEP, WPA2, WPA3
  2. Wireless Attacks: Evil Twin, Deauth, and Rogue AP
  3. Enterprise Wireless: 802.1X and RADIUS
  4. Bluetooth and IoT Wireless Threats
← Back to Cloud & IT Cert Prep