Containment

On this page 7

Containment is the phase of incident response in which defenders limit the scope and impact of a security incident by isolating affected systems, accounts and network paths while preserving evidence for investigation. It stops the situation from getting worse; it does not yet remove the attacker or restore normal operations.

In cybersecurity frameworks such as NIST SP 800-61, containment is grouped with eradication and recovery, and the SANS model treats it as its own step after identification. In both, the central task is the same: buy time and reduce harm with actions proportionate to the threat, without destroying the evidence needed to understand it.

Where containment fits in the incident lifecycle

Containment begins once incident triage confirms a real incident and gives an initial view of scope. It overlaps with investigation, because every new indicator of compromise may reveal another system that needs isolation.

PhaseMain goalTypical output
Detection and triageConfirm and prioritize the incidentSeverity, initial scope, assigned team
ContainmentStop spread and further damageIsolated hosts, disabled accounts, blocked indicators
EradicationRemove attacker presence and root causeCleaned or rebuilt systems, patched flaw
RecoveryReturn systems to normal operation safelyRestored services under heightened monitoring
Lessons learnedImprove defenses and processesReport, updated playbooks and controls
Incident response phases around containment

A well-run response distinguishes short-term containment, which takes effect in minutes, from long-term containment, which keeps business running safely for days or weeks while eradication is prepared.

Containment strategies and techniques

Containment actions operate at the network, host, identity and data levels. Effective responders combine several, because attackers usually hold more than one foothold.

LevelActionEffectSide effect
NetworkMove host to an isolated VLAN or block trafficCuts lateral movement and command channelsService outage for that host
EndpointEDR network isolationHost reachable only by the security consoleUser loses access to resources
IdentityDisable accounts, revoke sessions and tokensRemoves stolen credentials’ valueLegitimate users locked out temporarily
PerimeterBlock malicious domains and addressesStops known command and controlEasily evaded by infrastructure rotation
DataRestrict shares, suspend replication or syncLimits encryption or exfiltrationCollaboration interrupted
Common containment actions by level

Identity containment deserves particular attention in cloud environments. Resetting a password does not end existing sessions, so responders must also revoke refresh tokens, remove attacker-registered MFA devices and review OAuth application consents.

Balancing speed, evidence and business impact

Every containment decision trades speed against intelligence and business continuity. Acting immediately limits damage, but it may alert the attacker and destroy volatile evidence; waiting yields more insight but risks further harm.

SituationRecommended approachReason
Active ransomware encryptionIsolate immediately, broadly if neededDamage grows by the minute
Ongoing data exfiltrationBlock egress paths and revoke access fastEach hour adds exposed records
Stealthy long-term intrusionScope fully first, then contain all footholds at oncePartial action triggers attacker adaptation
Single phished accountRevoke sessions, reset credentials, review mailbox rulesContained scope allows quick, complete action
Critical production systemSegment and monitor instead of shutting downOutage cost may exceed attack risk
Containment decisions by situation

Capture volatile evidence before isolation where feasible: memory images, running processes and active network connections disappear when a machine is powered off. Isolation through EDR or network controls is generally preferred over pulling the power, which destroys memory contents.

Preparing containment in advance

Containment succeeds when the decisions and tools are prepared before the incident. Pre-agreed authority matters as much as technology, because waiting for approval can cost hours.

  • Define decision authority: state who may isolate a production server or disable an executive’s account.
  • Write playbooks per incident type: ransomware, business email compromise and cloud key leaks need different steps.
  • Pre-build isolation capabilities: quarantine VLANs, EDR isolation policies and conditional access rules ready to enable.
  • Keep out-of-band communication: assume email or chat may be monitored by the attacker.
  • Exercise regularly: tabletop exercises reveal missing permissions and unclear ownership.

Common containment mistakes

Most containment failures come from incomplete scoping or premature action. Teams that isolate the first infected laptop and declare success often find the attacker still active through another host or account.

  • Partial containment that leaves a backdoor, service account or persistence mechanism untouched.
  • Wiping systems too early, before forensic images are taken and the root cause is known.
  • Containing on the attacker’s channel, for example discussing the response in a compromised mailbox.
  • Forgetting backups and replicas, which ransomware operators frequently target first.
  • Lifting containment too soon, before eradication is verified by monitoring.

In simple terms

Containment is what firefighters do before they put a fire out completely. They close doors and cut off the fuel so the fire cannot reach other rooms, while they work out where it started.

In a cyberattack, this means disconnecting infected computers, locking stolen accounts and blocking the attacker’s connections. The goal is to stop the damage from spreading, not yet to repair everything.

A practical example

On a Monday morning, the endpoint detection system of a logistics company flags a file server that has started renaming thousands of documents with a new extension. The on-call analyst confirms ransomware activity and, following the playbook, uses the EDR console to isolate the server and three workstations showing the same process within ten minutes.

The team then disables the domain administrator account used in the attack, revokes its sessions and blocks the command-and-control addresses at the firewall. Memory images are captured from two isolated workstations before any reimaging. Because backups were stored offline and the spread stopped early, only one file share is affected, and the company restores it the next day instead of facing a company-wide outage.