OAuth consent phishing to a cloud mailbox
An illicit-consent (OAuth) phish tricks a user into authorising a malicious application, which then reads mail and data through the API — no password and no MFA prompt needed.
Scenario
An authorized social-engineering and identity assessment of a cloud tenant. Sending consent-grant lures to an agreed user list is approved. The objective is to show whether users can be led to authorise an attacker-controlled app, and what that app can then reach.
- 1
Resource Development
Prepare a consent lure
Register an application that requests mail/file-read scopes and craft a convincing consent link, keeping branding generic and staying within the approved user list.
DetectionNewly registered third-party apps requesting broad delegated scopes are visible to tenant app-governance review.
MitigationRestrict user consent to verified publishers and low-risk scopes, and require admin approval for anything broader.
- 2
Credential Access
Obtain an access/refresh token via consent
A user who clicks the link and consents grants the app a token with the requested scopes. Because this is an authorised grant, it bypasses the password and the MFA prompt entirely — the point of the finding.
DetectionConsent-grant events to a new app, especially with offline-access/refresh scopes, are high-value sign-in-log events.
MitigationAlert on new consent grants, review and revoke risky OAuth app permissions, and educate users on consent prompts.
References oauth2-attacks - 3
Collection
Read mail and data through the API
Use the granted token against the cloud API to demonstrate read access to the user's mailbox and files, documenting the exposure rather than harvesting content.
DetectionAPI-based mail reads from an application identity, and access from new IP ranges, appear in unified audit logs.
MitigationConditional access for app access, token-lifetime limits, and alerting on bulk API reads by third-party apps.
References azure-ad-security - 4
Persistence
Keep access without the user
Show how the app's refresh token (or added app credentials) would let access persist after the user changes their password, since the grant is independent of the password — then recommend revocation.
DetectionLong-lived refresh-token use and new credentials added to an app registration are key persistence signals.
MitigationRevoke risky grants, enforce short refresh-token lifetimes and continuous access evaluation, and review app credentials regularly.
References azure-ad-security
Key takeaways
- Consent phishing steals a token, not a password — MFA on sign-in does not stop it.
- The blast radius is exactly the scopes the user approved; least-privilege consent policy shrinks it.
- Revoking the grant — not resetting the password — is what actually cuts off this access.