You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### OAuth Consent Grant Abuse: Detection & Response (Admin Reports)
169
+
170
+
When a user authorizes an OAuth app, Google Workspace records it in the **Admin Reports OAuth Token Audit Activity** (application name `token`) with `events.name` set to `authorize`. These events are the best telemetry to detect consent phishing and track the client ID and scopes that were granted.
- Alert if a `client_id` is **not in an approved allowlist** and **not seen in the last X days** (e.g., 90).
188
+
- Alert if granted `scope` includes **high-risk or rare** scopes, especially those that allow bulk data access or supply-chain impact, such as:
189
+
-`https://mail.google.com/`
190
+
-`https://www.googleapis.com/auth/gmail.readonly`
191
+
-`https://www.googleapis.com/auth/drive`
192
+
-`https://www.googleapis.com/auth/drive.readonly`
193
+
-`https://www.googleapis.com/auth/chat.messages`
194
+
-`https://www.googleapis.com/auth/chromewebstore`
195
+
196
+
```text
197
+
client_id NOT IN approved_client_ids
198
+
AND client_id NOT IN last_seen_90d
199
+
AND scope CONTAINS any(high_risk_scopes OR rare_scopes)
200
+
```
201
+
202
+
**Response / containment:**
203
+
204
+
- Revoke tokens for the malicious OAuth client ID:
205
+
206
+
```bash
207
+
gam all users delete tokens clientId <client_id>
208
+
```
209
+
210
+
- Block the OAuth client ID in the Admin Console by revoking the application’s access to Google data.
211
+
212
+
**Threat hunting pivots:**
213
+
214
+
- List external apps consented by fewer than N users (rare adoption).
215
+
- Review app name, publisher, permissions/scopes, and unique application ID.
216
+
- Look for dormant apps that suddenly use risky permissions (possible follow-on actions like internal phishing or data theft).
217
+
218
+
**Mitigations:**
219
+
220
+
- Restrict all third-party app access (admin-approved only).
221
+
- Allow limited access so users can only consent to basic “Sign in with Google” profile info.
222
+
168
223
## References
169
224
170
225
-[https://www.youtube-nocookie.com/embed/6AsVUS79gLw](https://www.youtube-nocookie.com/embed/6AsVUS79gLw) - Matthew Bryant - Hacking G Suite: The Power of Dark Apps Script Magic
171
226
-[https://www.youtube.com/watch?v=KTVHLolz6cE](https://www.youtube.com/watch?v=KTVHLolz6cE) - Mike Felch and Beau Bullock - OK Google, How do I Red Team GSuite?
0 commit comments