PPIVTR-D

R. Response (contain)

The model with the Contain segment of the loop highlighted.
Figure 74
STARTS WHENScope clear enough to act, posture chosen, authority in hand.
DONE WHENNetwork, process, and log channels all show attacker activity stopped.

Containment stops the attacker and preserves the evidence.

Cut the specific paths the attacker is using. Pulling the host stopped being a general strategy once estates went distributed. A compromised web server isolated from internal systems while it keeps serving the internet is contained, and the site is still up.

Four stacked panels: Network with VLAN isolation, firewall rules and DNS sinkholes; Host with EDR isolation, local firewall and process restrictions; Application with WAF, app controls and revoking automations; Identity with credential revocation, session termination and conditional access.
Figure 77. Containment layers.
LayerUse it for
NetworkBroad, fast control over many systems at once
HostPrecision on a known-compromised endpoint
ApplicationAttacker tooling that network controls do not see
IdentitySaaS and cloud paths, where it is frequently the only layer that reaches
DNS sinkhole flow: a host asks DNS to resolve a malicious domain, DNS matches it against a deny list and answers with an internal address, and the host connects to a quarantine server instead of the attacker.
Figure 79. DNS sinkholing redirects command and control traffic to a controlled destination.

The best-known sinkhole in the field

Reporting by WIRED, TechCrunch and the Associated Press; sinkhole data published by Kryptos Logic

WannaCry, 12 May 2017. The worm was spreading across Europe and the NHS was turning patients away. Marcus Hutchins, working for Kryptos Logic from England, found an unregistered domain inside a WannaCry sample and bought it on Namecheap for $10.69, intending to sinkhole the traffic and count infected hosts. The malware checked whether that domain resolved before encrypting anything and halted when it did. Another researcher reverse-engineered the check and confirmed the behavior. Spread of that variant stopped the same afternoon.

The technique was ordinary DNS sinkholing, the same mechanism in Figure 79, applied at internet scale by accident. Hutchins told the Associated Press at the time that he was not a hero and was just doing his part to stop botnets.

It eradicated nothing. Variants with different killswitch domains appeared within days, unpatched hosts were still reaching the sinkhole years later, and Boeing, Honda, Connecticut state agencies and Victoria state police all reported infections during 2018. A sinkhole buys time to patch. The patching still has to happen.

Identity containment

#Item
1Passwords reset at the primary identity provider, privileged accounts first
2Service account credentials, API keys, and programmatic tokens rotated
3Resets coordinated for accounts synced between on-premises and cloud directories
4Active sessions and authentication tokens revoked at the identity provider
5VPN, RDP, and SSH sessions force disconnected
6Session token version incremented to invalidate browser sessions, where supported
7OAuth refresh tokens and offline access tokens invalidated; stateless JWTs deny-listed where applicable
8Authentication logs watched for token endpoint requests indicating cached credential use
9Conditional access applied: location, device compliance, risk-based blocking, phishing-resistant MFA
10Account disabled at the identity provider to cut every SSO-connected application at once
11Applications using local accounts rather than the identity provider identified and revoked separately
12OAuth-connected applications authorized by the compromised account revoked
13Automation rules, webhooks, CI/CD deployment keys, and broad-permission browser extensions disabled

Evidence, in this order

#Item
14Memory first, using WinPMEM or Linpmem
15Selective forensic images of systems holding unique evidence, such as patient zero and hosts running custom tooling
16Logs forwarded off the host immediately so they cannot be deleted

Validate before calling it contained

#Item
17Network: firewall, proxy, and DNS show no C2 resuming, no new connection patterns, no protocol tunneling
18Process: no respawned malware, no new persistence, no executables in unusual paths
19Logs: no failed authentication bursts, no privilege escalation, no unusual file access
Watch out
  • Human-operated ransomware groups have accelerated encryption after detecting defensive action, and watchdog processes respawn malware or trigger destructive payloads. Move quietly until the adversary is understood.
  • Sequential isolation signals the response and gives the adversary time to escalate. Execute simultaneously across the network, endpoint, identity, and application teams.
  • Write the rollback procedure before changing firewall rules or network topology. It will be requested at the worst possible time.