← All Threat Hunting ReportsThreat Hunting Exercise

This hunt uses a simulated Azure AD sign-in/audit dataset (azuread_oauth_consent_2022-07-02T130000.json) capturing T1528: Steal Application Access Token, where a user is phished into granting a malicious multi-tenant OAuth application broad permissions (Mail.Read, Files.ReadWrite.All), giving the attacker persistent, MFA-bypassing access to the mailbox and files without ever knowing the user's password.

Step 1: Hypothesis Formation

Hypothesis: A user consents to a newly-registered, unverified multi-tenant OAuth application requesting high-privilege delegated permissions (mail, files, or directory read/write), after which the application immediately begins making Graph API calls consistent with mailbox enumeration or bulk file access, from an IP/ASN inconsistent with the user's normal location. Indicators:

Null Hypothesis: The user legitimately consented to a productivity add-in (e.g., a calendar or note-taking app) that reasonably requires broad mail/file permissions. Invalidate via checking the application's publisher verification status, requested-permission-to-stated-purpose fit, and any user report of a suspicious consent prompt.

Rationale: Illicit consent grant attacks bypass password resets, MFA, and even conditional access in many configurations, since the attacker never needs the user's credentials at all - this hunt validates detection via app-registration metadata and post-consent API behavior rather than traditional sign-in anomaly detection.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed events (6 shown) confirm a user consented to an unverified app requesting mail-read permissions, followed within minutes by a high-volume mailbox enumeration burst from a foreign IP.

Timestamp (UTC)UserEventDetailsIOC/Why Suspicious?
2022-07-02 13:04:11r.patelConsent to applicationApp=Quick Notes Sync; Permissions=Mail.Read, Mail.Send, Files.ReadWrite.All, offline_access; Publisher=UnverifiedPermission-scope IOC: requested permissions (mail send, full file read/write, offline access) far exceed what a "notes sync" app plausibly needs.
--(App registration metadata)App created 2022-06-29 (3 days prior); zero other consents tenant-wideNovelty IOC: brand-new, single-use app registration - not an established internal or widely-adopted third-party tool.
2022-07-02 13:06:02Quick Notes Sync (as r.patel)Graph API: GET /me/messages x340From IP 41.203.72.18 (Nigeria) - user's normal sign-in location is US-EastLocation-anomaly IOC: application's API calls originate from a geography inconsistent with the user's established pattern, despite using a legitimately-issued OAuth token (no sign-in/MFA challenge triggered, since consent already granted access).
2022-07-02 13:06:02 - 13:09:00Quick Notes SyncGraph API: mailbox search for "invoice", "wire", "password"Targeted keyword search across the mailboxIntent IOC: search terms indicate targeted financial/credential-fraud reconnaissance, not legitimate note-syncing functionality.
2022-07-02 13:10:15Quick Notes SyncGraph API: POST /me/mailFolders/inbox/rulesNew inbox rule created: forward matching "invoice" to external address, mark as readPersistence/exfil IOC: identical technique to classic mailbox-rule BEC setup, but achieved via OAuth token abuse rather than direct account compromise - MFA and password reset would not revoke this access.
-(offline_access scope)N/ARefresh token issued with offline_access, valid independent of the user's session or password changesDurability IOC: this is precisely why illicit consent grants are dangerous - a password reset alone does not revoke the attacker's access; the OAuth grant itself must be explicitly revoked.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - a user was phished into granting a malicious unverified OAuth application high-privilege mailbox access, which was immediately abused for reconnaissance and BEC-style inbox rule creation!