Persistence (TA0003)(external, opens in a new tab or window)
text code block:FROM logs-azure.signinlogs-* METADATA _id, _index, _version | WHERE azure.signinlogs.category == "SignInLogs" AND azure.signinlogs.properties.authentication_details IS NOT NULL | 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}}""" | GROK ad """"authentication_method_detail":%{DATA:detail_raw},"authentication_""" | 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 the provider and AAGUID from the authenticator detail | EVAL Esql.auth_method_details = SPLIT(REPLACE(detail_raw, """[\[\]"]""", ""), ",") | MV_EXPAND Esql.auth_method_details | GROK Esql.auth_method_details """%{GREEDYDATA:provider_raw} - %{NOTSPACE:aaguid_raw}""" | WHERE aaguid_raw IS NOT NULL AND ( aaguid_raw == "00000000-0000-0000-0000-000000000000" OR NOT aaguid_raw RLIKE "[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}" ) | EVAL Esql.passkey_aaguid = aaguid_raw, Esql.passkey_provider = provider_raw | KEEP _id, _index, _version, @timestamp, azure.signinlogs.*, source.*, user.*, user_agent.*, event.outcome, Esql.*
Install detection rules in Elastic Security
Detect Entra ID Passkey Sign-In with Nonattestable Authenticator AAGUID in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).