-
Notifications
You must be signed in to change notification settings - Fork 573
[New Rule] Suspicious ADRS Token Request by Microsoft Auth Broker #4801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1e3eda3
new rule Suspicious ADRS Token Request by Microsoft Auth Broker
terrancedejesus 6b6407d
bumping patch version
terrancedejesus 7129469
Merge branch 'main' into suspicious-adrs-token-request-entra-id
terrancedejesus 3ddf925
Merge branch 'main' into suspicious-adrs-token-request-entra-id
terrancedejesus a11bc22
Merge branch 'main' into suspicious-adrs-token-request-entra-id
terrancedejesus a1d14a8
updating patch version
terrancedejesus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
rules/integrations/azure/persistence_entra_id_suspicious_adrs_token_request.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
[metadata] | ||
creation_date = "2025/06/13" | ||
integration = ["azure"] | ||
maturity = "production" | ||
updated_date = "2025/06/13" | ||
|
||
[rule] | ||
author = ["Elastic"] | ||
description = """ | ||
Detects suspicious OAuth 2.0 token requests where the Microsoft Authentication Broker | ||
(29d9ed98-a469-4536-ade2-f981bc1d605e) requests access to the Device Registration Service | ||
(01cb2876-7ebd-4aa4-9cc9-d28bd4d359a9) on behalf of a user principal. The presence of the adrs_access scope in the | ||
authentication processing details suggests an attempt to access ADRS, which is atypical for standard user sign-ins. This | ||
behavior may reflect an effort to abuse device registration for unauthorized persistence, such as acquiring a Primary | ||
Refresh Token (PRT) or establishing a trusted session. | ||
""" | ||
from = "now-9m" | ||
index = ["filebeat-*", "logs-azure.signinlogs-*"] | ||
language = "kuery" | ||
license = "Elastic License v2" | ||
name = "Suspicious ADRS Token Request by Microsoft Auth Broker" | ||
note = """## Triage and analysis | ||
|
||
### Investigating Suspicious ADRS Token Request by Microsoft Auth Broker | ||
|
||
Detects suspicious OAuth 2.0 token requests where the Microsoft Authentication Broker (29d9ed98-a469-4536-ade2-f981bc1d605e) requests access to the Device Registration Service (01cb2876-7ebd-4aa4-9cc9-d28bd4d359a9) on behalf of a user principal. The presence of the adrs_access scope in the authentication processing details suggests an attempt to access ADRS, which is atypical for standard user sign-ins. This behavior may reflect an effort to abuse device registration for unauthorized persistence, such as acquiring a Primary Refresh Token (PRT) or establishing a trusted session. | ||
|
||
### Possible investigation steps | ||
- Identify the user principal associated with the request by checking `azure.signinlogs.properties.user_principal_name` or `azure.signinlogs.properties.user_id`. | ||
- Review the `azure.signinlogs.properties.app_id` and `azure.signinlogs.properties.resource_id` to confirm the request is made by the Microsoft Authentication Broker and targeting the Device Registration Service. | ||
- Examine the `azure.signinlogs.properties.authentication_processing_details.Oauth Scope Info` for the presence of `adrs_access`, indicating an attempt to access ADRS. | ||
- Check the `azure.signinlogs.properties.incoming_token_type` to confirm the request is made using a refresh token, which is typical for persistent access scenarios. | ||
- Review the `azure.signinlogs.properties.user_type` to ensure it is a "Member" user, as this behavior is unusual for standard user accounts. | ||
- Review the `source.address` and `source.geo.country_name` to identify the origin of the request. Look for any anomalies or unexpected locations. | ||
- Check the `azure.signinlogs.properties.device_detail.operating_system` and `azure.signinlogs.properties.device_detail.browser` to identify the device and browser used for the request. Look for any unusual or unexpected devices for this user. | ||
- Use the `azure.signinlogs.properties.session_id` to correlate this request with other sign-in events for the same user. Look for any patterns of suspicious activity or multiple requests in a short time frame. | ||
- Correlate with Entra ID audit logs to identify any recent device registrations or changes to the user's device registration status. | ||
- Pivot to primary refresh token (PRTs) usage for the same user and/or session ID to identify any potential abuse or unauthorized access attempts. | ||
|
||
### False positive analysis | ||
- Legitimate applications or services that require access to the Device Registration Service may trigger this rule. If this is expected behavior, consider adjusting the rule or adding exceptions for specific applications or user accounts. | ||
- Users being onboarded or enrolled in new devices may also trigger this rule, especially if they are using the Microsoft Authentication Broker for the first time. | ||
|
||
### Response and remediation | ||
- If the request is confirmed to be suspicious or unauthorized, take immediate action to revoke the access token and prevent further access. | ||
- Disable the user account temporarily to prevent any potential compromise or unauthorized access. | ||
- Review the user's recent sign-in activity and access patterns to identify any potential compromise or unauthorized access. | ||
- If the user account is compromised, initiate a password reset and enforce multi-factor authentication (MFA) for the user. | ||
- Review the conditional access policies in place to ensure they are sufficient to prevent unauthorized access to sensitive resources. | ||
- Consider deactivating any newly registered devices associated with the user account until further investigation is complete. | ||
""" | ||
references = [ | ||
"https://www.volexity.com/blog/2025/04/22/phishing-for-codes-russian-threat-actors-target-microsoft-365-oauth-workflows/", | ||
] | ||
risk_score = 47 | ||
rule_id = "d121f0a8-4875-11f0-bb2b-f661ea17fbcd" | ||
severity = "medium" | ||
tags = [ | ||
"Domain: Cloud", | ||
"Domain: Identity", | ||
"Data Source: Azure", | ||
"Data Source: Microsoft Entra ID", | ||
"Data Source: Microsoft Entra ID Sign-In Logs", | ||
"Use Case: Identity and Access Audit", | ||
"Tactic: Persistence", | ||
"Resources: Investigation Guide", | ||
] | ||
timestamp_override = "event.ingested" | ||
type = "query" | ||
|
||
query = ''' | ||
event.dataset: "azure.signinlogs" and | ||
azure.signinlogs.properties.app_id : "29d9ed98-a469-4536-ade2-f981bc1d605e" and | ||
azure.signinlogs.properties.resource_id : "01cb2876-7ebd-4aa4-9cc9-d28bd4d359a9" and | ||
azure.signinlogs.category: "NonInteractiveUserSignInLogs" and | ||
azure.signinlogs.properties.authentication_processing_details: *adrs_access* and | ||
azure.signinlogs.properties.incoming_token_type: "refreshToken" and | ||
azure.signinlogs.properties.user_type: "Member" | ||
''' | ||
|
||
|
||
[[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.005" | ||
name = "Device Registration" | ||
reference = "https://attack.mitre.org/techniques/T1098/005/" | ||
|
||
|
||
|
||
[rule.threat.tactic] | ||
id = "TA0003" | ||
name = "Persistence" | ||
reference = "https://attack.mitre.org/tactics/TA0003/" | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.