Detect Evil Twin in CrowdStrike LogScale
Adversaries may host fraudulent Wi-Fi access points using the same SSID as a legitimate network to intercept traffic, steal credentials, or deliver malware. Evil Twin attacks exploit the 802.11 protocol's lack of mutual AP authentication — clients connect to whichever access point advertises the correct SSID with the strongest signal, without verifying the AP's identity. Attackers use tools such as hostapd, airbase-ng, create_ap, or Wi-Fi Pineapple devices to clone corporate or public SSIDs. Upon connection, victims are often directed to a fake captive portal for credential harvesting or subjected to man-in-the-middle attacks against unencrypted or SSL-stripped traffic. Attackers may also listen for 802.11 probe requests in which client devices broadcast previously connected network names (Preferred Network Lists), responding with matching SSIDs to automatically attract victim connections. APT28 (Fancy Bear / GRU) operationally deployed Wi-Fi Pineapple devices for Evil Twin attacks during intelligence collection operations against Organization for the Prohibition of Chemical Weapons (OPCW) and other targets, as documented in the October 2018 GRU indictment.
MITRE ATT&CK
- Tactic
- Credential Access Collection
- Technique
- T1557 Adversary-in-the-Middle
- Sub-technique
- T1557.004 Evil Twin
- Canonical reference
- https://attack.mitre.org/techniques/T1557/004/
LogScale Detection Query
// Evil Twin Detection — SSID/BSSID cardinality anomaly via Windows WLAN AutoConfig events
// Requires Windows Event Log collection for Microsoft-Windows-WLAN-AutoConfig/Operational channel
event.provider = "Microsoft-Windows-WLAN-AutoConfig"
| EventID in (8001, 11005)
| ssid := replace(field=Message, regex="(?ms).*?SSID\\s*:\\s*([^\\r\\n]+).*", replacement="$1")
| bssid := replace(field=Message, regex="(?ms).*?BSSID\\s*:\\s*([0-9a-fA-F:]{17}).*", replacement="$1")
| ssid := trim(ssid)
| bssid := lower(bssid)
| ssid != ""
| bssid != "00:00:00:00:00:00"
| regex(field=ssid, regex="(?i)(corp|office|employee|secure|work|hq|internal|guest|wireless)")
| groupBy(
[ssid],
function=[
count(distinct=bssid, as=unique_bssid_count),
array(bssid, as=observed_bssids, limit=20),
count(distinct=ComputerName, as=affected_host_count),
array(ComputerName, as=affected_hosts, limit=50),
min(@timestamp, as=first_seen),
max(@timestamp, as=last_seen)
]
)
| unique_bssid_count > 2
| evil_twin_risk := if(unique_bssid_count > 5, "HIGH", if(unique_bssid_count > 3, "MEDIUM", "LOW"))
| sort(field=unique_bssid_count, order=desc) CrowdStrike LogScale CQL detection for Evil Twin AP attacks via SSID-to-BSSID cardinality aggregation over Windows WLAN AutoConfig events. Parses SSID and BSSID fields from Windows Event ID 8001 and 11005 message text using regex extraction, normalizes values, then groups by SSID to count distinct BSSIDs and affected endpoints across the search window. SSIDs observed with more than two distinct BSSIDs are flagged as potential Evil Twin incidents with a tiered risk score (HIGH above 5 unique BSSIDs, MEDIUM above 3, LOW above 2). Requires Windows Event Log collection to be enabled in the Falcon sensor policy with the Microsoft-Windows-WLAN-AutoConfig/Operational channel added, or an alternative forwarding pipeline (e.g., Cribl, NXLog, Winlogbeat) ingesting WLAN events into LogScale. Tune the SSID regex pattern to match your organization's corporate network naming standards and the unique_bssid_count threshold to your wireless infrastructure's baseline AP density per SSID.
Data Sources
Required Tables
False Positives & Tuning
- Dense enterprise AP deployments broadcasting a single corporate SSID across many access points — a large office with 30 APs sharing one SSID name will produce 30 distinct BSSIDs in the aggregation; baseline the expected BSSID count per SSID during a quiet period and set the threshold to expected-max plus a buffer rather than a static value of 2
- Falcon sensor Windows Event Log collection may produce duplicate or malformed event records during log channel buffering or sensor policy changes, causing the regex BSSID extraction to return empty or constant placeholder strings that inflate or deflate the cardinality count artificially
- Road warriors and remote employees who work from multiple locations (home office, coffee shop, client site) each with a Wi-Fi network that matches corporate SSID patterns (e.g., a home router named 'homecorp') contribute unique BSSIDs to the aggregation that have no adversarial relevance
Other platforms for T1557.004
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Evil Twin AP with hostapd and dnsmasq on Linux
Expected signal: On victim Windows devices connecting to the rogue AP: WLAN AutoConfig Event ID 8001 in Microsoft-Windows-WLAN-AutoConfig/Operational showing successful connection to 'TargetCorporateSSID' with the attacker NIC's MAC address as BSSID. DHCP lease assignment from 192.168.50.x range (distinct from corporate DHCP). MDE DeviceNetworkInfo records new BSSID and gateway 192.168.50.1 for the SSID. DNS queries from victim directed to 192.168.50.1.
- Test 2Karma / Evil Twin Probe Response Attack with airbase-ng
Expected signal: Victim devices send visible 802.11 probe requests (capture with: tcpdump -i wlan0mon -e 'wlan type mgt subtype probe-req' 2>/dev/null). airbase-ng probe responses visible in tcpdump (subtype probe-resp). Victim device connection generates WLAN AutoConfig Event 8001 with airbase-ng NIC MAC as BSSID. DeviceNetworkInfo in MDE captures at0 MAC as BSSID with SSID 'TargetCorporateSSID'. DHCP logs show 192.168.55.x lease assignment.
- Test 3Wi-Fi Pineapple PineAP SSID Broadcast Configuration
Expected signal: Victim devices: WLAN AutoConfig Event 8001 with Pineapple's BSSID (Hak5 LLC OUI: 02:13:37 or similar; or randomized MAC depending on firmware version). Default gateway assignment from Pineapple's DHCP (typically 172.16.42.x or configured range). DeviceNetworkInfo captures Pineapple MAC as BSSID. Captive portal HTTP POST requests to 172.16.42.1 visible in web proxy logs. EvilPortal logs on Pineapple at /pineapple/modules/EvilPortal/logs/ contain captured credentials.
- Test 4Windows Mobile Hotspot Rogue AP (No Special Hardware Required)
Expected signal: On the attacker device: Microsoft-Windows-WLAN-AutoConfig/Operational events related to hosted network state changes; System Event Log entries for the 'Microsoft Hosted Network Virtual Adapter' appearing. On victim devices that connect: WLAN AutoConfig Event 8001 with attacker device's virtual adapter MAC (Microsoft Virtual WiFi Miniport Adapter OUI) as BSSID. Default gateway 192.168.137.1 (Windows Mobile Hotspot default) appears in DeviceNetworkInfo — distinct from corporate gateway. DeviceNetworkInfo records new BSSID for the corporate-named SSID.
References (9)
- https://attack.mitre.org/techniques/T1557/004/
- https://usa.kaspersky.com/resource-center/preemptive-safety/evil-twin-attacks
- https://kavigihan.medium.com/wireless-security-evil-twin-attack-d3842f4aef59
- https://posts.specterops.io/modern-wireless-attacks-pt-i-basic-rogue-ap-theory-evil-twin-and-karma-attacks-35a8571550ee
- https://www.bleepingcomputer.com/news/security/australian-charged-for-evil-twin-wifi-attack-on-plane/
- https://www.justice.gov/opa/press-release/file/1098481/download
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-devicenetworkinfo-table
- https://learn.microsoft.com/en-us/windows/win32/nativewifi/wlan-profileschema-elements
- https://github.com/hak5/wifipineapple-modules
Unlock Pro Content
Get the full detection package for T1557.004 including response playbook, investigation guide, and atomic red team tests.