-
Notifications
You must be signed in to change notification settings - Fork 615
[New Rule] ConsentFix Detections #5485
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
Conversation
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
Contributor
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
Aegrah
approved these changes
Jan 12, 2026
Contributor
Aegrah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only small suggestions for performance
...egrations/azure/initial_access_entra_id_oauth_auth_code_grant_unusual_app_resource_user.toml
Outdated
Show resolved
Hide resolved
...egrations/azure/initial_access_entra_id_oauth_auth_code_grant_unusual_app_resource_user.toml
Outdated
Show resolved
Hide resolved
...egrations/azure/initial_access_entra_id_oauth_auth_code_grant_unusual_app_resource_user.toml
Show resolved
Hide resolved
…de_grant_unusual_app_resource_user.toml Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
DefSecSentinel
approved these changes
Jan 12, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport: auto
Domain: Cloud
Integration: Azure
azure related rules
Integration: Microsoft 365
Rule: New
Proposal for new rule
Rule: Tuning
tweaking or tuning an existing rule
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.
Pull Request
Issue link(s):
Summary
What is ConsentFix?
OAuth code theft attack targeting Microsoft 365/Entra ID. Attacker sends victim a phishing link that redirects to legitimate Microsoft OAuth authorization. Victim authenticates and gets redirected to localhost with the auth code in the URL. Attacker tricks victim into sharing that code via a fake error page, Signal, WhatsApp, etc. Attacker then exchanges the code for tokens from their own infrastructure.
The attack uses first-party Microsoft apps like Azure CLI, VSCode, and PowerShell because they use localhost redirect URIs and are trusted by default in all tenants. These apps cannot be blocked or deleted.
Why Legacy AAD Matters
Attackers intentionally target Windows Azure Active Directory (
00000002-0000-0000-c000-000000000000) instead of Microsoft Graph. It's deprecated, rarely used legitimately, and most detection rules only watch Graph.Detection Rules
Split Detection Logic
In many cases, we can focus on FOCI to AAD and/or graph. FOCI to graph can be extremely noisy and benign, thus we only limit some high-fidelity ones to this while any FOCI to AAD should warrant an investigation.
Developer tools (3 apps) flagged for Graph OR Legacy AAD:
04b07795-8ddb-461a-bbee-02f9e1bf7b46aebc6443-996d-45c2-90f0-388ff96faa561950a258-227b-4e31-a9cf-717495945fc2Any FOCI app (35 apps) flagged for Legacy AAD only. Full list includes Teams, Outlook, Office, OneDrive, etc. Only flagged when hitting the deprecated legacy AAD resource.
References
How To Test
Please see the related issue for more details on emulation and testing.
Checklist
bug,enhancement,schema,maintenance,Rule: New,Rule: Deprecation,Rule: Tuning,Hunt: New, orHunt: Tuningso guidelines can be generatedmeta:rapid-mergelabel if planning to merge within 24 hoursContributor checklist