Playbooks

T1078

SaaS Account Takeover Response Playbook

A structured playbook for detecting, containing, and investigating SaaS account takeovers — covering MFA bypass, session hijacking, OAuth abuse, and automated credential stuffing across SaaS platforms.

View on Graph

What This Playbook Covers

  • SaaS account takeovers occur when an attacker gains unauthorized access to a user’s cloud application account — typically through stolen credentials, session token theft, or MFA fatigue push bombing
  • This is distinct from on-prem credential theft. SaaS accounts have different detection surfaces (API logs, cloud audit logs, browser sessions) and different containment mechanisms (session revocation, OAuth token invalidation)
  • MITRE ATT&CK maps SaaS account takeover under T1078 (Valid Accounts) and T1556 (Modify Authentication Process) for MFA bypass

Common SaaS Takeover Vectors

VectorHow It WorksSaaS Accounts Affected
Credential stuffingAutomated login attempts using breached credentials from prior data breachesAny SaaS with login — most common on O365, Salesforce, GitHub
MFA fatigueRepeated push notification spam until the user approvesAll MFA-protected SaaS (Azure AD, Google Workspace, Okta)
Session token theftSteal session cookie/token via malware, proxy, or browser extensionAny SaaS with persistent sessions
OAuth abuseMalicious OAuth app requesting excessive permissionsGoogle Workspace, Slack, GitHub, Salesforce
SIM swappingSocial engineer the carrier to transfer the phone number — reset MFAAny SaaS using SMS MFA
Phishing (credential + session)Credential harvesting via phishing site that proxies the real loginAny SaaS

Phase 0: Detect the SaaS Takeover (0-15 minutes)

Detection Indicators by SaaS Platform

Detection — Anomalous sign-in activity: Monitor these signals across your SaaS platforms:

SignalWhat to CheckExamples
Impossible travelTwo sign-ins from geographically impossible locations within the session windowLogin from New York then login from Lagos 15 minutes later
Unfamiliar device/browserFirst sign-in from a device/browser the user has never usedNew device, new OS, new browser family
Unfamiliar IP/locationSign-in from an IP not in the user’s normal rangeVPN exit node, TOR exit node, known malicious IP
Anomalous sign-in frequencyFailed sign-ins followed by successful sign-inCredential stuffing pattern: 20 failed MFA attempts, then success
New MFA enrollmentMFA device added shortly before the takeoverNew device enrolled, then legitimate device removed
Mailbox rule creationNew rule forwarding or deleting emailAttacker creates rule to hide compromise notifications
OAuth app consentUser grants consent to an OAuth app they have never usedNew third-party app with Mail.Read, Files.ReadWrite permissions

KQL query — Azure AD sign-in anomalies:

SigninLogs
| where TimeGenerated > ago(1h)
| where RiskLevelDuringSignIn in ("medium", "high") or RiskLevelAggregated in ("medium", "high")
| project TimeGenerated, UserPrincipalName, IPAddress, Location, RiskLevelDuringSignIn, 
          DeviceDetail.browser, DeviceDetail.operatingSystem, Status.failureReason
| order by TimeGenerated desc

Google Workspace — anomalous login detection:

index=google_workspace event_name="login_success" OR event_name="login_failure"
| stats values(event_name) as Events, values(ip_address) as IPs, values(user_agent) as UserAgents by actor_email, _time
| where mvcount(IPs) > 3
| eval alert = "SUSPICIOUS — multiple IPs for " . actor_email . " in one session"

Slack — anomalous workspace access:

index=slack event_type="user_login"
| eval is_new_device = if(match(user_agent, "Mozilla") AND NOT match(user_agent, known_slack_user_agents), 1, 0)
| where is_new_device = 1 AND location NOT IN (known_team_locations)
| eval alert = "SUSPICIOUS — new device login for " . user_name . " from " . location

Phase 1: Immediate Containment (15-30 minutes)

Critical Actions — Do These First

  • Force password reset — do not use the user’s last password, and require MFA re-registration
  • Revoke all active sessions — sign out of all sessions across the affected SaaS, not just the current session
  • Revoke OAuth tokens — revoke all third-party app OAuth tokens granted by the affected user
  • Disable the user account — temporarily disable the account in the IdP while investigating
  • Check for mailbox rules — if O365 or Google Workspace, check for suspicious forwarding, deletion, or phishing rules
  • Cancel pending actions — if the attacker initiated actions (password reset, email forwarding, payment method change), cancel them

Platform-specific session revocation:

PlatformRevocation Method
Azure AD / O365Revoke-AzureADUserAllRefreshToken -ObjectId <user>
Google WorkspaceAdmin console → Security → Session control → Sign out all sessions
SalesforceSetup → Users → User detail → Session management → Log out
SlackWorkspace settings → Manage members → Deactivate or Force logout
GitHubSettings → Security → Revoke all sessions
AWSIAM → Users → Revoke all active sessions

What NOT to Do

ActionWhy It’s Dangerous
Notify the user immediatelyIf the user is the attacker (the account was compromised through credential sharing or their own device was compromised), notifying them may tip off the attacker. Verify through a separate channel.
Only reset passwordThe attacker may still have OAuth tokens, active sessions, or mailbox rules that persist after password reset
Ignore MFA device enrollmentIf the attacker enrolled their own MFA device, a password reset does not - the device persists
Assume it’s only one accountCredential stuffing often tests multiple accounts from the same breach database. Check for other recently compromised accounts.

Phase 2: Evidence Preservation (30-60 minutes)

Evidence to Capture

EvidenceSourceHow to Capture
Sign-in logsAzure AD SigninLogs, Google Workspace login auditExport 7 days of sign-in logs for the affected user
OAuth consent logsAzure AD consent logs, Google Workspace OAuth auditList all OAuth apps the user has consented to
Mailbox audit logsO365 Mailbox Audit, Gmail audit logCheck for rule creation, message forwarding, message deletion
Audit log (all platform activity)Each SaaS platform’s audit logFull export of the user’s activity for 7 days before and during the incident
MFA enrollment/change logsIdP audit logsCheck when MFA was enrolled, changed, or removed
Password reset logsIdP audit logsCheck if password reset was initiated by the attacker

Phase 3: Investigation (1-4 hours)

Questions to Answer

QuestionEvidence SourceHow to Determine
How was the account compromised?Sign-in log analysis — credential stuffing, phishing, MFA fatigue, session theft, SIM swapPattern of failed logins + MFA approvals + device enrollment
What data was accessed?Each platform’s audit log — file access, email read, API calls, repository accessList all data types accessed during the compromise window
Was data exfiltrated?Email forwarding rules, file downloads, API calls to external servicesCheck for large downloads, email forwarding, external sharing
What actions were taken?Full audit log of the compromise sessionList every action: password resets, MFA changes, OAuth consents, mailbox rules
Were other accounts affected?Cross-reference IP, device, and session data across other usersCheck if the same IP/device was used against other accounts
Is the attacker still active?Active sessions, OAuth token usage, recent loginsCheck active sessions and recent activity

Phase 4: Recovery and Hardening

Account Recovery

ActionDetailTimeline
Password reset (strong, unique)30+ character random passwordImmediate
MFA re-registrationRequire new MFA enrollment with FIDO2 or number-matching pushImmediate
Session token revocationRevoke all active sessions, OAuth tokens, and app passwordsImmediate
Mailbox/rule cleanupRemove any attacker-created rules, forwarding, or delegation1 hour
OAuth app auditReview and revoke suspicious OAuth applications1-2 hours
Restore deleted dataCheck recycle bin/deleted items for attacker-deleted data2-4 hours

Long-Term Hardening

ControlWhat It PreventsImplementation
Conditional Access policiesAnomalous sign-in (impossible travel, unfamiliar device)Azure AD Conditional Access or Google Workspace Context-Aware Access
Number-matching MFAMFA fatigue push bombingRequire number matching for all MFA approvals
FIDO2/PasskeysPhishing-resistant MFADeploy FIDO2 security keys for privileged users
Session token protectionSession token theftToken binding, short-lived sessions, continuous access evaluation
OAuth app governanceMalicious OAuth app consentRestrict OAuth consent to approved app publishers only
Credential monitoringCredential stuffingDeploy Azure AD Identity Protection or Google Workspace alert center
User educationPhishing and social engineeringRegular training on MFA fatigue, phishing, and OAuth risks

Sources