← ClaudeAtlas

detect-oauth-consent-phishinglisted

Detection and response methodology for OAuth consent phishing / illicit consent grants in Microsoft 365 and Entra ID (MITRE ATT&CK T1528). An attacker phishes a user into consenting to an OAuth app with delegated Graph permissions such as Mail.Read and offline_access, so no password is stolen and MFA is never challenged, yet the refresh token is a durable key to mail and files. Ships four KQL detections over Entra AuditLogs (consent, app-role assignment, and new app credentials as follow-on persistence, T1098.001) and MicrosoftGraphActivityLogs oauth2PermissionGrants, with tuning, false-positive notes, a hunt, and consent-restriction mitigations. Use when investigating a suspicious enterprise app or consent grant, triaging a 'Consent to application' event, hunting illicit OAuth grants or refresh-token abuse in Entra ID, checking a new secret or certificate on an app, writing consent-phishing detections, or responding to a Midnight Blizzard-style app-consent attack.
umbrasec-labs/umbra-blue · ★ 0 · API & Backend · score 62
Install: claude install-skill umbrasec-labs/umbra-blue
# OAuth Consent Phishing - Detection and Response OAuth consent phishing never asks for a password and sails straight through MFA, because the victim is not tricked into logging in - they are tricked into clicking Accept. The attacker registers an OAuth application, phishes a user into consenting to delegated Microsoft Graph permissions, and walks away with an access token plus, if offline_access was requested, a long-lived refresh token. Because the app authenticates as itself and the consent already happened, the attacker's later Graph calls trigger no interactive sign-in and no MFA prompt. Revoking the user's password does nothing; you have to revoke the grant. This skill is defensive: it explains the technique only as far as detection and mitigation require, and ships no app-registration templates, phishing kits, or token-abuse tooling. ## TL;DR for defenders Make sure Entra ID logs are actually exported to a Log Analytics workspace or Microsoft Sentinel, not just living in the portal's 30-day view. Then watch the Entra **AuditLogs** table for a `Consent to application` event granting sensitive scopes (mail, files, directory, or `offline_access`), and watch **MicrosoftGraphActivityLogs** for the **POST** to a URI containing `oauth2PermissionGrants` - that POST is the act of granting delegated permission and is the single highest-fidelity moment. A tenant-wide `IsAdminConsent == "True"` grant, or an app-role (application permission) assignment like `full_access_as_app`,