Chapter 07

EDR-Based Containment

EDR containment is the fastest and most operationally clean way to isolate a compromised endpoint — but understanding exactly how it works, what it preserves, and where it fails determines whether you can rely on it during an investigation.

Scenario

A SOC analyst has confirmed a CrowdStrike alert on a host: Cobalt Strike beacon injected into svchost.exe, active C2 connection established, credential access detected. Three options sit in front of them in the Falcon console: Contain Host, Kill Process, or continue monitoring. They click "Contain Host." The host goes dark on the corporate network — the analyst can no longer ping it, RDP to it, or reach it via any network path. But the Falcon console still shows the host as "online." The analyst can still run RTR (Real Time Response) commands on it, pull files, run scripts, acquire memory. The attacker's C2 beacon, on the other hand, is blocked. The host is isolated but the investigation continues uninterrupted. This is what EDR network isolation looks like in practice — and understanding this is fundamental to using it correctly.

How EDR Network Isolation Works

EDR network isolation works by having the EDR agent apply a restrictive firewall policy on the host that blocks all network traffic except traffic to and from the EDR management server. The agent runs at kernel level with privileges above the attacker's typical user-mode or even administrator-mode presence, so the attacker cannot remove the firewall rules. The EDR management channel — which the agent uses to receive commands and send telemetry — is preserved through the isolation. Everything else is blocked.

  EDR Network Isolation: What Is and Isn't Blocked
  ══════════════════════════════════════════════════════════════════════

  BLOCKED
  ─────────────────────────────────────────────────────────────────
  • All inbound connections (except from EDR management server)
  • All outbound connections (except to EDR management server)
  • C2 beacon callbacks (attacker's C2 traffic: HTTP, HTTPS, DNS,
    custom protocol — all blocked at the network layer)
  • NTLM/Kerberos authentication over the network (lateral movement
    to/from this host is impossible)
  • SMB file shares (attacker cannot pivot via SMB from/to this host)
  • RDP, WinRM, SSH (no remote access by anyone except via EDR console)

  NOT BLOCKED — still available through EDR management channel
  ─────────────────────────────────────────────────────────────────
  • EDR Real Time Response (CrowdStrike RTR) / Live Response
    (Microsoft Defender XDR) / Remote Shell (SentinelOne)
  • Memory acquisition via EDR console
  • Artifact collection (files, registry, event logs)
  • Process management (kill/suspend via EDR console)
  • Script execution via EDR remote shell
  • Hash blocking, process blocking, file quarantine

  TECHNICAL MECHANISM
  ─────────────────────────────────────────────────────────────────
  The EDR agent uses Windows Filtering Platform (WFP) or minifilter
  driver to apply firewall rules at a layer below the Windows Firewall.
  These rules cannot be removed by processes running at user mode
  or even kernel mode unless they bypass the EDR's own self-protection.
  The EDR management server's IP range is whitelisted in these rules.
Why isolation preserves the EDR channel specifically

EDR vendors designed isolation to maintain their own management channel because IR workflows require it. If the EDR channel were blocked along with everything else, you would isolate the host and then lose the ability to investigate it — you'd have to send a person to the physical host or reimage it immediately. Maintaining the EDR channel means isolation becomes an investigative tool, not just a shutdown command. You isolate the host, blocking the attacker's access, while simultaneously retaining full remote forensic capability through the EDR console. This design choice — preserve EDR channel, block everything else — is why EDR network isolation is operationally superior to "unplug the network cable": the physical disconnect also severs your investigation capability.

Isolating While Preserving Evidence

The correct order of operations: collect volatile evidence before isolation or simultaneously with isolation — not after. The EDR management channel survives isolation, which means you can perform some collection after isolation, but the most volatile evidence (network connections at the time of detection, process state at the moment of detection) is best captured before any action is taken.

  Pre-Isolation Evidence Collection Checklist
  ══════════════════════════════════════════════════════════════════════

  CAPTURE BEFORE ISOLATION (seconds to minutes):
  ─────────────────────────────────────────────────────────────────
  EDR process tree snapshot — what processes are running and with
  what parent relationships
  Active network connections — which PIDs have C2 connections,
  what are the remote IPs and ports
  Current user sessions — who is logged in (may be attacker using
  stolen credentials)
  Hash of suspicious processes (EDR provides automatically)

  CAPTURE SIMULTANEOUSLY OR IMMEDIATELY AFTER ISOLATION:
  ─────────────────────────────────────────────────────────────────
  Memory acquisition — the EDR management channel survives isolation;
  trigger WinPmem or EDR memory acquisition immediately after isolation
  Full process list with command lines (EDR console query)
  Loaded modules per suspicious process
  Open file handles (process may have files open for exfiltration)

  CAPTURE VIA EDR CONSOLE AFTER ISOLATION (minutes to hours):
  ─────────────────────────────────────────────────────────────────
  Full triage collection (event logs, registry, prefetch, Amcache)
  Suspicious file retrieval (malware samples, staged data files)
  Timeline reconstruction (file creation, modification, access times)
  Persistence mechanism locations (run keys, scheduled tasks, services)

CrowdStrike Falcon Isolation Workflow

CrowdStrike Falcon Network Containment is the most widely deployed EDR isolation capability in enterprise environments. Understanding the specific workflow — what it does, what you can do after, and what the attacker sees — is operationally important.

StepActionWhat happens
1Contain Host in Falcon consoleFalcon agent applies WFP rules blocking all traffic except to Falcon backend (TCP 443 to specific CrowdStrike IP ranges). Takes effect within seconds — does not require reboot.
2Verify containmentConsole shows "Contained" status. Agent still reports as online. Attempt to ping the host from another machine — should fail. Attempt to ping from RTR — the RTR shell on the contained host can reach CrowdStrike but cannot reach other hosts.
3Open RTR sessionReal Time Response shell opens on the contained host. Full command execution capability remains. Standard RTR commands available: file operations, process management, registry queries, script execution, memory acquisition.
4Evidence collection via RTRRun RTR memory acquisition script, pull event logs via RTR, retrieve suspicious files for analysis. All data transits through the Falcon management channel.
5Threat actor observesFrom the attacker's perspective: their beacon stops getting callbacks (TCP/DNS blocked). They have no indication of WHY — could be network interruption, not necessarily detection. If using Domain Fronting or CDN-based C2, the block is at the network layer regardless.
6Lift containment (when appropriate)Done after eradication is confirmed. Containment can be lifted remotely from the console — no physical access required.

Microsoft Defender XDR and SentinelOne Isolation

The isolation mechanisms across the major EDR platforms work similarly but have different names, interfaces, and some operational differences.

PlatformIsolation feature nameKey notes
Microsoft Defender XDR Isolate Device (in Defender portal) Two isolation modes: Full Isolation (blocks all network) and Selective Isolation (blocks non-Defender traffic but allows some configurable paths). Live Response session survives isolation. Isolation can be scripted via Defender API for mass containment. Defender also allows "Restrict code execution" without full network isolation — blocks non-Microsoft-signed executables from running.
SentinelOne Network Quarantine Full network isolation except to SentinelOne management. Remote Shell survives quarantine. SentinelOne also supports "Disconnect from Network" (OS-level, not EDR agent level) and "Shut Down" directly from console — useful for very high risk scenarios. Memory acquisition available via Remote Script execution during quarantine.
CrowdStrike Falcon Network Containment Industry reference implementation. RTR survives containment. Containment can be applied via API to enable automated playbooks (SOAR integration: "if alert confidence = high, auto-contain and page analyst").

Priority Order for Containment Decisions

When multiple hosts are compromised simultaneously and you cannot isolate all of them at once (resource constraints, operational risk), the prioritization logic matters. The wrong priority order allows an attacker to continue high-value operations while you spend time containing lower-priority hosts.

  Containment Priority Order
  ══════════════════════════════════════════════════════════════════════

  HIGHEST PRIORITY — contain first
  ─────────────────────────────────────────────────────────────────
  1. Hosts with active data exfiltration detected (outbound data to
     external C2 carrying file/data transfers)
  2. Domain controllers with confirmed attacker access (contain or
     reset DA credentials immediately — DC compromise is a force
     multiplier for the attacker)
  3. Credential stores: AD CS servers, PAM vaults, password managers
     — attacker with access here can pivot everywhere
  4. Data repositories: file servers, SharePoint, database servers
     holding sensitive data the attacker may be staged to exfiltrate

  MEDIUM PRIORITY
  ─────────────────────────────────────────────────────────────────
  5. Workstations belonging to privileged users (DA admins, system
     administrators) — these are credential harvest targets
  6. Servers with confirmed attacker presence that are not DCs or
     data repositories

  LOWER PRIORITY
  ─────────────────────────────────────────────────────────────────
  7. Standard user workstations with confirmed compromise but no
     evidence of lateral movement source
  8. Hosts with suspected but not confirmed compromise

  RATIONALE
  ─────────────────────────────────────────────────────────────────
  Priority is based on: (1) what damage the attacker can do from
  that host right now (exfiltration, credential harvest, DC access),
  (2) what the attacker can reach from that host (lateral movement
  potential), and (3) how much the host enables the attacker's ability
  to maintain access elsewhere.

What Survives EDR Isolation

Understanding what an attacker can still do after a host is EDR-isolated is important for accurately assessing the risk reduction achieved by isolation — and for ensuring you do not falsely believe that isolation has fully eliminated the threat.

Attacker capabilitySurvives isolation?Why / why not
C2 beacon calloutsNoAll outbound connections blocked by EDR WFP rules
Lateral movement from this host to othersNoNetwork connectivity to other hosts is blocked
Persistence mechanisms already installed (run keys, scheduled tasks)Yes — on this hostIsolation affects network, not local execution. Scheduled tasks continue to run on the isolated host.
Local process execution (malware already running in memory)Yes — locallyThe EDR may kill or block processes, but isolation itself does not stop processes. Running malware continues to run. It just can't communicate out.
Credential material already harvested (cached in attacker's system)Yes — they already have itIsolation of the host where credentials were harvested does not invalidate those credentials; credential rotation is needed separately
Attacker's presence on other hostsYesIsolation is host-specific; does not affect other compromised hosts
Mental model: isolation is a network action, not a threat elimination action

EDR isolation cuts the attacker's network access to and from one specific host. It does not remove malware, terminate malicious processes, delete attacker tools, or close attacker sessions on other hosts. It is a containment action that stops a specific category of attacker activity — network-based communication and lateral movement from that host. After isolation, the attacker may still have persistence on the host that will reactivate when isolation is lifted. They may still have credentials harvested from that host that allow access elsewhere. They may still have active sessions on other hosts. Isolation is the beginning of containment on a specific host, not the end of the incident. The next step after isolation is investigation — understanding what the attacker did while they had access, not assuming the threat is over.

EDR Blind Spots During Isolation

EDR isolation is powerful, but it has limitations that an IR team must account for when planning containment and investigation.

Blind spotOperational implication
Hosts without EDR installed ("shadow IT," legacy systems, some OT/IoT devices)Cannot be isolated via EDR console. Require network-level isolation (firewall ACL on switch port or router). May have no forensic telemetry available.
EDR agent tampered with or disabled by attacker before isolation actionAttacker may have disabled EDR agent (some rootkits can do this). The host shows as offline in EDR console — difficult to distinguish from legitimate offline host. Verify via network (try to ping) and physical access if needed.
Isolation racing with attacker activityBetween the decision to isolate and the isolation taking effect (typically <10 seconds but potentially longer), the attacker may have completed a data transfer or executed a final action. The isolation is fast but not instantaneous.
Hosts in cloud or VDI environments where "isolation" semantics differCloud VM isolation (NSG modification) works differently from EDR isolation. The EDR management channel may or may not survive depending on routing. Test cloud isolation procedures in advance.

Q & A

If EDR is not deployed on a host, how do you isolate it remotely?

Without an EDR agent, isolation requires network-level action: modify the firewall rule or VLAN assignment for the host's switch port to deny all traffic (or move it to an isolated "quarantine" VLAN). This requires access to the network infrastructure — managed switch, VLAN configuration, or perimeter firewall. In a well-architected network, each port's VLAN can be reassigned from the network management console in seconds. In poorly-architected flat networks, this may require broad segmentation that takes down more than just the target host. For AWS, modify the EC2 instance's security group to deny all inbound/outbound. For Azure, modify the VM's NSG. The limitation of network-level isolation without EDR: you lose the investigation channel — you can no longer remotely execute commands or collect artifacts from the host. It requires physical access or a jump host in the same segment for investigation.

Should you use "kill process" or "contain host" when responding to an active alert?

Contain host unless you have a specific reason not to. Killing the malicious process without containing the host leaves the attacker's other footholds active (persistence mechanisms, other running processes they control) and allows them continued network access for C2 and lateral movement. Containing the host blocks all of that simultaneously. The scenarios where "kill process" without containment might be appropriate: when the host is a critical server where network isolation would cause significant operational disruption, and the specific process is the only confirmed attacker presence. In that case, you're making a calculated risk tradeoff. But for most endpoints during an active incident, contain first — you can investigate and release containment later if it turns out to be a false positive, but you cannot undo the fact that the attacker was able to continue operating for hours while you debated process killing vs isolation.

How do you contain a host that is actively spreading ransomware to protect other systems?

For active ransomware spread, containment must be fast and should be network-level. If EDR is deployed and the agent is functional: contain the spreading host immediately. If multiple hosts are spreading simultaneously (ransomware deployed as a GPO or domain-wide action): apply network segmentation at the firewall/switch level to block east-west traffic in the affected segment, not just individual host isolation — because containment is racing against encryption and individual host isolation may be too slow if dozens of hosts are spreading simultaneously. The prioritization: isolate the host (or segment) with the highest number of active SMB/network connections, as it is the most active spreader. Then triage which hosts have been encrypted already (lost) vs. those that are clean and can be protected. Be aware that ransomware actors often pre-stage the ransomware binary on many hosts and detonate simultaneously — in that case, segment isolation is more effective than host-by-host isolation because all hosts detonate at the same moment.

What evidence can you no longer collect once a host is isolated?

The primary evidence you lose after isolation is network state: the active network connections that existed at the moment of isolation are terminated when the firewall rules apply. If you did not capture the active connection list (PIDs, remote IPs, ports, connection states) before isolation, you lose that snapshot. Everything else — memory, processes, files, registry, event logs — is still accessible via the EDR management channel. This is why the pre-isolation checklist emphasizes capturing active network connections specifically, as opposed to other artifact types that remain available post-isolation. In practice, this should take less than 30 seconds: trigger an EDR query for current network connections, note the attacker's C2 IP and port, then contain. The C2 IP captured in that 30-second window may be the highest-value IOC from the entire investigation.

How do you isolate 100 hosts simultaneously during a mass containment operation?

Mass containment at scale requires automation. Manual EDR console actions on 100 individual hosts one by one is operationally impossible during an active incident. The mechanisms: (1) EDR API-based scripted containment — all major EDR platforms expose an API that allows containment actions to be scripted. A Python script that reads a list of hostnames and calls the EDR containment API for each is a legitimate mass-containment tool. CrowdStrike's API, Defender's API, and SentinelOne's API all support this. (2) SOAR playbook triggered containment — if your SOAR platform is integrated with your EDR, a playbook can contain a list of hosts in parallel. (3) Network-level mass containment — modify firewall rules to block entire subnets; faster than host-by-host EDR isolation but higher blast radius. (4) Velociraptor bulk action — Velociraptor can execute actions on host groups. For mass incidents, coordinate the timing: all hosts should be isolated within a few-second window to minimize the attacker's ability to react to the first isolation before the others are complete.