Entra ID Potential Passkey Downgrade


Description

Identifies a Microsoft Entra ID user whose recent fresh authentications are predominantly phishing-resistant (passkey/FIDO2 or Windows Hello for Business) but who then successfully completes a phishable method such as Authenticator push, OATH, SMS, or voice. Adversary-in-the-middle proxies force this downgrade by suppressing the passkey prompt so the victim falls back to a relayable method. Legitimate fallback produces the same pattern, so the alert requires corroboration.

Query · esql

FROM logs-azure.signinlogs-*
| WHERE azure.signinlogs.category == "SignInLogs"
    AND azure.signinlogs.properties.session_id IS NOT NULL
    AND azure.signinlogs.properties.authentication_details IS NOT NULL
    AND azure.signinlogs.properties.user_id IS NOT NULL
    AND azure.signinlogs.properties.user_principal_name IS NOT NULL
    AND azure.signinlogs.properties.tenant_id IS NOT NULL

// Pair each authentication method with its success flag from the flattened authentication_details
| EVAL ad = TO_STRING(azure.signinlogs.properties.authentication_details)
| GROK ad """"authentication_method":%{DATA:method_raw},"authentication_"""
| GROK ad """"succeeded":%{DATA:succeeded_raw}}"""
| EVAL Esql.auth_methods = SPLIT(REPLACE(method_raw, """[\[\]"]""", ""), ","),
       Esql.auth_method_succeeded = SPLIT(REPLACE(succeeded_raw, """[\[\]"]""", ""), ",")
| EVAL Esql.method_outcome_pairs = MV_CONCAT(MV_ZIP(Esql.auth_methods, Esql.auth_method_succeeded, "~"), " || ")

// Flag sessions where a phishing-resistant or a phishable method actually succeeded (passkey/WHfB vs push/OATH/SMS/voice)
| EVAL Esql.resistant_method_success = CASE(
      Esql.method_outcome_pairs LIKE "*Passkey (synced)~true*" OR Esql.method_outcome_pairs LIKE "*Passkey (device-bound)~true*"
      OR Esql.method_outcome_pairs LIKE "*FIDO2 security key~true*" OR Esql.method_outcome_pairs LIKE "*Windows Hello for Business~true*", 1, 0),
    Esql.phishable_method_success = CASE(
      Esql.method_outcome_pairs LIKE "*Mobile app notification~true*" OR Esql.method_outcome_pairs LIKE "*OATH verification code~true*"
      OR Esql.method_outcome_pairs LIKE "*Text message~true*" OR Esql.method_outcome_pairs LIKE "*Voice call~true*", 1, 0)

// A downgrade event is a phishable method succeeding within the recent window
| EVAL Esql.is_downgrade = Esql.phishable_method_success == 1 AND @timestamp >= NOW() - 24 hour

// Aggregate session counts and downgrade-event context by tenant and user
| STATS Esql.total_sessions = COUNT_DISTINCT(azure.signinlogs.properties.session_id),
        Esql.resistant_sessions = COUNT_DISTINCT(CASE(Esql.resistant_method_success == 1, azure.signinlogs.properties.session_id, null)),
        Esql.phishable_sessions = COUNT_DISTINCT(CASE(Esql.phishable_method_success == 1, azure.signinlogs.properties.session_id, null)),
        Esql.baseline_resistant = COUNT_DISTINCT(CASE(Esql.resistant_method_success == 1 AND @timestamp < NOW() - 24 hour, azure.signinlogs.properties.session_id, null)),
        Esql.baseline_phishable = COUNT_DISTINCT(CASE(Esql.phishable_method_success == 1 AND @timestamp < NOW() - 24 hour, azure.signinlogs.properties.session_id, null)),
        Esql.downgrade_session_count = COUNT_DISTINCT(CASE(Esql.is_downgrade, azure.signinlogs.properties.session_id, null)),
        Esql.last_seen = MAX(@timestamp),
        Esql.downgrade_methods = VALUES(CASE(Esql.is_downgrade, Esql.method_outcome_pairs, null)),
        Esql.downgrade_sessions = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.session_id, null)),
        Esql.downgrade_ips = VALUES(CASE(Esql.is_downgrade, source.ip, null)),
        Esql.downgrade_as_orgs = VALUES(CASE(Esql.is_downgrade, source.`as`.organization.name, null)),
        Esql.downgrade_countries = VALUES(CASE(Esql.is_downgrade, source.geo.country_name, null)),
        Esql.downgrade_user_agents = VALUES(CASE(Esql.is_downgrade, user_agent.original, null)),
        Esql.downgrade_device_os = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.device_detail.operating_system, null)),
        Esql.downgrade_apps = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.app_display_name, null)),
        Esql.downgrade_resources = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.resource_display_name, null)),
        Esql.downgrade_client_apps = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.client_app_used, null)),
        Esql.downgrade_ca_status = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.conditional_access_status, null)),
        Esql.downgrade_risk_states = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.risk_state, null)),
        Esql.downgrade_correlation_ids = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.correlation_id, null)),
        Esql.downgrade_outcomes = VALUES(CASE(Esql.is_downgrade, event.outcome, null))
    BY azure.signinlogs.properties.tenant_id, azure.signinlogs.properties.user_principal_name, azure.signinlogs.properties.user_id

// Require a minimum resistant baseline (sessions older than 24h) and at least one recent downgrade
| WHERE Esql.baseline_resistant >= 3 AND Esql.downgrade_session_count >= 1

// Phishing-resistant ratio over the baseline only, so the downgrade session should not dilute it (token-reuse / unresolved sessions excluded)
| EVAL Esql.unknown_sessions = Esql.total_sessions - Esql.phishable_sessions - Esql.resistant_sessions,
       Esql.fresh_auth_sessions = Esql.resistant_sessions + Esql.phishable_sessions,
       Esql.resistant_ratio = Esql.baseline_resistant::double / (Esql.baseline_resistant + Esql.baseline_phishable)

// Keep predominantly phishing-resistant users (>= 90%)
| WHERE Esql.resistant_ratio >= 0.9
| KEEP azure.*, Esql.*

Implementation guide

This rule requires the Azure integration with Microsoft Entra ID Sign-In logs enabled and collected via Azure Event Hub.

Known false positives

  • A user who predominantly uses a passkey can legitimately fall back to a weaker method when their authenticator is unavailable (lost or forgotten security key, new or wiped device, biometric failure). Correlate the downgrade session's source IP, geo, ASN, user agent, device, and Conditional Access result with the user's norm, and confirm whether a help-desk or self-service recovery occurred. Only meaningful in environments with meaningful passkey adoption.

Analyst notes

Investigating Entra ID Potential Passkey Downgrade

This rule flags a user whose fresh authentications over the window are predominantly phishing-resistant (passkey/FIDO2 or Windows Hello for Business) but who then successfully completed authentication with a phishable method (Authenticator push, OATH, SMS, or voice) in the recent window. Each sign-in's authentication_details steps are paired with their succeeded flag, so only methods that actually succeeded are counted. The phishing-resistant ratio is computed over a baseline of sessions older than 24 hours (at least 3 resistant sessions required), so the recent downgrade cannot dilute it, and only over sessions with a successful fresh method (resistant plus phishable); sessions with only single sign-on token reuse (or whose establishing event is outside the window) are reported as unknown and excluded from the ratio rather than assumed to be passkey. Adversary-in-the-middle phishing can force this downgrade by suppressing the passkey prompt so the victim falls back to a relayable method the proxy can capture.

Possible investigation steps

  • Review the recent downgrade session(s) (Esql.downgrade_sessions, Esql.downgrade_methods, Esql.downgrade_apps, Esql.downgrade_resources): inspect Esql.downgrade_user_agents and Esql.downgrade_device_os for an unsupported/impossible browser-OS pairing, Esql.downgrade_ips/Esql.downgrade_countries/Esql.downgrade_as_orgs for hosting or VPS origins, and Esql.downgrade_ca_status for whether Conditional Access actually granted access.
  • Confirm the user is genuinely passkey-preferring (Esql.baseline_resistant, Esql.baseline_phishable, Esql.resistant_ratio) rather than one who routinely mixes methods, and review Esql.unknown_sessions (token reuse / unresolved origin) separately.
  • Correlate with recent authentication-method registration (a new passkey added nearby) and with device registration or PRT issuance for post-compromise persistence, and with subsequent Previously satisfied token reuse from a new ASN (stolen-session use).

False positive analysis

  • Legitimate fallback when a passkey authenticator is unavailable produces the same shape; validate device, network, and recovery workflow.
  • A durable shift away from passkey lowers the resistant ratio over the window and stops qualifying.

Response and remediation

  • If unauthorized, treat the account as potentially compromised: revoke sessions and refresh tokens, remove any attacker-registered authentication methods or devices (delete devices first to break device-bound PRT persistence), and reset credentials.
  • Enforce a phishing-resistant Conditional Access authentication strength so weaker methods cannot satisfy authentication.
Raw source Entra ID Potential Passkey Downgrade · Elastic TOML
Esc
Published by elastic/detection-rules ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[metadata]
creation_date = "2026/10/21"
integration = ["azure"]
maturity = "production"
min_stack_comments = "ES|QL support for the flattened field type (authentication_details) is in preview from 9.5."
min_stack_version = "9.5.0"
updated_date = "2026/11/18"

[rule]
author = ["Elastic"]
description = """
Identifies a Microsoft Entra ID user whose recent fresh authentications are predominantly phishing-resistant
(passkey/FIDO2 or Windows Hello for Business) but who then successfully completes a phishable method such as
Authenticator push, OATH, SMS, or voice. Adversary-in-the-middle proxies force this downgrade by suppressing the passkey
prompt so the victim falls back to a relayable method. Legitimate fallback produces the same pattern, so the alert
requires corroboration.
"""
false_positives = [
    """
    A user who predominantly uses a passkey can legitimately fall back to a weaker method when their authenticator is
    unavailable (lost or forgotten security key, new or wiped device, biometric failure). Correlate the downgrade
    session's source IP, geo, ASN, user agent, device, and Conditional Access result with the user's norm, and confirm
    whether a help-desk or self-service recovery occurred. Only meaningful in environments with meaningful passkey
    adoption.
    """,
]
from = "now-5d"
interval = "15m"
language = "esql"
license = "Elastic License v2"
name = "Entra ID Potential Passkey Downgrade"
note = """## Triage and analysis

### Investigating Entra ID Potential Passkey Downgrade

This rule flags a user whose fresh authentications over the window are predominantly phishing-resistant (passkey/FIDO2 or Windows Hello for Business) but who then successfully completed authentication with a phishable method (Authenticator push, OATH, SMS, or voice) in the recent window. Each sign-in's `authentication_details` steps are paired with their `succeeded` flag, so only methods that actually succeeded are counted. The phishing-resistant ratio is computed over a baseline of sessions older than 24 hours (at least 3 resistant sessions required), so the recent downgrade cannot dilute it, and only over sessions with a successful fresh method (resistant plus phishable); sessions with only single sign-on token reuse (or whose establishing event is outside the window) are reported as unknown and excluded from the ratio rather than assumed to be passkey. Adversary-in-the-middle phishing can force this downgrade by suppressing the passkey prompt so the victim falls back to a relayable method the proxy can capture.

### Possible investigation steps

- Review the recent downgrade session(s) (`Esql.downgrade_sessions`, `Esql.downgrade_methods`, `Esql.downgrade_apps`, `Esql.downgrade_resources`): inspect `Esql.downgrade_user_agents` and `Esql.downgrade_device_os` for an unsupported/impossible browser-OS pairing, `Esql.downgrade_ips`/`Esql.downgrade_countries`/`Esql.downgrade_as_orgs` for hosting or VPS origins, and `Esql.downgrade_ca_status` for whether Conditional Access actually granted access.
- Confirm the user is genuinely passkey-preferring (`Esql.baseline_resistant`, `Esql.baseline_phishable`, `Esql.resistant_ratio`) rather than one who routinely mixes methods, and review `Esql.unknown_sessions` (token reuse / unresolved origin) separately.
- Correlate with recent authentication-method registration (a new passkey added nearby) and with device registration or PRT issuance for post-compromise persistence, and with subsequent `Previously satisfied` token reuse from a new ASN (stolen-session use).

### False positive analysis

- Legitimate fallback when a passkey authenticator is unavailable produces the same shape; validate device, network, and recovery workflow.
- A durable shift away from passkey lowers the resistant ratio over the window and stops qualifying.

### Response and remediation

- If unauthorized, treat the account as potentially compromised: revoke sessions and refresh tokens, remove any attacker-registered authentication methods or devices (delete devices first to break device-bound PRT persistence), and reset credentials.
- Enforce a phishing-resistant Conditional Access authentication strength so weaker methods cannot satisfy authentication.
"""
references = [
    "https://www.proofpoint.com/us/blog/threat-insight/dont-phish-let-me-down-fido-authentication-downgrade",
    "https://pushsecurity.com/blog/mfa-downgrade-attacks",
    "https://www.ioactive.com/authentication-downgrade-attacks-deep-dive-into-mfa-bypass/",
    "https://www.elastic.co/security-labs/entra-id-oauth-phishing-detection",
]
risk_score = 47
rule_id = "df328357-ebe0-4e51-94df-3bda9fa990f7"
setup = """#### Required Microsoft Entra ID Sign-In Logs
This rule requires the Azure integration with Microsoft Entra ID Sign-In logs enabled and collected via Azure Event Hub.
"""
severity = "medium"
tags = [
    "Domain: Cloud",
    "Domain: Identity",
    "Platform: Entra ID",
    "Platform: Azure",
    "Data Source: Entra ID Sign-In Logs",
    "Use Case: Identity and Access Audit",
    "Use Case: Threat Detection",
    "Tactic: Credential Access",
    "Threat: AiTM Phishing",
    "Rule Type: ES|QL",
    "Resources: Investigation Guide",
    "Profile: Beta",
]
timestamp_override = "event.ingested"
type = "esql"

query = '''
FROM logs-azure.signinlogs-*
| WHERE azure.signinlogs.category == "SignInLogs"
    AND azure.signinlogs.properties.session_id IS NOT NULL
    AND azure.signinlogs.properties.authentication_details IS NOT NULL
    AND azure.signinlogs.properties.user_id IS NOT NULL
    AND azure.signinlogs.properties.user_principal_name IS NOT NULL
    AND azure.signinlogs.properties.tenant_id IS NOT NULL

// Pair each authentication method with its success flag from the flattened authentication_details
| EVAL ad = TO_STRING(azure.signinlogs.properties.authentication_details)
| GROK ad """"authentication_method":%{DATA:method_raw},"authentication_"""
| GROK ad """"succeeded":%{DATA:succeeded_raw}}"""
| EVAL Esql.auth_methods = SPLIT(REPLACE(method_raw, """[\[\]"]""", ""), ","),
       Esql.auth_method_succeeded = SPLIT(REPLACE(succeeded_raw, """[\[\]"]""", ""), ",")
| EVAL Esql.method_outcome_pairs = MV_CONCAT(MV_ZIP(Esql.auth_methods, Esql.auth_method_succeeded, "~"), " || ")

// Flag sessions where a phishing-resistant or a phishable method actually succeeded (passkey/WHfB vs push/OATH/SMS/voice)
| EVAL Esql.resistant_method_success = CASE(
      Esql.method_outcome_pairs LIKE "*Passkey (synced)~true*" OR Esql.method_outcome_pairs LIKE "*Passkey (device-bound)~true*"
      OR Esql.method_outcome_pairs LIKE "*FIDO2 security key~true*" OR Esql.method_outcome_pairs LIKE "*Windows Hello for Business~true*", 1, 0),
    Esql.phishable_method_success = CASE(
      Esql.method_outcome_pairs LIKE "*Mobile app notification~true*" OR Esql.method_outcome_pairs LIKE "*OATH verification code~true*"
      OR Esql.method_outcome_pairs LIKE "*Text message~true*" OR Esql.method_outcome_pairs LIKE "*Voice call~true*", 1, 0)

// A downgrade event is a phishable method succeeding within the recent window
| EVAL Esql.is_downgrade = Esql.phishable_method_success == 1 AND @timestamp >= NOW() - 24 hour

// Aggregate session counts and downgrade-event context by tenant and user
| STATS Esql.total_sessions = COUNT_DISTINCT(azure.signinlogs.properties.session_id),
        Esql.resistant_sessions = COUNT_DISTINCT(CASE(Esql.resistant_method_success == 1, azure.signinlogs.properties.session_id, null)),
        Esql.phishable_sessions = COUNT_DISTINCT(CASE(Esql.phishable_method_success == 1, azure.signinlogs.properties.session_id, null)),
        Esql.baseline_resistant = COUNT_DISTINCT(CASE(Esql.resistant_method_success == 1 AND @timestamp < NOW() - 24 hour, azure.signinlogs.properties.session_id, null)),
        Esql.baseline_phishable = COUNT_DISTINCT(CASE(Esql.phishable_method_success == 1 AND @timestamp < NOW() - 24 hour, azure.signinlogs.properties.session_id, null)),
        Esql.downgrade_session_count = COUNT_DISTINCT(CASE(Esql.is_downgrade, azure.signinlogs.properties.session_id, null)),
        Esql.last_seen = MAX(@timestamp),
        Esql.downgrade_methods = VALUES(CASE(Esql.is_downgrade, Esql.method_outcome_pairs, null)),
        Esql.downgrade_sessions = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.session_id, null)),
        Esql.downgrade_ips = VALUES(CASE(Esql.is_downgrade, source.ip, null)),
        Esql.downgrade_as_orgs = VALUES(CASE(Esql.is_downgrade, source.`as`.organization.name, null)),
        Esql.downgrade_countries = VALUES(CASE(Esql.is_downgrade, source.geo.country_name, null)),
        Esql.downgrade_user_agents = VALUES(CASE(Esql.is_downgrade, user_agent.original, null)),
        Esql.downgrade_device_os = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.device_detail.operating_system, null)),
        Esql.downgrade_apps = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.app_display_name, null)),
        Esql.downgrade_resources = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.resource_display_name, null)),
        Esql.downgrade_client_apps = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.client_app_used, null)),
        Esql.downgrade_ca_status = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.conditional_access_status, null)),
        Esql.downgrade_risk_states = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.risk_state, null)),
        Esql.downgrade_correlation_ids = VALUES(CASE(Esql.is_downgrade, azure.signinlogs.properties.correlation_id, null)),
        Esql.downgrade_outcomes = VALUES(CASE(Esql.is_downgrade, event.outcome, null))
    BY azure.signinlogs.properties.tenant_id, azure.signinlogs.properties.user_principal_name, azure.signinlogs.properties.user_id

// Require a minimum resistant baseline (sessions older than 24h) and at least one recent downgrade
| WHERE Esql.baseline_resistant >= 3 AND Esql.downgrade_session_count >= 1

// Phishing-resistant ratio over the baseline only, so the downgrade session should not dilute it (token-reuse / unresolved sessions excluded)
| EVAL Esql.unknown_sessions = Esql.total_sessions - Esql.phishable_sessions - Esql.resistant_sessions,
       Esql.fresh_auth_sessions = Esql.resistant_sessions + Esql.phishable_sessions,
       Esql.resistant_ratio = Esql.baseline_resistant::double / (Esql.baseline_resistant + Esql.baseline_phishable)

// Keep predominantly phishing-resistant users (>= 90%)
| WHERE Esql.resistant_ratio >= 0.9
| KEEP azure.*, Esql.*
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1557"
name = "Adversary-in-the-Middle"
reference = "https://attack.mitre.org/techniques/T1557/"
[[rule.threat.technique]]
id = "T1556"
name = "Modify Authentication Process"
reference = "https://attack.mitre.org/techniques/T1556/"
[[rule.threat.technique.subtechnique]]
id = "T1556.006"
name = "Multi-Factor Authentication"
reference = "https://attack.mitre.org/techniques/T1556/006/"
[rule.threat.tactic]
id = "TA0006"
name = "Credential Access"
reference = "https://attack.mitre.org/tactics/TA0006/"

[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"
[[rule.threat.technique.subtechnique]]
id = "T1078.004"
name = "Cloud Accounts"
reference = "https://attack.mitre.org/techniques/T1078/004/"
[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"

[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1550"
name = "Use Alternate Authentication Material"
reference = "https://attack.mitre.org/techniques/T1550/"
[[rule.threat.technique.subtechnique]]
id = "T1550.004"
name = "Web Session Cookie"
reference = "https://attack.mitre.org/techniques/T1550/004/"
[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[rule.alert_suppression]
group_by = ["azure.signinlogs.properties.user_id"]
missing_fields_strategy = "suppress"

[rule.alert_suppression.duration]
unit = "h"
value = 24

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.