The 2026 InfoSec Playbook · Scenario playbooks

#14.4 Identity Provider and Privileged Credential Compromise

Playbook ID: PB-IDP | Default severity: SEV-2 (escalate to SEV-1 the moment federation config, token-signing material, a directory-sync account, a Global Admin or Domain Admin assignment, or krbtgt is implicated) | Owner: Incident Commander

#When to run this

Not this playbook: a single non-privileged SaaS takeover (14.3 PB-ATO); mailbox fraud and payment diversion (14.2 PB-BEC); a grant issued to a breached vendor's app (14.5 PB-SUPPLY); an admin abusing rights legitimately given (14.6 PB-INSIDER). If encryption is already running, 14.1 PB-RANSOM leads — but run this in parallel, because identity services are now a deliberate ransomware target, not collateral damage.

#What you are dealing with

Every other playbook in this chapter assumes you can log in to fix things. This one does not. The console you would use to contain the attacker may be one the attacker also holds, and the chat channel where you would coordinate almost certainly single-signs-on through the thing you are about to declare untrustworthy. Plan the first hour assuming the adversary is reading over your shoulder.

Sophos found 79% of ransomware attacks began with an identity-based approach, despite 97% of victims having some MFA (Sophos 2026). Microsoft reports 97% of identity attacks are password attacks, and that phishing-resistant MFA blocks over 99% of them even when the attacker already holds valid credentials (MDDR 2025). So attackers stopped fighting the credential and started stealing what the credential produces: AiTM reverse-proxy kits capture the session token after genuine MFA completes (Group-IB), and vishing is now the #2 initial infection vector at 11% of Mandiant investigations (M-Trends 2026). MFA was not bypassed. It was made irrelevant. Nor are you racing someone typing — CrowdStrike measured eCrime breakout time averaging 29 minutes, fastest observed 27 seconds (CrowdStrike 2026 GTR).

The mistake teams make is nearly always the same: reset the password, watch the sign-in fail, write "contained" in the ticket. Microsoft is blunt about consented apps — "Normal remediation steps (for example, resetting passwords or requiring multifactor authentication (MFA)) aren't effective against this type of attack, because these apps are external to the organization" (illicit consent grants). A reset does not touch an OAuth grant, does not touch an application's own session cookie — "Microsoft Entra ID can't directly revoke a session token issued by an application" (revoke user access) — and does not touch an access token that, in a Continuous Access Evaluation session, lives up to 28 hours (CAE). It does lock out the real user, who calls the service desk, which tells the building something is wrong. Takeaway: the containment primitive here is revocation, not rotation — and rotation without revocation is worse than nothing, because it tips off the adversary while leaving them logged in.

#Roles for this incident

RoleResponsibility in this scenario
Incident CommanderOwns the trust-in-the-IdP call; approves every tenant-wide action; runs the out-of-band bridge.
Operations LeadSequences the containment burst; owns the cloud branches; confirms each action complete.
Identity Operations LeadHolds break-glass; executes federation, token-signing, krbtgt and Tier-0 actions. Must not be someone whose own account is in scope.
Service Desk LeadFreezes self-service and desk-initiated password and MFA resets; verifies exceptions out of band.
Communications LeadInternal comms by phone, not email; owns the "do not discuss this in Teams or Slack" instruction.
ScribeTimeline to the minute — the only evidence of when "awareness" arose for every regulatory clock.
Legal LiaisonEngages counsel before the first substantive assessment; opens legal hold; owns privilege.
Executive SponsorAuthorises what stops the business: breaking federation, tenant-wide revocation, rebuild.

**Step markers: EVIDENCE degrades or destroys evidence. TIP-OFF tips off the adversary.

#Phase 1 — Detection and Triage

#ActionWhoDone whenEvidence to capture
1.1Declare, and stand up the out-of-band bridge first — phone plus a channel that does not authenticate against the suspect IdP. Not Teams, Slack or M365 mail.ICRoster acknowledged by voiceDeclaration time, roster, channel
1.2Start the append-only timeline; engage counsel and open legal hold. Holds are not retroactive.Scribe / Legal LiaisonTimeline live; hold confirmed in writingTimeline (hashed), hold notice, custodian list
1.3Deconflict against change records. Time-box: 15 minutes.Ops LeadMatch found, or absence confirmedTicket ID, or written "no matching change"
1.4Export logs before touching anything: Entra audit and sign-in, Purview UAL, CloudTrail, Workspace admin/login/OAuth-token, GCP Admin Activity.Ops LeadExport hashed, held outside the affected tenantManifests, SHA-256 hashes, time ranges, exporter
1.5Diff every privileged role assignment — including eligible assignments and nested groups — against the last known-good baseline.Identity Ops LeadDiff reviewedAssignment export, diff, baseline date
1.6Inventory federation config and token-signing material for every verified domain, plus app registrations and service principals with credentials added in the window.Identity Ops LeadCompared to baselineConfig export, certificate thumbprints, credential-add records
1.7Inventory OAuth grants tenant-wide, ConsentType = AllPrincipals first; pull risky users alongside.Ops LeadPermissions.csv triagedThe CSV, Consent to application records, risky-user output
1.8Answer in writing: are normal administrative paths trustworthy? If no, everything downstream runs from break-glass on a hardened workstation.ICDecision recorded with reasoningWritten determination, time, concurrence
PowerShell
# Needs Security Administrator + IdentityRiskEvent.Read.All + IdentityRiskyUser.ReadWrite.All.
# Confirming compromise is not cosmetic — it raises the user to high risk, itself a CAE critical event.
Connect-MgGraph -Scopes "IdentityRiskEvent.Read.All","IdentityRiskyUser.ReadWrite.All"
Get-MgRiskyUser -Filter "RiskLevel eq 'high'" | Format-Table UserDisplayName, RiskDetail, RiskLevel
Confirm-MgRiskyUserCompromised -UserIds "<id1>","<id2>"

# Tenant-wide OAuth grant inventory — Microsoft's documented method.
.\Get-AzureADPSPermissions.ps1 | Export-Csv -Path "Permissions.csv" -NoTypeInformation

#Phase 2 — Containment

Containment here is one burst, not a series of tidy-ups. Contain piecemeal and, in Mandiant's words, "the responders 'tip their hand' to the attacker," who abandons the burned infrastructure and persists on footholds you never found (Aldridge, Remediating Targeted-threat Intrusions). Plan every step, then execute them together.

#ActionWhoDone whenEvidence to capture
2.1Validate break-glass before anything else: excluded from every CA policy including Microsoft-managed ones, credentials retrievable without SSO, test sign-in succeeds.Identity Ops LeadTest sign-in succeeds from a hardened workstationSign-in log entry, exclusion list, custody record
2.2**Freeze the service desk. TIP-OFF Suspend self-service reset and all desk-initiated MFA re-enrolment tenant-wide; exceptions need out-of-band manager verification.Service Desk LeadFreeze announced by phone and enforced in toolingFreeze notice and time, exceptions granted
2.3Write the burst as one ordered script and dry-run it. Nothing executes until 2.1 passes and the IC approves.Ops LeadScript approvedThe script, reviewer, approval time
2.4Execute — revoke sessions and reset credentials in the same action, every in-scope identity. Hybrid: on-prem AD first, reset twice, then Entra.Identity Ops LeadAll identities processed; no partial statePer-identity output, exact times, operator
2.5Revoke malicious OAuth grants and app-role assignments; disable attacker-registered devices and MFA methods. A password reset reaches none of these.Ops LeadAll re-enumerate as absentBefore/after inventories, removal records, device IDs
2.6AWS: attach the quarantine SCP from the management account, then revoke role sessions and change permissions. Revocation alone is not containment. An SCP does not reach a principal in the management account or a service-linked role — contain those with an in-account deny.Ops LeadSessions revoked, permissions denied, and CloudTrail shows an AccessDenied for the named principal. "Policy attached" is not done.SCP and attach output, the denying CloudTrail event (principal, action, time), AWSRevokeOlderSessions policy with its timestamp
2.7AWS: set compromised keys Inactive, not deleted. For federation, drop the offending client ID from the OIDC provider, or delete the provider if the trust is suspect. EVIDENCE export its config first.Ops LeadKeys inactive; OIDC trust scoped or removedKey IDs, last-used data, provider ARN and config export
2.8GCP: disable or delete the service account itself, not just its key — "Disabling a service account key does not revoke short-lived credentials that were issued based on the key" (Google). Workspace: signOut and revoke third-party tokens; signOut alone leaves grants working.Ops LeadWorkloads stop authenticating; both Workspace calls succeedCommand output, SA email, client IDs revoked
2.9Verify by observation: 60 minutes watching for new token issuance, sign-ins or API calls from every contained principal.Ops Lead60 minutes clean, or re-scope to Phase 1Query results, window, analyst name
PowerShell
# On-prem AD first. The password is reset twice to mitigate pass-the-hash under replication delay.
Disable-ADAccount -Identity johndoe
Set-ADAccountPassword -Identity johndoe -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "<random1>" -Force)
Set-ADAccountPassword -Identity johndoe -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "<random2>" -Force)

# Then Entra. Privileged Authentication Administrator is required for admin accounts.
Connect-MgGraph -Scopes "User.ReadWrite.All","Directory.AccessAsUser.All"
$User = Get-MgUser -Search UserPrincipalName:'johndoe@contoso.com' -ConsistencyLevel eventual
Revoke-MgUserSignInSession -UserId $User.Id   # kills refresh tokens and browser session cookies
Update-MgUser -UserId $User.Id -AccountEnabled:$false
Get-MgUserRegisteredDevice -UserId $User.Id -All | ForEach-Object {
    Update-MgDevice -DeviceId $_.Id -AccountEnabled:$false
}
shell
# Quarantine from OUTSIDE the compromised account: an SCP lives in the management account,
# so an attacker holding admin in the member account cannot detach it. The target may be
# a root (r-*), an OU (ou-*), or a 12-digit account ID — but attaching at the root does not
# widen the blast radius to the management account. An SCP at any level, root included, has
# no effect on users or roles in the management account and no effect on service-linked
# roles. If the compromised principal is a management-account principal, this command
# attaches cleanly and contains nothing: use an in-account deny on that principal instead.
aws organizations attach-policy --policy-id p-examplepolicyid111 --target-id <account-or-ou-id>

Then set each compromised key to Inactive with aws iam update-access-key — AWS's documented rotation sequence deactivates before deleting, and for a compromised key you want the usage history preserved. The revoke-sessions action attaches an inline policy named AWSRevokeOlderSessions to the role; the equivalent you can write yourself is a Deny * on * conditioned on aws:TokenIssueTime being earlier than the moment you chose.

#Phase 3 — Eradication

#ActionWhoDone whenEvidence to capture
3.1Remove attacker-created app registrations, service principals, federated credentials and secrets; rotate credentials on every legitimate registration holding privileged API permissions.Identity Ops LeadInventory matches approved baselineBefore/after inventory, deletion records, rotation log
3.2Restore federation config and token-signing material to verified known-good, or move affected domains to managed authentication. EVIDENCE export the attacker's config first.Identity Ops LeadConfig matches signed baselinePre- and post-change exports, hashed
3.3Reset krbtgt twice, at least 10 hours apart so the first fully replicates — the account holds a two-password history, so one reset leaves the original in place (CISA CM0050).Identity Ops LeadBoth resets replicatedReset times, repadmin confirmation
3.4Reset every Tier-0 credential — Enterprise, Domain and Schema Admins, Server and Account Operators — plus AD trust and gMSA passwords (golden gMSA).Identity Ops LeadAll rotatedAccount and gMSA lists, times, custody records
3.5Review AD CS certificate templates and issued certificates; revoke anything you cannot account for.Identity Ops LeadTemplates match baselineTemplate diff, CRL entries, issuance log
3.6Remove attacker-created CA exclusions and named locations; restore policy from version control, report-only before enforcing.Ops LeadPolicy set matches signed baselinePolicy diff, report-only results, enforcement time
3.7Rebuild compromised cloud roles to least privilege rather than re-enabling them, using CloudTrail-driven policy generation as input. Keep hunting throughout.Ops LeadNew policies deployed; 72 hours with no new indicatorsGenerated policies, hunt results, sign-off

#Phase 4 — Recovery

#ActionWhoDone whenEvidence to capture
4.1Rotate every break-glass credential used during the incident; return to sealed custody.Identity Ops LeadNew credentials sealed and loggedCustody form, rotation time, witness
4.2Re-enrol privileged users onto phishing-resistant MFA (FIDO2/WebAuthn or PKI) from a verified device, in person or on video. Number matching is a push-fatigue mitigation, not the destination.Identity Ops LeadAll privileged role holders re-enrolledEnrolment records, verification method, verifier
4.3Re-enable accounts in dependency order. Budget for Microsoft's documented lag: 15 minutes for SharePoint and Teams, 35–40 minutes for Exchange Online.Ops LeadUsers confirm access by phoneRe-enable times, first sign-in per user
4.4Restore in dependency order: clean network and out-of-band comms → identity → DNS/DHCP/PKI/NTP → secrets → core data services → applications → endpoints.Ops LeadEach tier validated before the next startsPer-tier checklist, times, validator
4.5Confirm backup systems authenticate out-of-band, not against the recovered IdP; test a restore using only those credentials.Ops LeadRestore succeeds on out-of-band credentials aloneRestore log, credential path, integrity check
4.6Lift the freeze in stages under the new verification standard; monitor privileged sign-ins, consent grants, role assignments and federation changes.Service Desk LeadFreeze lifted; watch period ends cleanLift time, updated runbook, detection list, sign-off

#Phase 5 — Post-Incident

#ActionWhoDone whenEvidence to capture
5.1Blameless hotwash within 10 business days, with the timeline as the primary artefact.ICFindings recorded with owners and datesAttendance, findings register
5.2Establish root cause and enabling conditions — not just the initial vector, but the control that should have caught it.Ops LeadRoot cause agreed and writtenRoot-cause statement, evidence references
5.3Close the log gaps the investigation exposed: diagnostic settings to SIEM or storage, expanded audit actions, retention beyond default.Ops LeadChanges deployed and verifiedConfig before/after, verification query
5.4Set a dated, owned plan to kill push and SMS MFA for privileged roles and enforce phishing-resistant MFA with no exception group.Executive SponsorPlan approved with a date and named ownerApproved plan, date, owner, board minute
5.5Convert the containment burst into a tested runbook; put the break-glass path on an exercise schedule.Identity Ops LeadRunbook merged; first exercise completeRunbook version, exercise report, gaps
5.6Move evidence to long-term retention under legal hold, chain of custody intact; close out regulatory filings.Legal LiaisonEvidence archived; filings completeCustody transfer records, retention period, filing confirmations

#Decision points

#Communications and notification triggers

Internal comms run by phone, not email — CISA is explicit that users of potentially compromised systems should be notified by phone, precisely to avoid tipping off an adversary reading the mailbox. The clocks here are triggered by what the identity plane gave access to, not by the identity compromise itself: personal data reached through a compromised admin account starts the GDPR Article 33 72-hour clock from awareness; a regulated service starts the NIS2 24-hour early warning and, for financial entities, DORA's 4-hour-from-classification clock; a public company opens the SEC materiality track immediately. If you federate to customers, or you are somebody's identity provider, downstream notification duties begin the moment federation integrity is in doubt. Chapter 15 holds every clock, recipient and template.

#Automation notes

Automate freely — these gather and enrich, they do not act: log export and hashing, privileged-role diffing against baseline, OAuth grant inventory and AllPrincipals triage, risky-user enumeration, evidence snapshots, timeline assembly, paging the roster to the out-of-band bridge.

Automate behind a scoped, rate-limited gate: session revocation and credential reset for a single non-Tier-0 identity flagged by a confirmed high-risk detection, capped per hour, logged and reversible.

Require a named human approver, every time: tenant-wide revocation; any federation or token-signing change; deleting an OIDC provider (there is no disable operation, and "Deleting an OIDC provider does not update roles that reference it. Any attempt to assume such roles will fail"); attaching a quarantine SCP; disabling any account holding a privileged role; the krbtgt reset. The governing rule: automation may gather, enrich, correlate and recommend without approval; it may act only where the action is reversible, scoped and rate-limited. The documented failure mode of AI-assisted triage is worth quoting to your team — "the agent acts on a confident hallucination before a human sees it" (Panther). Here, the hallucination is "contained."

#Pitfalls

This is one of the fourteen scenario playbooks in The 2026 InfoSec Playbook, a free field manual by Daniel Ramos. Written so somebody who has never read the book can pick it up mid-incident and run it. See all fourteen. Free, in full, no email wall.