← Back to Explore
elasticmediumTTP
Entra ID Passkey Sign-In with Unusual Authenticator AAGUID
Identifies a successful passkey or FIDO2 authentication step in a Microsoft Entra ID sign-in using an Authenticator Attestation GUID (AAGUID) not previously seen in the tenant. A tenant-new AAGUID is an authenticator model the organization has not used before, which can be a newly adopted authenticator or an attacker-registered shadow passkey from tooling such as ROADtools roadtx or DSInternals.Passkeys. All-zero and malformed AAGUIDs carry no authenticator model information and are not evaluated by this rule.
Detection Query
FROM logs-azure.signinlogs-*
| WHERE azure.signinlogs.category == "SignInLogs"
AND azure.signinlogs.properties.authentication_details IS NOT NULL
AND azure.tenant_id IS NOT NULL
// filter for Passkey or FIDO2 security key sign-ins
| EVAL ad = TO_STRING(azure.signinlogs.properties.authentication_details)
| WHERE ad LIKE "*Passkey (*" OR ad LIKE "*FIDO2 security key*"
// Pair each authentication method with its own success flag; event.outcome is sign-in level and is not tied to the passkey step
| 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, "~"), " || ")
// Require the passkey or FIDO2 step itself to have succeeded
| WHERE 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*"
// extract AAGUID from authentication method detail
// a sign-in can carry several auth steps, so expand multi-valued details and evaluate each one
| EVAL ad_detail = FIELD_EXTRACT(azure.signinlogs.properties.authentication_details, "authentication_method_detail")
| MV_EXPAND ad_detail
// find a well-formed 8-4-4-4-12 hex AAGUID anywhere in the value, independent of provider text or separator
// the lookarounds reject longer hex/dash runs so a malformed value is not partially matched
| GROK ad_detail """(?<![0-9A-Fa-f-])(?<aaguid_raw>[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})(?![0-9A-Fa-f-])"""
// lowercase to normalize case; ignore missing or zeroed AAGUIDs, which carry no authenticator model
| EVAL aaguid_raw = TO_LOWER(aaguid_raw)
| WHERE aaguid_raw IS NOT NULL AND aaguid_raw != "00000000-0000-0000-0000-000000000000"
// aggregate sign-in statistics by tenant and AAGUID
| STATS Esql.first_ingested = MIN(event.ingested),
Esql.first_time_seen = MIN(@timestamp),
Esql.last_time_seen = MAX(@timestamp),
Esql.signin_count = COUNT(*),
Esql.user_count = COUNT_DISTINCT(azure.signinlogs.properties.user_id),
Esql.provider_values = VALUES(ad_detail),
Esql.user_values = VALUES(azure.signinlogs.properties.user_principal_name),
Esql.app_values = VALUES(azure.signinlogs.properties.app_display_name),
Esql.app_id_values = VALUES(azure.signinlogs.properties.app_id),
Esql.resource_values = VALUES(azure.signinlogs.properties.resource_display_name),
Esql.client_app_used_values = VALUES(azure.signinlogs.properties.client_app_used),
Esql.incoming_token_type_values = VALUES(azure.signinlogs.properties.incoming_token_type),
Esql.source_ip_values = VALUES(source.ip),
Esql.source_as_number_values = VALUES(source.`as`.number),
Esql.user_agent_values = VALUES(user_agent.original),
Esql.device_trust_type_values = VALUES(azure.signinlogs.properties.device_detail.trust_type),
Esql.device_is_managed_values = VALUES(azure.signinlogs.properties.device_detail.is_managed),
Esql.device_is_compliant_values = VALUES(azure.signinlogs.properties.device_detail.is_compliant),
Esql.conditional_access_status_values = VALUES(azure.signinlogs.properties.conditional_access_status),
Esql.auth_requirement_values = VALUES(azure.signinlogs.properties.authentication_requirement),
Esql.risk_state_values = VALUES(azure.signinlogs.properties.risk_state),
Esql.risk_level_during_signin_values = VALUES(azure.signinlogs.properties.risk_level_during_signin),
Esql.result_signature_values = VALUES(azure.signinlogs.result_signature),
Esql.correlation_id_values = VALUES(azure.signinlogs.properties.correlation_id),
Esql.session_id_values = VALUES(azure.signinlogs.properties.session_id),
Esql.unique_token_identifier_values = VALUES(azure.signinlogs.properties.unique_token_identifier)
BY azure.tenant_id, Esql.passkey_aaguid = aaguid_raw
// first ingested within the last 10 minutes; ingestion time keeps delayed sign-in logs from aging out of the gate
| EVAL Esql.recent_minutes = DATE_DIFF("minute", Esql.first_ingested, NOW())
| WHERE Esql.recent_minutes <= 10
| KEEP Esql.*, azure.tenant_id
Author
Elastic
Created
2026/10/21
Data Sources
Entra ID Sign-In Logs
References
- https://specterops.io/wp-content/uploads/sites/3/2026/08/Pass-the-Passkey_A4_v2.pdf
- https://learn.microsoft.com/en-us/entra/identity/authentication/how-to-authentication-passkeys-fido2
- https://cybersecurity.bureauveritas.com/services/information-technology/pentesting-services/what-can-be-pentested/cloud-pentesting/abusing-fido2-passkeys
- https://www.elastic.co/security-labs/entra-id-oauth-phishing-detection
Tags
Domain: CloudDomain: IdentityPlatform: Entra IDPlatform: AzureData Source: Entra ID Sign-In LogsUse Case: Identity and Access AuditUse Case: Threat DetectionTactic: PersistenceRule Type: ES|QLResources: Investigation GuideProfile: Beta
Raw Content
[metadata]
creation_date = "2026/10/21"
integration = ["azure"]
maturity = "production"
min_stack_comments = "FIELD_EXTRACT not available until 9.5.0"
min_stack_version = "9.5.0"
updated_date = "2026/11/23"
[rule]
author = ["Elastic"]
description = """
Identifies a successful passkey or FIDO2 authentication step in a Microsoft Entra ID sign-in using an Authenticator
Attestation GUID (AAGUID) not previously seen in the tenant. A tenant-new AAGUID is an authenticator model the
organization has not used before, which can be a newly adopted authenticator or an attacker-registered shadow passkey
from tooling such as ROADtools roadtx or DSInternals.Passkeys. All-zero and malformed AAGUIDs carry no authenticator
model information and are not evaluated by this rule.
"""
false_positives = [
"""
A user legitimately enrolling and then signing in with a new authenticator model the organization has not used
before (a newly adopted hardware key vendor, a new platform passkey provider, or a new phone) produces a first-seen
AAGUID for the tenant. Correlate the AAGUID with the known-good authenticators for the environment (the FIDO
Metadata Service or the public passkey AAGUID reference), confirm the user registered the passkey, and review the
source, device, and whether the registration was recent and self-service. Environments without meaningful passkey
adoption will see first-seen AAGUIDs more often as adoption ramps.
""",
]
from = "now-5d"
language = "esql"
license = "Elastic License v2"
name = "Entra ID Passkey Sign-In with Unusual Authenticator AAGUID"
note = """## Triage and analysis
### Investigating Entra ID Passkey Sign-In with Unusual Authenticator AAGUID
A user successfully completed a passkey or FIDO2 authentication step (the step's own `succeeded` flag is checked, not the sign-in level `event.outcome`) with an authenticator whose AAGUID has not been seen for the tenant in the lookback window. First-seen is evaluated on ingestion time so delayed sign-in logs are not missed. The AAGUID identifies the authenticator model or provider; one that is new to the organization can be a newly adopted legitimate authenticator, or an attacker-registered shadow passkey being used for phishing-resistant persistence. Offensive tooling such as roadtx `registerpasskey` and DSInternals.Passkeys can register software passkeys with an arbitrary AAGUID, which may not match the organization's known authenticators.
### Possible investigation steps
- Resolve the AAGUID (`Esql.passkey_aaguid`) and provider string (`Esql.provider_values`) against the organization's known-good authenticators, the FIDO Metadata Service, or the public passkey AAGUID reference. An unknown or software-provider AAGUID on an account that normally uses a hardware key or platform passkey is higher priority. Note that an operator can set the AAGUID to spoof a known-good value, so a familiar AAGUID does not clear the sign-in on its own.
- Confirm the user actually registered this passkey: review the `User registered security info` / FIDO2 registration audit events for the user, who initiated them, whether they were self-service, and whether the initiating application is the expected My Security Info portal rather than a script or API client.
- Review the sign-in context (`Esql.user_values`, `Esql.source_ip_values`, `Esql.user_agent_values`, `Esql.app_values`) for a hosting or VPS origin, an anomalous user agent, or a first-party client inconsistent with the user's norm.
- Determine whether the target holds privileged roles; a shadow passkey on a privileged account is high impact.
### False positive analysis
- A genuinely new but legitimate authenticator model (new hardware key vendor, new platform passkey provider, new phone) produces a first-seen AAGUID. Baseline the organization's authenticators and add exceptions for approved AAGUIDs.
- As passkey adoption ramps in an environment, first-seen AAGUIDs appear more often; tune the lookback and expect early volume.
### Response and remediation
- If the user did not enroll this authenticator, treat the account as potentially compromised: delete the attacker-registered passkey and any attacker-registered device (delete devices first to break device-bound PRT persistence), then revoke sessions and refresh tokens and reset credentials.
- Enforce FIDO2 attestation and configure AAGUID key restrictions so only approved authenticators can be registered and used; without enforced attestation an attacker can spoof an allowed AAGUID.
"""
references = [
"https://specterops.io/wp-content/uploads/sites/3/2026/08/Pass-the-Passkey_A4_v2.pdf",
"https://learn.microsoft.com/en-us/entra/identity/authentication/how-to-authentication-passkeys-fido2",
"https://cybersecurity.bureauveritas.com/services/information-technology/pentesting-services/what-can-be-pentested/cloud-pentesting/abusing-fido2-passkeys",
"https://www.elastic.co/security-labs/entra-id-oauth-phishing-detection",
]
risk_score = 47
rule_id = "369fad3d-6abd-4f98-a20f-07dc444fde6e"
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: Persistence",
"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.authentication_details IS NOT NULL
AND azure.tenant_id IS NOT NULL
// filter for Passkey or FIDO2 security key sign-ins
| EVAL ad = TO_STRING(azure.signinlogs.properties.authentication_details)
| WHERE ad LIKE "*Passkey (*" OR ad LIKE "*FIDO2 security key*"
// Pair each authentication method with its own success flag; event.outcome is sign-in level and is not tied to the passkey step
| 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, "~"), " || ")
// Require the passkey or FIDO2 step itself to have succeeded
| WHERE 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*"
// extract AAGUID from authentication method detail
// a sign-in can carry several auth steps, so expand multi-valued details and evaluate each one
| EVAL ad_detail = FIELD_EXTRACT(azure.signinlogs.properties.authentication_details, "authentication_method_detail")
| MV_EXPAND ad_detail
// find a well-formed 8-4-4-4-12 hex AAGUID anywhere in the value, independent of provider text or separator
// the lookarounds reject longer hex/dash runs so a malformed value is not partially matched
| GROK ad_detail """(?<![0-9A-Fa-f-])(?<aaguid_raw>[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12})(?![0-9A-Fa-f-])"""
// lowercase to normalize case; ignore missing or zeroed AAGUIDs, which carry no authenticator model
| EVAL aaguid_raw = TO_LOWER(aaguid_raw)
| WHERE aaguid_raw IS NOT NULL AND aaguid_raw != "00000000-0000-0000-0000-000000000000"
// aggregate sign-in statistics by tenant and AAGUID
| STATS Esql.first_ingested = MIN(event.ingested),
Esql.first_time_seen = MIN(@timestamp),
Esql.last_time_seen = MAX(@timestamp),
Esql.signin_count = COUNT(*),
Esql.user_count = COUNT_DISTINCT(azure.signinlogs.properties.user_id),
Esql.provider_values = VALUES(ad_detail),
Esql.user_values = VALUES(azure.signinlogs.properties.user_principal_name),
Esql.app_values = VALUES(azure.signinlogs.properties.app_display_name),
Esql.app_id_values = VALUES(azure.signinlogs.properties.app_id),
Esql.resource_values = VALUES(azure.signinlogs.properties.resource_display_name),
Esql.client_app_used_values = VALUES(azure.signinlogs.properties.client_app_used),
Esql.incoming_token_type_values = VALUES(azure.signinlogs.properties.incoming_token_type),
Esql.source_ip_values = VALUES(source.ip),
Esql.source_as_number_values = VALUES(source.`as`.number),
Esql.user_agent_values = VALUES(user_agent.original),
Esql.device_trust_type_values = VALUES(azure.signinlogs.properties.device_detail.trust_type),
Esql.device_is_managed_values = VALUES(azure.signinlogs.properties.device_detail.is_managed),
Esql.device_is_compliant_values = VALUES(azure.signinlogs.properties.device_detail.is_compliant),
Esql.conditional_access_status_values = VALUES(azure.signinlogs.properties.conditional_access_status),
Esql.auth_requirement_values = VALUES(azure.signinlogs.properties.authentication_requirement),
Esql.risk_state_values = VALUES(azure.signinlogs.properties.risk_state),
Esql.risk_level_during_signin_values = VALUES(azure.signinlogs.properties.risk_level_during_signin),
Esql.result_signature_values = VALUES(azure.signinlogs.result_signature),
Esql.correlation_id_values = VALUES(azure.signinlogs.properties.correlation_id),
Esql.session_id_values = VALUES(azure.signinlogs.properties.session_id),
Esql.unique_token_identifier_values = VALUES(azure.signinlogs.properties.unique_token_identifier)
BY azure.tenant_id, Esql.passkey_aaguid = aaguid_raw
// first ingested within the last 10 minutes; ingestion time keeps delayed sign-in logs from aging out of the gate
| EVAL Esql.recent_minutes = DATE_DIFF("minute", Esql.first_ingested, NOW())
| WHERE Esql.recent_minutes <= 10
| KEEP Esql.*, azure.tenant_id
'''
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1098"
name = "Account Manipulation"
reference = "https://attack.mitre.org/techniques/T1098/"
[[rule.threat.technique.subtechnique]]
id = "T1098.001"
name = "Additional Cloud Credentials"
reference = "https://attack.mitre.org/techniques/T1098/001/"
[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"