PIVTR-D
RScenario

SaaS integration and OAuth abuse

A connected app or integration token pulls data from a software as a service (SaaS) platform through its API, after a vendor breach or a voice phishing call. Export the platform logs first, because retention is short. Then revoke the tokens and block the app.

First moves
  1. Export the platform logs for the whole window before revoking any token.Intelligence/Investigations
  2. List every platform the app or vendor connects to, with each grant's scopes and integration user.Operations
  3. Block the app: Salesforce Connected Apps OAuth Usage, Entra permission removal, or Google Workspace Manage App Access.Operations
  4. Rotate the integration user passwords, API keys and client secrets the vendor stored.Operations
  5. For voice phishing, revoke the user's sessions at the identity provider.Operations
  6. Name a security contact at the vendor and log each statement of scope with date and time.Liaison

Then work the page: Scope, Contain and eradicate, Keep it closed, Coordinate with the vendor, Notify.

An OAuth grant lets an application read a SaaS platform through its API with no password prompt. Attackers get a grant in one of two ways. In the first, a vendor that integrates with you is breached and the tokens it stores for your tenant are used against you.

In the second, a caller posing as IT support talks an employee into authorizing an attacker's app. The data leaves through ordinary API calls, and the evidence sits in platform event logs.

Microsoft reports ShinyHunters-associated campaigns using both routes against Salesforce from mid-2025 to mid-2026. Mandiant's M-Trends 2026 reports voice phishing at 11% of intrusions in 2025, the second most common initial infection vector after exploits.

This scenario is an addition to the book. Sources checked October 2026: Microsoft, ShinyHunters OAuth abuse; Microsoft's device code phishing report; GTIG on UNC6395; M-Trends 2026; Salesforce Trailhead on event log files; Microsoft Learn on Entra data retention and audit log retention policies; Salesforce Help on the OAuth 2.0 device flow; Google Workspace Help on data retention and OAuth log events. Sources checked September 2026: GTIG on UNC6040; Salesforce advisories on Drift and Gainsight; Salesforce, Microsoft Learn and Google Workspace admin documentation.

What is different

RouteKnown casesWhat the response has to cover
Integration vendor breachedUNC6395 used Salesloft Drift OAuth tokens against Salesforce instances from August 8 to at least August 18, 2025, and Drift Email tokens against a few Google Workspace accounts. Gainsight followed in November 2025 and Klue in June 2026.Every token and secret the vendor stored for you. UNC6395 searched records for AWS keys, passwords and Snowflake tokens.
Voice phishing for consentUNC6040 callers posed as IT support and had staff open Salesforce's connected app setup page and enter a connection code. That linked a modified Data Loader, sometimes named "My Ticket Portal". UNC6040 then moved to Okta and Microsoft 365.The user's identity provider account and the SaaS grant. Extortion (UNC6240) can follow months later.
Device code phishingThe connection code step matches Salesforce's OAuth 2.0 device flow, where the user enters an 8-character code at the /setup/connect verification URL. Microsoft reported an April 2026 device code phishing campaign that yielded access and refresh tokens.Sign-ins through the device code flow, and a Conditional Access policy that blocks the flow

A password reset leaves the grant working. Revoke the tokens and remove or block the app.

Scope

Generic steps are on Scope. Log retention is short, so export first. Collection is on the evidence page.

#ItemOwner
1List every platform the app or vendor connects to, with each grant's scopes and integration userOperations
2Export the platform logs below for the whole window before revoking any tokenIntelligence/Investigations
3Filter API activity by the app's connected app or client ID, source IP address and user agent, and note the rows returned per queryIntelligence/Investigations
4List the objects and reports read or exported, and search records for secrets stored in fields, notes and attachmentsIntelligence/Investigations
5For voice phishing, check the user's identity provider sign-ins and other SaaS accounts for the same attackerIntelligence/Investigations
PlatformLogRetention and prerequisite
SalesforceSetup Audit Trail180 days, all orgs
SalesforceEvent Log Files: Login, Logout, API Total Usage and four other types24 hours without the Event Monitoring add-on
SalesforceEvent Log Files: other types, including Unique Query and Bulk APIEvent Monitoring add-on or Shield, retention up to one year for some types
SalesforceReal-Time Event Monitoring objects, such as ApiEvent and LoginEventSalesforce Shield or Event Monitoring add-on
Microsoft EntraSign-in logs and audit logs, including "Consent to application"7 days on Entra ID Free, 30 days on P1 or P2
Microsoft 365Purview audit log180 days on Audit (Standard). Audit (Premium) keeps Entra, Exchange, OneDrive and SharePoint records one year.
Google WorkspaceOAuth log events: grant, revoke, and API call6 months. API call events need Enterprise Standard or Plus, Education Standard or Plus, or Cloud Identity Premium.

UNC6395 deleted query jobs, and the logs kept the record.

Contain and eradicate

Generic steps are on Contain and Eradicate. Record each decision in T3 Containment decision record.

#ItemOwner
1In Salesforce, block the app in Setup, Connected Apps OAuth Usage. Blocking ends all current sessions and prevents new ones until someone clicks Unblock.Operations
2In Entra, remove the app's delegated permissions: Remove-MgOauth2PermissionGrantOperations
3In Entra, remove the app's application permissions: Remove-MgServicePrincipalAppRoleAssignedToOperations
4In Entra, set "Enabled for users to sign-in?" to No on the app, so no new tokens are issuedOperations
5In Google Workspace, set the app to Blocked in Security, Access and data control, API controls, Manage App Access. Blocking stops its access to Google data.Operations
6Rotate the integration user passwords, API keys and client secrets the vendor storedOperations
7Rotate secrets found in exported records at the system that issued themOperations
8Review other apps from the same vendor, and block them until the vendor reports clean. Salesforce's Gainsight advisory covered Gainsight-published applications as a group.Operations
9For voice phishing, revoke the user's sessions at the identity provider, as in BECOperations

Keep it closed

#ItemOwner
10In Salesforce, install trusted apps, set access through Permitted Users, and give "Approve Uninstalled Connected Apps" to administrators alone. Uninstalled apps that use the device flow are then blocked.Operations
11In Salesforce, restrict "API Enabled", "Customize Application" and "Manage Connected Apps" to named administrators, and set login IP ranges on profiles and connected app policiesOperations
12In Entra, restrict user consent, and block the device code flow with a Conditional Access policy under Conditions, Authentication flowsOperations

Coordinate with the vendor

Scope statements change. Drift tokens were revoked on August 20, 2025, and on August 28 GTIG widened its advice to every token stored in or connected to Drift. The supply chain scenario covers the contract side.

#ItemOwner
1Name a security contact at the vendor, and log each statement of scope with date and timeLiaison
2Ask the vendor in writing, with T19, which of your tokens it stored, when they were exposed, and its indicatorsIntelligence/Investigations
3Watch platform advisories and trust pages for revocations, re-enablement and new indicatorsPlanning
4Re-enable the integration after the vendor confirms remediation and the Incident Commander approvesIncident Commander

Notify

Customer relationship management (CRM) data contains customer contacts and support cases. Rate it against notification deadlines from the time of discovery.

#ItemOwner
1Map the exposed objects and fields to the people and customers they describePlanning
2Assess regulatory and contractual notices, and send them by their deadlines, one T17 per regimeLegal advisor
3Route extortion contact to the Legal advisor, and send no reply before reviewLegal advisor
4Agree customer and public statements with the vendor's timingPublic Information Officer
Watch out
  • Revoking or blocking the app before export can leave you with 24 hours of Salesforce event log files, or none.
  • Revoked consent can be granted again until user consent is restricted.
Adapts material from Dynamic Incident Response: A Framework for Security Teams by Joshua Wright, © 2026 The Escal Institute of Advanced Technologies, Inc. d/b/a SANS Institute, licensed under CC BY 4.0. Figures reproduced under that license. Changes were made. Not published by, endorsed by, or affiliated with the SANS Institute.