ChatGPT in your inbox? Investigating Entra apps that request...#264
Open
carlospolop wants to merge 1 commit intomasterfrom
Open
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://redcanary.com/blog/threat-detection/entra-id-oauth-attacks/ Content Categories: Based on the analysis, this content was categorized under "Azure Pentesting -> Az - Entra ID (AzureAD) & Azure IAM (or Az - Tokens & Public Applications) -> OAuth consent phishing / oAuth2PermissionGrant persistence & investigation (AuditLogs correlation + Graph PowerShell remediation)". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
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.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Title / topic
The post explains how OAuth consent in Microsoft Entra ID (Azure AD) can be abused (commonly via social engineering / consent phishing) to grant a third-party application persistent delegated access to Microsoft 365 data (e.g., mail) without needing to “break” authentication. It then provides a hands-on, log-driven workflow to observe, detect, investigate, remediate, and mitigate these events using Log Analytics
AuditLogsand **Microsoft Graph PowerShel...🔧 Technical Details
OAuth consent abuse trick (Entra ID / Azure AD): an attacker convinces a user to approve an OAuth consent prompt for a third-party app, resulting in an
oAuth2PermissionGrantthat allows token issuance for delegated Graph scopes (e.g.,Mail.Readplusoffline_accessfor long-lived access). This persists independently of password changes until the grant and/or service principal is removed. Detection can focus onAuditLogswhereConsentAction.Permissions.newValuebegins with[] =>(new grant),ConsentContext.IsAdminConsent=False(non-admin consent), and the scopes include commonly abused permissions; then correlate withAdd service principalby matchingCorrelationIdto confirm the app was newly introduced.Investigation parsing trick: treat
TargetResources[0].modifiedProperties['ConsentAction.Permissions'].newValueas a serializedoAuth2PermissionGrantand parse outId(grant ID to revoke),ClientId/TargetResources[0].id(service principal object ID ...🤖 Agent Actions
ERROR: Codex CLI executable was not found.
Configured path: 'codex'.
Install Codex CLI (e.g.
npm i -g @openai/codex) or set CODEX_PATH to the absolute executable path.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
📚 Repository Maintenance
All .md files have been checked for proper formatting (headers, includes, etc.).