Skip to content

Commit e9b9170

Browse files
[Rule Tuning] Entra ID OAuth PRT Issuance to Non-Managed Device Detected
Fixes #5463
1 parent 6ac69db commit e9b9170

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

rules/integrations/azure/persistence_entra_id_rt_to_prt_transition_from_user_device.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
creation_date = "2025/06/24"
33
integration = ["azure"]
44
maturity = "production"
5-
updated_date = "2025/12/10"
5+
updated_date = "2025/12/15"
66

77
[rule]
88
author = ["Elastic"]
99
description = """
1010
Identifies when a user signs in with a refresh token using the Microsoft Authentication Broker (MAB) client, followed by
11-
a Primary Refresh Token (PRT) sign-in from the same device within 1 hour. This pattern may indicate that an attacker has
11+
a Primary Refresh Token (PRT) sign-in from the same device within 1 hour from an unmanaged device. This pattern may indicate that an attacker has
1212
successfully registered a device using ROADtx and transitioned from short-term token access to long-term persistent
1313
access via PRTs. Excluding access to the Device Registration Service (DRS) ensures the PRT is being used beyond
1414
registration, often to access Microsoft 365 resources like Outlook or SharePoint.
@@ -18,10 +18,10 @@ index = ["filebeat-*", "logs-azure.signinlogs-*"]
1818
interval = "30m"
1919
language = "eql"
2020
license = "Elastic License v2"
21-
name = "Entra ID OAuth Primary Refresh Token (PRT) Issuance via Refresh Token (RT) Detected"
21+
name = "Entra ID OAuth PRT Issuance to Non-Managed Device Detected"
2222
note = """## Triage and analysis
2323
24-
### Investigating Entra ID OAuth Primary Refresh Token (PRT) Issuance via Refresh Token (RT) Detected
24+
### Investigating Entra ID OAuth PRT Issuance to Non-Managed Device Detected
2525
2626
This rule identifies a sequence where a Microsoft Entra ID user signs in using a refresh token issued to the Microsoft Authentication Broker (MAB), followed by a sign-in using a Primary Refresh Token (PRT) from the same device. This behavior is uncommon for normal user activity and strongly suggests adversarial behavior, particularly when paired with OAuth phishing and device registration tools like ROADtx. The use of PRT shortly after a refresh token sign-in typically indicates the attacker has obtained device trust and is now using the PRT to impersonate a fully compliant user+device pair.
2727
@@ -83,7 +83,12 @@ sequence by azure.signinlogs.properties.user_id, azure.signinlogs.properties.dev
8383
event.dataset == "azure.signinlogs" and
8484
azure.signinlogs.properties.incoming_token_type == "primaryRefreshToken" and
8585
azure.signinlogs.properties.resource_display_name != "Device Registration Service" and
86-
azure.signinlogs.result_signature == "SUCCESS"
86+
azure.signinlogs.result_signature == "SUCCESS" and
87+
azure.signinlogs.properties.device_detail.is_managed != true
88+
and not (
89+
azure.signinlogs.properties.app_display_name == "Windows Sign In" or
90+
user_agent.original == "Windows-AzureAD-Authentication-Provider/1.0"
91+
)
8792
]
8893
'''
8994

0 commit comments

Comments
 (0)