Add hunting queries: Entra ID identity boundary expansion hunting pack (3 queries)#14307
Open
descambiado wants to merge 3 commits into
Open
Add hunting queries: Entra ID identity boundary expansion hunting pack (3 queries)#14307descambiado wants to merge 3 commits into
descambiado wants to merge 3 commits into
Conversation
Detects Update user operations in AuditLogs where UserType transitions from Guest to Member, surfacing potential attacker elevation of a compromised guest to full tenant membership.
…98.001) Detects Add owner to service principal operations. SP ownership grants full credential management rights and is a documented precursor step in post-compromise persistence chains (Midnight Blizzard pattern).
Detects Update application operations where the ReplyUrls field changes, surfacing attacker-added redirect URIs that can intercept OAuth authorization codes for token theft.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Three hunting queries targeting identity boundary expansion techniques in Entra ID. Each covers a distinct operation that shifts the permission surface without creating new accounts or directly adding credentials — making them harder to catch with account-focused detections.
Queries added
GuestUserTypeChangedToMember.yaml— T1098Detects
Update userevents whereUserTypechanges fromGuesttoMember. A guest-to-member conversion grants the account full tenant membership including access to internal resources, group memberships, and SharePoint sites that exclude guests. Rare in most tenants; correlate against help desk records if it fires.ServicePrincipalOwnerAdded.yaml— T1098.001Detects
Add owner to service principalevents. SP ownership silently grants full credential management rights — an actor who becomes SP owner can then add a password or certificate credential and authenticate as the SP without triggering the separateAdd service principal credentialsoperation immediately. This is the documented precursor step in Midnight Blizzard-style persistence chains, and it sits in a detection gap between general role auditing and credential-focused detections.ApplicationRedirectUriModified.yaml— T1528Detects
Update applicationevents where theReplyUrlsfield changes. Adding an attacker-controlled redirect URI to an existing trusted app registration allows interception of OAuth authorization codes from users who click legitimate consent flows pointing to that app. No new app registration is required, so first-seen-app detections miss it entirely.What was verified
Hunting Queries/cover these three operationsOperationName =~(exact match within~/=~, nohas_any)InitiatedBy.user.userPrincipalNamefield access throughout, noparse_json(tostring(...))wrapper