Join our Newsletter — 33% off our NHI Course
Home› Guides› Incident Scoping and Containment Strategy Guide: when to…
Guide Incident Response & Forensics

Incident Scoping and Containment Strategy Guide: when to act, observe or evict

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 27 October 2026 14 min read
On this page

Containing an intrusion before you know its scope often just teaches the attacker which foothold you found, while they keep the others. Responders face the same decision in almost every serious incident: act now to limit damage, or observe a little longer to find every account, host and persistence mechanism, then remove them all at once. This guide covers how to scope an incident, choose a containment strategy against explicit criteria, decide between immediate containment and coordinated eviction, and apply containment across identity, endpoint, network, cloud and SaaS layers. It is written for incident commanders, IR leads and SOC managers who already run a basic incident process and want to make better containment calls. For the overall response lifecycle see the Incident Response Guide.

Key takeaways

  • Scope drives containment. NIST SP 800-61 Rev. 3 asks responders to estimate and validate an incident's magnitude (RS.AN-08) and to identify all affected hosts and services before eradication.
  • Use written criteria, not instinct. Potential damage, evidence needs, service availability, effort, effectiveness and duration should decide each containment action, and the decision should be logged.
  • Active, capable attackers need coordinated eviction. Removing access piece by piece lets them react; plan, then remove every known foothold in one window.
  • Destructive or fast-moving attacks reverse the logic. Ransomware staging, data theft in progress or safety risk justify immediate containment even with incomplete scope.
  • Identity is the hardest layer to contain. Password resets do not end existing sessions, and patching does not invalidate stolen tokens: plan session and token revocation explicitly, including for non-human identities.

Scoping: what you need to know before you act

Scoping answers how far the attacker got and what they can still reach. It runs continuously from detection to closure, but there is a minimum picture you need before deciding on containment. NCSC frames the first analysis priority as understanding enough to take containment actions, not everything.

Scope dimensionQuestionsTypical evidence
IdentitiesWhich human, service and workload accounts did the attacker use, create or modify? Which tokens, keys or OAuth grants could they hold?IdP sign-in and audit logs, directory change logs, app registration and service principal changes (ATT&CK T1098.001), key last-used data
Hosts and workloadsWhich systems show attacker activity or tooling? Which were reachable with stolen credentials?EDR telemetry, logon events, lateral movement indicators, cloud instance metadata
PersistenceWhat would let them back in after a reset? Web shells (T1505.003), scheduled tasks (T1053.005), services (T1543.003), new accounts (T1136), federation or authentication changes (T1556.007, T1484)Autoruns, EDR persistence views, IdP federation settings, conditional access changes
Access pathsHow did they get in, and is that path still open? VPN or remote services (T1133), exposed applications, third-party connectionsEdge device logs, vulnerability status, supplier access records
DataWhat was accessed, staged or exfiltrated?File and mailbox audit, proxy and egress logs, cloud storage data events
Third partiesAre suppliers, customers or subsidiaries affected or the source?Shared tenants, federation trusts, managed service provider access

Track scope as a living list of indicators, accounts and assets with a confidence level for each. Use it to answer the incident commander's standing question: "If we act now, what will we miss?" For the forensic side of scoping see the Forensic Timeline Analysis Guide.

Choosing a containment strategy

AWS's incident response guidance restates the NIST criteria for selecting a containment approach. Score each candidate action against them and record the result in the decision log.

  • Potential damage and theft: what will the attacker do if left in place for another hour, day or week?
  • Evidence preservation: will this action destroy volatile evidence (memory, active connections) or tip off the attacker before collection?
  • Service availability: what business service stops, and who must approve that?
  • Time and resources: can the team execute it now, across all affected assets, and out of hours?
  • Effectiveness: does it fully remove access or only part of it?
  • Duration: emergency workaround, temporary measure or permanent fix? NIST SP 800-61 Rev. 3 asks teams to consider how long each containment measure will last.

AWS groups containment into three categories that work on any platform: source containment (filter or route to block access from a source), technique and access containment (remove the access the attacker uses) and destination containment (filter or route to protect the target). Good plans combine all three.

NIST SP 800-61 Rev. 3 recommends that handlers can select and perform containment manually, in addition to or instead of automated measures, and that teams consider automatic containment for some threats such as quarantining malware or moving an endpoint to an isolated remediation network. It also suggests authorising third parties such as ISPs and cloud providers to contain some incidents, for example large DDoS attacks, on the organisation's behalf.

Contain now or observe first

Observation is a deliberate, time-boxed decision taken by the incident commander with legal input, not a default. NIST notes that delaying containment, for example to redirect an attacker into a sandbox, can let them escalate access or compromise other systems, so the feasibility should be discussed with legal first. NCSC similarly advises considering whether the attacker may react to your actions, and that in some cases it is better to monitor and analyse further before acting.

SituationDefaultReason
Ransomware staging, mass deletion or encryption startingContain immediatelyDamage is fast and irreversible
Active data exfiltration of regulated or sensitive dataContain the channel immediately; widen scope in parallelEach hour adds harm and notification scope
Safety or critical service risk (OT, health)Contain immediately with operationsHuman safety outranks evidence
Commodity malware on a single endpointAutomated isolation and reimageLow chance of a wider hands-on intrusion; check credentials used on the host
Hands-on intrusion, multiple footholds suspected, no imminent destructionObserve briefly, scope, then coordinated evictionPartial action alerts the attacker and leaves backdoors
Suspected state-sponsored espionageObserve under strict time box, plan eviction, involve authoritiesThese actors maintain several access routes and react to partial clean-up
Stolen credential or token known to be in useRevoke now, but scope what else it reached first if minutes allowBearer credentials give immediate access; revocation is cheap

While observing, limit damage quietly: tighten egress monitoring, protect backups, raise alerting sensitivity on crown jewel systems and avoid actions an attacker would notice, such as resetting their accounts or sending mass password reset emails. Communicate on channels you are confident are not compromised.

Record the decision. Whichever way the call goes, log who decided, when, which criteria weighed most, what was accepted as residual risk, and when the decision will be reviewed. Observation decisions in particular are scrutinised afterwards by regulators, insurers and boards, and a clear record shows the delay was a risk-managed choice. See the Incident Log and Decision Record Template.

Coordinated eviction versus whack-a-mole

Whack-a-mole is removing each foothold as you find it. Against a capable attacker it usually fails: each removal shows them what you can see, and they use the access you have not found to re-establish themselves. Coordinated eviction removes every known foothold in one planned window. NCSC notes that remediation actions may be coordinated to run simultaneously.

  1. Pre-eviction: complete scoping to an agreed confidence level; build the eviction list (accounts, credentials, tokens, hosts, persistence, access paths, network indicators); prepare clean admin workstations and out-of-band communications; stage replacement credentials; confirm backups are clean; brief the business on downtime.
  2. Eviction window: execute all actions in a defined order within hours, for example block known infrastructure, cut external access paths, disable compromised and attacker-created accounts, revoke sessions and tokens, rotate credentials starting with the most privileged, remove persistence, isolate or rebuild affected hosts.
  3. Post-eviction: heightened monitoring for re-entry attempts, using the indicators you collected; verify each action took effect; keep the attacker's old access paths under watch as tripwires.

Order matters in identity. In Active Directory, compromise of the domain often requires resetting the krbtgt account password twice, with replication completing between resets, and rotating every privileged and service account password. In federated environments, Microsoft's guidance after golden SAML style attacks is to rotate the token-signing certificate twice, as the SolarWinds supply chain compromise showed (ATT&CK T1606.002). See the Active Directory Domain Compromise Playbook and the Identity Provider Tenant Compromise Playbook.

Containment options by layer

LayerOptionsWatch out forD3FEND
Identity (human)Disable account, reset password, revoke refresh tokens and sessions, require re-registration of MFA methodsExisting access tokens and app session cookies outlive the resetD3-AL Account Locking, D3-CR Credential Revocation, D3-ST Session Termination
Identity (non-human)Rotate secrets and keys, remove added credentials from app registrations, revoke OAuth grants, disable service principalsBreaking production; unknown owners; credentials assumed unusedD3-CR Credential Revocation, D3-CE Credential Eviction
EndpointEDR network isolation, kill processes, quarantine files, reimageIsolation before memory capture loses evidenceD3-NI Network Isolation, D3-PT Process Termination, D3-FEV File Eviction
NetworkBlock IPs and domains, sinkhole DNS, segment, disable VPN profiles, cut supplier linksAttackers rotate infrastructure; blocking one IP rarely holdsD3-NI Network Isolation
CloudExplicit deny policies on compromised roles, restrictive security groups, revoke role sessions, snapshot before changesTerminating instances destroys evidence; other regions and accountsD3-CR Credential Revocation
SaaSRevoke sessions, disable connected apps and integrations, remove forwarding rules, lock external sharingIntegration tokens survive user resetsD3-ST Session Termination

D3FEND groups these countermeasures under its Isolate and Evict tactics, which makes it a useful catalogue when building layer runbooks. See the MITRE D3FEND Guide.

Where identity fits

Identity containment fails quietly because tokens and sessions are independent of passwords. Microsoft documents that Entra ID access tokens last one hour by default and remain usable until they expire after refresh tokens are revoked, and that Entra ID cannot revoke application session cookies directly: the application has to end its own sessions, unless it supports Continuous Access Evaluation. In hybrid environments Microsoft recommends acting on on-premises Active Directory first, including resetting the password twice to mitigate pass-the-hash.

  • Sessions survive patches: in CitrixBleed, patching stopped new session leakage but did not invalidate stolen cookies, so Citrix told customers to terminate all active and persistent sessions after upgrading. Treat stolen sessions (T1539) as credentials.
  • Non-human credentials are part of scope: after the Okta support system breach, Cloudflare left one service token and three service accounts unrotated because it believed they were unused, and an attacker used them weeks later. See the Cloudflare Thanksgiving breach. Rotate every credential that was exposed, not just those you know are active.
  • Dependencies: map which applications use each service account before rotating, or plan an outage. See the Leaked Credential Response Playbook.

Preparing containment before the incident

  1. Pre-approve actions. Define which containment actions the SOC may take without escalation (isolate a workstation, revoke a user's sessions) and which need the incident commander or service owner (isolate a server, disable a federation trust).
  2. Write layer runbooks. One page per platform: how to isolate, revoke, rotate and snapshot, with the role required. Keep copies offline.
  3. Prepare out-of-band capability. Communications outside the corporate tenant, clean admin workstations, and break-glass accounts not synchronised from the directory under attack.
  4. Inventory non-human identities with owners and dependencies. Without it, eviction either breaks production or leaves keys behind.
  5. Exercise the decision. Run a tabletop where the facilitator forces a contain-or-observe choice with incomplete scope, then a technical drill of a mass session revocation and service account rotation in a test tenant.
  6. Plan rollback. For each containment action document how to reverse it if it was wrong or caused unacceptable outage, and who decides.

Decision guidance by organisation size

  • Small organisations: lean on automated EDR isolation and managed service or retainer support. Pre-agree with the provider what they may contain without asking. Prioritise revoking sessions and resetting cloud admin accounts, which give the most protection for the least effort.
  • Mid-sized organisations: pre-approved action matrix, layer runbooks and at least one rehearsed eviction for an identity provider compromise.
  • Large or regulated organisations: a standing eviction planning cell drawn from IAM, network, cloud and application teams; separate administrative infrastructure; legal and law enforcement engagement procedures; formal sign-off of eviction windows.

Measuring containment

  • Time to contain: from incident declaration to the attacker's last confirmed activity, by severity.
  • Re-compromise rate: incidents where attacker activity reappeared within 30 days of containment.
  • Eviction completeness: percentage of eviction list items verified done within the window.
  • Credential coverage: percentage of exposed credentials, including non-human ones, rotated or revoked within target.
  • Containment-caused outage: unplanned downtime caused by containment actions, as a check on runbook quality.

Framework mapping

FrameworkReferenceRelevance
NIST CSF 2.0RS.AN-08, RS.MA-03, RS.MA-04, RS.MI-01, RS.MI-02, RS.MA-05Magnitude estimated, prioritised and escalated, contained, eradicated, recovery criteria applied
NIST SP 800-53 Rev. 5IR-4 Incident Handling, IR-8 Incident Response PlanContainment as part of handling; strategy defined in the plan
ISO/IEC 27001:2022Annex A 5.26 Response to information security incidentsDocumented response procedures
CIS Controls v8.1Control 17 Incident Response ManagementRoles, procedures and exercises. See the CIS Control 17 Incident Response Management Guide
MITRE ATT&CK and D3FENDPersistence techniques listed above; D3FEND evict and isolate techniquesScope checklists and containment action catalogue

Common failure patterns

  • Resetting passwords and calling it contained: refresh tokens, app sessions, OAuth grants and API keys remain valid.
  • Patching the entry point but not killing sessions: the CitrixBleed pattern, where access continued after the fix.
  • Skipping "unused" credentials: the Cloudflare pattern, where four credentials assumed inactive gave a later attacker a way in.
  • Tipping off the attacker: resetting one account they use, or discussing the incident in a mailbox they can read, before the eviction plan is ready.
  • Isolating before collecting: pulling the network or rebooting before capturing memory and volatile state on key hosts.
  • Observation without a deadline: "watch and learn" that drifts while data leaves; every observation period needs an end time and tripwires.

Lessons from incidents

  • Cloudflare, November 2023: the attacker explored Confluence and Jira from 14 November using credentials left over from the Okta breach, and Cloudflare detected the activity on 23 November. Its response illustrates coordinated eviction at scale: a dedicated remediation effort that rotated more than 5,000 production credentials, triaged 4,893 systems and reimaged every machine in its global network. The lesson is that eviction scope must be set by what was exposed, not by what is believed to be in use.
  • CitrixBleed, October 2023: organisations that patched promptly were still breached through cookies stolen before the patch. Containment for any edge device vulnerability that leaks memory or credentials must include ending sessions and rotating credentials that passed through the device, not just applying the fix.
  • SolarWinds and golden SAML, 2020: attackers who can forge tokens or add credentials to trusted applications survive ordinary password resets. Eviction had to include the token-signing certificate and a review of credentials added to existing service principals, which few organisations monitored at the time.

Across all three, the common thread is that the containment plan treated credentials, sessions and trust relationships as part of the attack surface to be reset, and that the incomplete first attempts are what attackers exploited.

Practitioner checklist

  • Maintain a pre-approved containment action matrix by asset type and severity.
  • Keep layer runbooks for identity, endpoint, network, cloud and SaaS, with offline copies.
  • Record every containment decision against the six criteria in the incident decision log.
  • Set a time box and tripwires whenever the decision is to observe.
  • Build an eviction list covering accounts, tokens, keys, persistence, access paths and infrastructure before acting on a hands-on intrusion.
  • Revoke sessions and tokens explicitly, including for SaaS integrations and service principals.
  • Rotate every exposed non-human credential, using an inventory with owners and dependencies.
  • Capture volatile evidence on priority hosts before isolation where safety allows.
  • Monitor for re-entry for at least 30 days after eviction and track re-compromise.

Standards and references

Related NHI Mgmt Group resources: Incident Response Guide · Identity Incident Response Playbook · Ransomware Response and Recovery Guide · Incident Commander Role Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 27 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.