T1557.004

Evil Twin

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.

Microsoft Sentinel / Defender
kusto
// Evil Twin Detection via SSID/BSSID Anomaly Analysis
// Requires Microsoft Defender for Endpoint (MDE) telemetry — DeviceNetworkInfo table
// Detects the same SSID being advertised by multiple distinct BSSIDs across enrolled endpoints
// Legitimate enterprise AP clusters have a known, bounded set of BSSIDs per SSID;
// an Evil Twin introduces a new, unauthorized BSSID advertising the same corporate SSID
let TimeWindow = 24h;
let BSSIDThreshold = 2; // Tune based on your wireless infrastructure AP count per SSID
let CorporateSSIDPatterns = dynamic(["corp", "office", "employee", "secure", "work", "hq", "internal", "guest", "wireless"]);
// Step 1: Map all SSID -> BSSID observations across all enrolled devices in the time window
let SSIDBSSIDMap =
    DeviceNetworkInfo
    | where Timestamp > ago(TimeWindow)
    | extend ParsedNetworks = parse_json(ConnectedNetworks)
    | mv-expand Network = ParsedNetworks
    | extend
        SSID       = tostring(Network.SSID),
        BSSID      = tostring(Network.BSSID),
        AuthType   = tostring(Network.AuthenticationType),
        CipherType = tostring(Network.CipherType)
    | where SSID != "" and BSSID != "" and BSSID != "00:00:00:00:00:00"
    | where SSID has_any (CorporateSSIDPatterns)
    | summarize
        UniqueBSSIDs  = make_set(BSSID),
        BSSIDCount    = dcount(BSSID),
        AffectedDevices = make_set(DeviceName),
        DeviceCount   = dcount(DeviceName),
        AuthTypes     = make_set(AuthType),
        CipherTypes   = make_set(CipherType),
        FirstSeen     = min(Timestamp),
        LastSeen      = max(Timestamp)
      by SSID
    | where BSSIDCount > BSSIDThreshold;
// Step 2: Join back to individual device connections for analyst triage
DeviceNetworkInfo
| where Timestamp > ago(TimeWindow)
| extend ParsedNetworks = parse_json(ConnectedNetworks)
| mv-expand Network = ParsedNetworks
| extend
    SSID     = tostring(Network.SSID),
    BSSID    = tostring(Network.BSSID),
    AuthType = tostring(Network.AuthenticationType)
| where SSID != "" and BSSID != ""
| join kind=inner SSIDBSSIDMap on SSID
| project
    Timestamp,
    DeviceName,
    SSID,
    ConnectedBSSID    = BSSID,
    AllObservedBSSIDs = UniqueBSSIDs,
    TotalBSSIDCount   = BSSIDCount,
    TotalAffectedDevices = DeviceCount,
    AuthType,
    AuthTypesObserved = AuthTypes,
    CipherTypesObserved = CipherTypes,
    FirstSeen,
    LastSeen
| sort by Timestamp desc
high severity medium confidence

Data Sources

Network Traffic: Network Traffic Flow Network Traffic: Network Connection Creation Microsoft Defender for Endpoint — DeviceNetworkInfo

Required Tables

DeviceNetworkInfo

False Positives

  • Enterprise wireless networks with band steering where the same physical AP serves 2.4GHz, 5GHz, and 6GHz (Wi-Fi 6E) bands — each radio has a distinct BSSID for the same SSID, legitimately producing 2-3 BSSIDs per AP
  • Mesh Wi-Fi deployments (Cisco Meraki, Ubiquiti UniFi, Aruba Instant) where each mesh node has a unique BSSID for the same SSID — large campus environments with dozens of APs generate very high BSSID counts
  • Wireless LAN controllers using roaming optimization (802.11r Fast BSS Transition) that may create transient BSSIDs during roaming handoffs
  • Wi-Fi repeaters and range extenders rebroadcasting the same SSID with a different (self-assigned) BSSID
  • Guest Wi-Fi VLAN segmentation where the same SSID is broadcast on separate VLANs by different AP radios, each with a unique BSSID

Unlock Pro Content

Get the full detection package for T1557.004 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections