6.2 Incident Containment, Eradication, & System Recovery

Key Takeaways

  • Containment prevents incident expansion through physical disconnection, EDR network isolation, dynamic VLAN air-gapping, or BGP sinkholing.
  • Account containment mandates disabling compromised credentials, resetting Active Directory krbtgt keys twice, and revoking OAuth tokens.
  • Eradication requires destroying malware persistence mechanisms, including scheduled tasks, registry Run keys, WMI event consumers, and rootkits.
  • System rebuild from verified, CIS-hardened golden master images is significantly safer than attempting to clean an infected operating system.
  • Phased system recovery requires vulnerability scanning, credential rotation, and enhanced 30-to-90-day post-recovery EDR surveillance before full operational re-entry.
Last updated: August 2026

Containment, Eradication, & System Recovery Strategies

Quick Summary: Phase 3 of the NIST SP 800-61 Rev. 2 lifecycle represents the core operational response to an active cyber intrusion. Containment halts the lateral movement of adversaries and malware, eradication completely eliminates malicious artifacts and vulnerabilities from the environment, and system recovery restores verified clean operational assets into production. Choosing appropriate technical containment controls and deciding whether to clean or rebuild compromised systems are critical strategic decisions that govern organizational recovery.


1. Tactical Incident Containment Strategies

Containment must be executed swiftly upon incident confirmation to prevent adversaries from expanding their breach footprint, exfiltrating data, or deploying destructive payloads like ransomware across enterprise networks. Incident response teams employ both short-term (immediate emergency isolation) and long-term (sustained operational containment) tactics.

A. Physical vs. Logical Network Isolation Techniques

When a workstation or server is confirmed to be infected, incident responders must choose an isolation strategy based on operational criticality, network architecture, and forensic requirements:

  1. Direct Physical Isolation:

    • Mechanics: Unplugging physical Ethernet cables (RJ-45) and disabling wireless (Wi-Fi/Bluetooth) interface hardware.
    • Advantages: Immediate, foolproof containment guaranteed to sever all network communication.
    • Disadvantages: Requires physical access to the device. Abruptly disconnecting critical infrastructure may disrupt active forensic memory acquisition or trigger adversary anti-forensic wiper scripts.
  2. EDR Network Isolation (Agent-Level Isolation):

    • Mechanics: Utilizing Endpoint Detection and Response (EDR) software (e.g., CrowdStrike, SentinelOne, Microsoft Defender for Endpoint) to issue a remote network isolation command.
    • Technical Operation: The EDR agent mutates host kernel firewall rules, dropping all inbound and outbound network traffic except the secure TLS management channel between the EDR agent and the cloud security console.
    • Advantages: Allows forensic analysts to remotely perform memory dumps, query running processes, and pull forensic artifacts without allowing the endpoint to communicate with local network neighbors or external Command and Control (C2) servers.
  3. Dynamic VLAN Air-Gapping & 802.1X Quarantine:

    • Mechanics: Leveraging Network Access Control (NAC) solutions (e.g., Cisco ISE) or managed switch configurations to dynamically modify the switch port assignment, moving the compromised endpoint into an isolated Quarantine VLAN.
    • Technical Operation: The Quarantine VLAN enforces strict Access Control Lists (ACLs), prohibiting communication with internal subnets while routing traffic to an isolated forensic analysis gateway.
  4. DNS BGP Null-Routing & Sinkholing:

    • Mechanics: Used primarily when multiple internal hosts are communicating with malicious C2 domains or IP addresses.
    • Sinkholing Operation: Network administrators alter internal DNS server configurations to resolve known malicious C2 domain names to an internal analyst-controlled IP address (the sinkhole) rather than the external malicious server.
    • BGP Null-Routing (Blackholing): Edge routers are configured to drop all traffic destined for malicious IP addresses at the network perimeter.
+-----------------------------------------------------------------------+
|                      NETWORK ISOLATION MECHANICS                      |
+-----------------------------------------------------------------------+
| Physical Unplug     | Disconnects all physical interfaces completely. |
+---------------------+-------------------------------------------------+
| EDR Isolation       | Drops all traffic EXCEPT secure IR console channel.|
+---------------------+-------------------------------------------------+
| Quarantine VLAN     | Port reassigned to isolated subnet via 802.1X.  |
+---------------------+-------------------------------------------------+
| BGP Sinkholing      | Malicious C2 DNS queries routed to analyst trap. |
+-----------------------------------------------------------------------+

B. Account & Identity Isolation Protocols

Adversaries rarely rely solely on network paths; they utilize stolen credentials to move laterally via legitimate administrative protocols (RDP, WinRM, SSH). Identity containment requires immediate execution of the following steps:

  • Disabling Compromised Accounts: Immediately disabling compromised Active Directory (AD) or Entra ID user accounts, blocking interactive logons.
  • Kerberos TGT Ticket Invalidation (krbtgt Reset): Resetting the Active Directory krbtgt account password. Critical Requirement: The krbtgt password must be reset twice consecutively (allowing time for AD replication between resets) to invalidate all existing Golden Tickets and Kerberos Ticket Granting Tickets (TGTs) generated by adversaries.
  • Session & OAuth Token Revocation: Terminating active web sessions, revoking OAuth 2.0 refresh tokens, and resetting Multi-Factor Authentication (MFA) registration bindings for compromised user identities.

C. Virtual Machine Containment

In virtualized environments (VMware vSphere, Microsoft Hyper-V, AWS EC2), containment offers unique forensic advantages. Responders can issue a Hypervisor Snapshot or Suspend VM State command. Suspending the VM preserves volatile RAM state directly to virtual disk files (.vmem / .sav), allowing offline memory extraction while totally isolating the guest OS from virtual networks.


2. Eradication Procedures & Deep Cleaning Protocols

Once an incident is contained and forensic evidence is secured, eradication begins. Eradication focuses on removing all malware components, destroying persistence mechanisms, and mitigating the underlying vulnerabilities exploited by the attacker.

A. Malware & Persistence Mechanism Removal

Adversaries install complex persistence mechanisms to ensure their access survives system reboots. Eradication requires systematically destroying all persistence vectors:

  1. Process Termination: Killing malicious processes and sub-processes in memory using tools like Task Manager, Process Explorer, or command line utilities (taskkill /PID <id> /F or kill -9 <pid>).
  2. Scheduled Tasks Deletion: Inspecting and deleting rogue scheduled tasks created via schtasks or Task Scheduler:
    schtasks /query /fo LIST /v | findstr /I "TaskName RunAsUser"
    schtasks /delete /tn "MaliciousTaskName" /f
    
  3. Windows Registry Run Keys: Deleting malicious entries embedded in auto-start registry locations:
    • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
    • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
    • HKCU\Software\Microsoft\Windows\CurrentVersion\Run
    • User Startup Folders (%AppData%\Microsoft\Windows\Start Menu\Programs\Startup)
  4. WMI Event Consumer Eradication: Advanced threat actors utilize Windows Management Instrumentation (WMI) Event Filters and Consumers to execute fileless payloads upon system startup. Analysts must inspect and purge rogue WMI bindings using PowerShell:
    Get-CimInstance -Namespace root\subscription -ClassName __EventFilter | Remove-CimInstance
    Get-CimInstance -Namespace root\subscription -ClassName __CommandLineEventConsumer | Remove-CimInstance
    
  5. Service Installation Cleanup: Identifying and removing rogue Windows services installed by lateral movement tools (such as Cobalt Strike Beacons or PsExec):
    sc query state= all
    sc delete "RogueServiceName"
    

B. Advanced Rootkit Cleaning & Bootkit Mitigation

Rootkits represent a specialized class of malware designed to hide execution presence by subverting operating system APIs or kernel operations:

  • User-Mode Rootkits (Ring 3): Intercept and alter API calls using DLL injection or IAT (Import Address Table) hooking. Cleanable via specialized anti-rootkit scanners or manual DLL unhooking.
  • Kernel-Mode Rootkits (Ring 0): Modify kernel data structures (such as System Service Dispatch Tables - SSDT or Direct Kernel Object Manipulation - DKOM) to hide processes, network ports, and files from the OS kernel.
  • Bootkits (MBR / VBR / UEFI): Infect the Master Boot Record (MBR), Volume Boot Record (VBR), or system UEFI firmware, executing before the operating system kernel loads.

Rootkit Remediation Rule:

Kernel-mode rootkits and UEFI bootkits subvert the integrity of the operating system itself. Attempting to "clean" a kernel rootkit from a running OS is fundamentally unreliable. Kernel rootkit or bootkit infections mandate a complete bare-metal storage wipe and system rebuild.


3. System Rebuild vs. Restore Decisions

When recovering from an enterprise security breach, incident commanders must decide between three restoration strategies: System Cleaning, Restore from Backup, or Complete Rebuild from Golden Master Images.

Evaluation CriteriaStrategy 1: Endpoint CleaningStrategy 2: Restore from BackupStrategy 3: Golden Master Rebuild
Operational MechanicsDelete malware files and registry keys on running OS.Restore virtual machine/disk state from pre-incident backup.Re-partition drive, reinstall OS from clean media, redeploy apps via Ansible/SCCM.
Residual RiskEXTREMELY HIGH. High probability of hidden backdoors or secondary payloads remaining.MODERATE. Risk that backup contains undetected dormant malware (dwell time risk).LOWEST. Guarantees completely clean operating system foundation.
Recovery SpeedFast (minutes to hours).Fast to Moderate (depending on backup size & network bandwidth).Moderate to Slow (requires configuration management & data sync).
Recommended Use CaseIsolated low-severity adware or simple virus infections.Server environments with large databases where clean restore points predating breach dwell time are verified.Mandatory for APT intrusions, ransomware outbreaks, rootkits, and domain controller compromises.

The Golden Master Rebuild Protocol

For major incidents, Rebuild from Golden Master Images is the industry gold standard. A Golden Master Image is a pre-configured, hardened operating system baseline maintained by IT architecture teams (hardened according to CIS Benchmarks or DISA STIGs). The rebuild process follows four strict steps:

  1. Cryptographic Drive Sanitization: Performing a secure disk wipe (NIST SP 800-88 compliant drive erasure).
  2. Image Deployment: Deploying the trusted CIS-hardened Golden Master OS image.
  3. Automated Configuration Management: Applying infrastructure-as-code scripts (Ansible, Puppet, Chef, Microsoft Intune) to install approved software packages.
  4. Data Synchronization: Selectively restoring non-executable user data files (e.g., CSV, PDF, XLSX) from clean backups after running aggressive anti-malware scans against the data.

4. Pre-Entry Patch Verification & Hardening

Rebuilding a host using an older Golden Master image may reintroduce legacy software vulnerabilities that allowed the initial breach. Before reconnecting any recovered host to the network, the following hardening steps are mandatory:

  1. Emergency Vulnerability Scanning: Executing an isolated vulnerability scan (using tools like Nessus or Qualys) while the rebuilt host is attached only to a sandbox network, verifying that all critical CVE vulnerabilities are fully patched.
  2. Zero-Trust Baseline Policy Enforcement: Disabling legacy protocols (SMBv1, NBT-NS, LLMNR, NTLMv1), enforcing SMB Signing, and enabling Local Administrator Password Solution (LAPS) to ensure unique local admin passwords across all endpoints.
  3. Cryptographic Key & Credential Rotation: Rotating all service account passwords, SSH public/private key pairs, SSL/TLS certificates, API access tokens, and database Connection Strings prior to production activation.

5. Phased Recovery & Post-Recovery Monitoring

Bringing an entire enterprise network back online simultaneously following a ransomware or APT incident carries extreme operational risk. If an undetected backdoor remains, the adversary can instantly re-encrypt the network. Incident teams must execute a Phased System Recovery.

The 4-Phase System Re-Entry Pipeline

  1. Phase 1: Core Infrastructure Staging: Powering on core network infrastructure (switches, firewalls, DNS, DHCP, Active Directory controllers) in isolation to establish network control.
  2. Phase 2: Read-Only Service Restoration: Restoring critical business databases and application servers in a read-only state to allow business operations to view data without risk of write-based corruption.
  3. Phase 3: Restricted Production Staging: Reconnecting business-critical operational subnets in small, controlled batches (e.g., restoring one branch office or department per day).
  4. Phase 4: Full Operational Status: Restoring complete external network access and routine business workflows.
+-----------------------------------------------------------------------+
|                   PHASED SYSTEM RE-ENTRY PIPELINE                     |
+-----------------------------------------------------------------------+
| Stage 1: Core Infra  --> Switches, DNS, AD Domain Controllers         |
| Stage 2: Read-Only   --> Database & App servers in Read-Only mode    |
| Stage 3: Restricted  --> Phased subnet reconnection by department    |
| Stage 4: Full Ops    --> Complete production & external routing       |
+-----------------------------------------------------------------------+

Post-Recovery Surveillance Window (30 to 90 Days)

Following restoration, recovered subnets enter an intensive Post-Recovery Surveillance Window lasting 30 to 90 days. During this window:

  • EDR telemetry polling frequency is set to maximum aggressiveness.
  • Custom SIEM alerts continuously monitor for any recurrence of initial IoCs (IP addresses, domain hashes, user accounts).
  • Full packet capture (PCAP) appliances record network traffic at perimeter gateways to detect dormant C2 beaconing attempts.
Loading diagram...
Incident Containment, Eradication, & Recovery Pipeline
Test Your Knowledge

An incident responder uses EDR software to isolate an infected workstation. What network communications remain active on the target endpoint during EDR network isolation?

A
B
C
D
Test Your Knowledge

During an Active Directory domain compromise investigation, why is it mandatory for system administrators to reset the AD krbtgt account password TWICE consecutively?

A
B
C
D
Test Your Knowledge

An enterprise network suffers a sophisticated APT breach involving a kernel-mode rootkit and UEFI bootkit installation. Which recovery strategy provides the highest assurance of complete threat elimination?

A
B
C
D
Test Your Knowledge

What is the initial phase in a 4-phase system re-entry pipeline during network recovery?

A
B
C
D