What is Containment?
In cyber security, containment is the incident response step that stops a confirmed incident from spreading while the evidence is preserved: isolating infected hosts, disabling or resetting compromised accounts, revoking their sessions and blocking attacker infrastructure. NIST SP 800-61 Rev. 3 places it in the CSF 2.0 Respond function as outcome RS.MI-01, "Incidents are contained."
Definition
- Containment
- In cyber security, containment is the incident response step that stops a confirmed incident from spreading while the evidence is preserved: isolating infected hosts, disabling or resetting compromised accounts, revoking their sessions and blocking attacker infrastructure. NIST SP 800-61 Rev. 3 places it in the CSF 2.0 Respond function as outcome RS.MI-01, "Incidents are contained."
How Containment Works
NIST's current incident response guide defines containment as "preventing the expansion of an incident" and notes that most incidents require some form of it. Containment stops the damage from growing. Removing the attacker's persistence is eradication, and bringing systems back to production is recovery. Containment buys the time for both. Reimage a host before the accounts the attacker stole are contained, and the attacker logs in somewhere else while the evidence you needed is gone.
Containment in NIST SP 800-61 Rev. 3
Most explanations of containment still use the four-phase life cycle of NIST SP 800-61 Rev. 2: Preparation; Detection and Analysis; Containment, Eradication and Recovery; Post-Incident Activity. NIST withdrew Rev. 2 on 3 April 2025 and replaced it with Rev. 3, which organizes incident response around the six functions of the Cybersecurity Framework (CSF) 2.0 instead of a cycle of phases. Rev. 3 maps the old "Containment, Eradication and Recovery" phase onto the Respond and Recover functions, plus the Improvement category (ID.IM).
Containment now sits in the Incident Mitigation category of Respond:
| CSF 2.0 ID | Name | What it covers |
|---|---|---|
| RS.MI | Incident Mitigation | "Activities are performed to prevent expansion of an event and mitigate its effects" |
| RS.MI-01 | Incidents are contained | Stopping the spread: isolate hosts, disable accounts, block infrastructure |
| RS.MI-02 | Incidents are eradicated | Removing persistence and entry points, covered under eradication |
For RS.MI-01, Rev. 3 recommends:
- letting security tools contain some incidents on their own, for example quarantining malware, moving a compromised endpoint to an isolated remediation network or halting an infected container;
- keeping the option for incident handlers to choose and run containment actions by hand, instead of or alongside the automation.
For the RS.MI category as a whole, it adds:
- writing criteria in advance by incident type (a cloud services compromise needs different actions from ransomware on a laptop) and deciding how long each measure should last: an emergency workaround removed within hours, a temporary one removed within two weeks, or a permanent fix;
- talking to legal before redirecting an attacker to a sandbox to watch them, because it delays containment and the attacker can escalate access in the meantime.
The rest of the framework is on the NIST CSF page, and the full life cycle on incident response.
Short-term and long-term containment
Short-term containment limits the damage within minutes: isolate the workstation (leave it powered on so memory survives for forensics), disable the account, block the attacker's IPs and domains at the firewall or proxy. Long-term containment holds that position while eradication is prepared: move affected servers to an isolated VLAN, add monitoring on the affected segment, apply emergency patches, turn off a service the attacker is abusing.
In a ransomware case, the short-term step isolates the hosts that are encrypting files and disables the service account used to spread. Over the following hours, the long-term work checks backup integrity, segments the affected subnet and turns off SMB where nothing needs it.
How wide to contain depends on how much you can see. If the attacker's full footprint is unknown, contain more than the confirmed compromise, an entire VLAN instead of one host, and accept the business cost. Containing too little lets the attacker return through a foothold nobody found.
Containment actions and the log that proves each one held
Each common containment step leaves a record that confirms it worked, and each one has a gap you still have to check.
| Action | Proof in the logs | Gap to check |
|---|---|---|
| Isolate the host in Microsoft Defender for Endpoint | Isolation shows as completed in the Action center; other hosts stop logging connections from its IP | The device keeps its connection to the Defender service. If it is offline, Defender retries the isolation for up to three days and the host stays on the network until it reconnects |
| Disable the Active Directory account | Event 4725, "A user account was disabled", with the account that did it in Subject | Service tickets issued before the disable stay valid, and a TGT less than 20 minutes old can still obtain new ones |
| Reset the password | Event 4724 as Audit Success. An Audit Failure means the reset did not happen | Anything still holding the old password. A 4740 lockout afterwards names that machine in Caller Computer Name |
Revoke Entra ID sessions (revokeSignInSessions in Microsoft Graph) | The user's signInSessionsValidFromDateTime changes to the time of the call | It invalidates refresh tokens and browser session cookies, with a delay of a few minutes. Access tokens already issued are not in that list, and they last 60 to 90 minutes by default |
| Block IPs and domains at the firewall or proxy | Deny entries for the indicator after the rule went in, and no allowed sessions | Infrastructure the attacker has not used yet |
The disable row needs a closer look. Kerberos V5 has no account revocation check on service ticket requests, so a stolen ticket-granting ticket (TGT) keeps working while it is valid. Microsoft's implementation narrows the window: domain controllers recheck the account once the TGT is more than 20 minutes old. Service tickets already issued are a separate problem. Microsoft's policy documentation warns that disabled users "might be able to continue accessing network services by using valid service tickets that were issued before their account was disabled", and the default domain policy gives a service ticket 600 minutes. A connection that is already open does not drop when its ticket expires either.
A simulated case: did the disable hold?
Simulated example generated by SOCSimulator Research. The domain, accounts, hosts and times are invented; the event IDs, fields and status codes are Microsoft's.
At 10:31 an alert flags the service account svc-backup authenticating from workstation WS-114 (10.20.4.17), which has never used it. At 10:41 the tier-2 analyst disables the account and resets its password. The domain controller logs:
10:33:05 DC01 4768 0x0 svc-backup Client ::ffff:10.20.4.17 TGT issued
10:41:07 DC01 4725 svc-backup Subject CORP\soc.t2 account disabled
10:41:30 DC01 4724 svc-backup Subject CORP\soc.t2 password reset
10:48:12 DC01 4769 0x0 svc-backup@CORP.EXAMPLE Service FS02$ Client ::ffff:10.20.4.17 service ticket issued
10:56:40 DC01 4769 0x12 svc-backup@CORP.EXAMPLE Service SQL01$ Client ::ffff:10.20.4.17 KDC_ERR_CLIENT_REVOKED
10:57:02 DC01 4768 0x12 svc-backup Client ::ffff:10.20.4.17 KDC_ERR_CLIENT_REVOKEDSeven minutes after the disable, the stolen TGT from 10:33, then 15 minutes old, still obtained a service ticket for file server FS02. At 10:56 the TGT was 23 minutes old, the domain controller rechecked the account and refused with 0x12, which Microsoft documents as KDC_ERR_CLIENT_REVOKED (account disabled, expired or locked out). The fresh TGT request at 10:57 failed the same way, which shows the disable now blocks new Kerberos TGT requests (event 4768). The session on FS02 is still open on a service ticket that, under the default policy, is valid until 20:48. The case is contained once WS-114 is isolated and the isolation shows as completed, and that timestamp, not 10:41, is the one to record as the time to contain.
This query runs the same check in Microsoft Sentinel for any account you disable:
// Kerberos activity for an account after it was disabled (event 4725)
let Account = "svc-backup";
let DisabledAt = toscalar(
SecurityEvent
| where EventID == 4725 and TargetUserName =~ Account
| summarize min(TimeGenerated));
SecurityEvent
| where TimeGenerated > DisabledAt
| where EventID in (4768, 4769)
| where tostring(split(TargetUserName, "@")[0]) =~ Account
| project TimeGenerated, EventID, Status, ServiceName, IpAddress, Computer
| order by TimeGenerated ascA row with Status 0x0 after the disable is a ticket the attacker still got, and 0x12 rows are the refusals you want to see. IpAddress on either points at the host to isolate next. The query is written against the documented SecurityEvent schema and assumes domain controllers audit the Kerberos Authentication Service and Kerberos Service Ticket Operations subcategories.
Containment in SOC Operations
Containment is usually the first action after you confirm a true positive, and playbooks split it by authority. Isolating one endpoint through EDR or disabling one user account is normally pre-approved for the analyst on shift. Isolating a network segment, shutting down a production server or blocking a business partner's IP range needs a manager or the system owner. Know which tier each action falls in before the incident, so you act in minutes instead of waiting on approvals. Log every action with its timestamp, who took it and the check you ran afterwards: the containment timeline goes into the post-incident report and, in regulated environments, into the evidence behind a breach notification. Then run the check. A disabled account that still receives service tickets, or an isolation stuck as pending because the laptop is offline, is not contained yet, and your case notes should say so. Hand off to eradication only once the checks come back clean, with the list of hosts, accounts and indicators you contained, because that list is where the eradication checklist starts.
Practice Containment in a Real SOC
SOCSimulator provides hands-on training with realistic SIEM, XDR, and Firewall interfaces. Build real analyst skills investigating containment scenarios with zero consequences, free.
Frequently Asked Questions
- What is the main goal of the containment phase?
- To stop the incident from getting bigger while the team works out how to remove it. NIST SP 800-61 Rev. 3 defines containment as preventing the expansion of an incident, which prevents additional damage and keeps the response from overwhelming the organization's resources. Eradication and recovery come next, so containment should also keep the evidence they will need.
- What are the 5 phases in the incident response process?
- NIST's incident handling guide never used five. SP 800-61 Rev. 2 used four: Preparation; Detection and Analysis; Containment, Eradication and Recovery; Post-Incident Activity. Rev. 3 replaced it in April 2025 and dropped numbered phases. It maps incident response onto the CSF 2.0 functions Detect, Respond and Recover, where containment is outcome RS.MI-01 under Respond.
- What is a containment process?
- The steps from decision to proof. Confirm the incident and its scope, choose actions that fit the incident type (isolate hosts, disable or reset accounts, revoke sessions, block indicators), get approval where the playbook requires it, run them, then check the logs that show each one held. Record every step with a timestamp for the post-incident report.
- What is immediate containment?
- Another name for short-term containment: actions taken within minutes of confirming an incident to stop it spreading, such as isolating a host in EDR, disabling an account or blocking an IP. They are meant to be temporary. NIST SP 800-61 Rev. 3 suggests deciding upfront how long each measure lasts, from an emergency workaround removed within hours to a permanent fix.
- Which of the following is a key task during the containment phase?
- Isolating the affected systems so the incident cannot spread. Removing malware and persistence belongs to eradication, and restoring from backup belongs to recovery. In practice the task also includes confirming the isolation applied: Microsoft Defender for Endpoint retries an isolation on an offline device for up to three days, and the host is not isolated until it reconnects.
Sources
- NIST SP 800-61 Rev. 3: Incident Response Recommendations and Considerations for Cybersecurity Risk Management (April 2025)
- NIST SP 800-61 Rev. 2: Computer Security Incident Handling Guide (withdrawn 3 April 2025)
- Microsoft [MS-KILE] 5.1.3 Account Revocation Checking
- Microsoft Learn: Maximum lifetime for service ticket
- Microsoft Learn: 4725(S) A user account was disabled
- Microsoft Learn: 4740(S) A user account was locked out
- Microsoft Learn: 4769(S, F) A Kerberos service ticket was requested
- Microsoft Learn: Take response actions on a device (Defender for Endpoint)
- Microsoft Graph: user revokeSignInSessions
- Microsoft identity platform: Access tokens (token lifetime)
- Azure Monitor Logs reference: SecurityEvent table
Related Terms
Incident response (IR) is how a security team detects, contains, removes and recovers from an incide...
Eradication is the incident response phase where all threat components are permanently removed: malw...
Incident recovery is the work of restoring the systems, data and services affected by a cybersecurit...
EDR (endpoint detection and response) is security software that puts an agent on each laptop, server...
Lateral movement is the attack phase where adversaries expand access from an initial foothold to add...
Ransomware is malware that encrypts victim data or systems and demands payment, typically cryptocurr...
More Processes Terms
Related SOC Training Resources
Data Encrypted for Impact (T1486): Detection Training
This is the ransomware payload stage: the adversary encrypts files across local and network drives and withholds the key…
Read more TechniqueService Stop (T1489): Detection Training
Service Stop is the adversary turning off services to clear the way for damage or to hinder response, frequently halting…
Read more TechniqueInhibit System Recovery (T1490): Detection Training
Inhibit System Recovery (T1490) is the move right before ransomware encrypts: the attacker destroys the backups a victim…
Read more Career PathSOC Analyst (Tier 1) Career Guide: Salary & Skills
Tier 1 SOC Analysts are the front line. You monitor alert queues, triage incoming detections, classify them as true or f…
Read more Career PathIncident Responder Career Guide: Salary & Skills
Incident Responders lead the technical response when confirmed breaches happen. You coordinate containment, run forensic…
Read more Career PathDFIR Analyst Career Guide: Salary & Skills
DFIR Analysts combine forensic investigation with incident response. You collect and analyze digital evidence from compr…
Read more ComparisonSOCSimulator vs LetsDefend: Comparison
SOCSimulator wins on operational realism. You get multi-tool shift simulation with SLA pressure, noise injection, and al…
Read more ComparisonSOCSimulator vs Security Blue Team: Comparison
SOCSimulator provides continuous operational training that keeps your skills sharp between shifts. Security Blue Team pr…
Read more ToolXDR Training Console: SOCSimulator
The XDR console in SOCSimulator replicates the investigation workflow of platforms like CrowdStrike Falcon, Microsoft De…
Read more ToolFirewall Training Console: SOCSimulator
The Firewall console in SOCSimulator replicates the log analysis experience of enterprise platforms like Palo Alto Netwo…
Read more ToolSIEM Training Console: SOCSimulator
The SIEM console in SOCSimulator replicates the workflow of enterprise platforms like Splunk Enterprise Security, Micros…
Read more TechniqueMITRE ATT&CK® Techniques: Detection Training Library
Browse all MITRE ATT&CK® techniques with detection strategies and example alerts.
Read more