Join our Newsletter — 33% off our NHI Course
Home› Guides› Malware Outbreak Playbook: Containing Spreading Malware Across the…
Template Incident Response & Forensics

Malware Outbreak Playbook: Containing Spreading Malware Across the Estate

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 26 October 2026 13 min read
On this page

A malware outbreak becomes an estate-wide incident when the response is slower than the spread, and the spread usually rides on credentials the malware has already harvested. This template gives [Organisation] a ready-to-adopt playbook for malware that is moving between endpoints and servers: worms, loaders dropping follow-on payloads, credential stealers and pre-ransomware tooling pushed over admin shares or remote management. It is written for security operations, endpoint, infrastructure and identity teams and the managers who approve disruptive containment. Encryption by ransomware has its own template, the Ransomware Playbook Template; use this one when you see spread before (or without) encryption, and hand over if encryption starts. Replace every [bracketed] placeholder and exercise it before you need it.

How to use this template

  • Adopt, then tailor: copy sections 1 to 8 into your incident response plan alongside the Incident Response Plan Template, and fill in named owners, tools and network isolation methods.
  • Decide isolation authority in advance: the single biggest delay in outbreaks is waiting for permission to isolate hosts or segments. Section 2 pre-authorises it.
  • Assume credentials are in scope: most spreading malware moves with valid accounts (T1078) taken from memory or files. Section 5 treats credential and non-human identity (NHI) resets as part of eradication, not an afterthought.
  • Use out-of-band channels: CISA's #StopRansomware Guide advises coordinating containment by phone or other out-of-band means so attackers do not learn they have been detected.
  • Review annually and after every outbreak, EDR platform change or major network redesign. Owner: [Head of Security Operations].

1. Scope and triggers

1.1 This playbook applies to malicious code observed on more than one [Organisation] system, or on one system with evidence of propagation attempts, across Windows, Linux, macOS, virtualisation hosts and cloud workloads. Single-host detections already remediated by EDR stay with the [SOC runbook].

1.2 Propagation methods in scope.

Spread methodATT&CKTypical signalFirst containment lever
Exploiting a network service (for example SMB or RDP flaws)T1210 Exploitation of Remote ServicesSame exploit alert on many hosts within minutes; scanning on 445 or 3389Block the port between segments; patch or disable the service
Copying tools over admin sharesT1021.002 SMB/Windows Admin Shares; T1570 Lateral Tool TransferWrites to ADMIN$ or C$ followed by service creation (Event ID 7045)Disable the account used; block workstation-to-workstation SMB
Remote execution via WMI or scheduled tasksT1047 Windows Management Instrumentation; T1053.005 Scheduled TaskWmiPrvSE.exe spawning shells; Event ID 4698 task creation on many hostsDisable the account; restrict remote WMI and task scheduling to admin tiers
Credential theft and reuseT1003.001 LSASS Memory; T1078 Valid AccountsLSASS access alerts, logons by one account to many hosts (Event ID 4624 type 3)Reset and restrict the account; isolate the source host
Shared content and removable mediaT1080 Taint Shared Content; T1091 Replication Through Removable MediaNew executables or shortcut files on file shares; USB-originated executionMake the share read-only; block removable media execution
Software deployment and management toolsT1072 Software Deployment ToolsUnexpected packages or scripts pushed from EDR, RMM or endpoint management consolesLock the console, revoke its admin sessions and API tokens

1.3 Triggers: the same malware family or hash detected on [3] or more hosts within [60] minutes; any detection on a domain controller, hypervisor, backup server or management console; EDR tamper alerts or agents going silent in a cluster (T1685 Disable or Modify Tools); a threat intelligence or vendor notice that a worm is exploiting a service you expose; or a supplier reporting malware that has touched shared systems.

2. Roles and contacts

RoleNamed ownerResponsibilities
Incident Lead[Security Operations Manager]Declares the incident, sets severity, owns the decision log
Endpoint Lead[EDR or Endpoint Engineering Lead]Host isolation, blocking hashes and behaviours, sweeps, agent health
Network Lead[Network Operations Lead]Segment isolation, ACLs, firewall and DNS blocks
Identity Lead[Directory or IAM Lead]Account disablement, credential and NHI resets, Kerberos and cloud identity actions
Forensics Lead[DFIR Lead or retained provider]Evidence capture, malware analysis, scope and root cause
Business Owner[Chief Operating Officer or delegate]Approves shutdown of business services and recovery priorities
Communications and Legal[Head of Communications], [General Counsel]Staff and customer messages, regulators, insurer, law enforcement

2.1 Pre-authorisation. The Incident Lead may isolate any host, and the Network Lead any network segment except [list of safety or revenue-critical segments], without further approval while a trigger in 1.3 is active. Isolation of the excluded segments needs the Business Owner, reachable within [15] minutes.

2.2 Record the 24/7 contacts for the EDR vendor, the incident response retainer, the cyber insurer and the national reporting point. Keep an offline copy and an out-of-band conference bridge. See the Incident Response Retainer Buyer's Guide.

3. Detection and triage

  1. Confirm and name it: pull the detection, hash, file path, parent process and command line. Check the hash and family against EDR intelligence and internal history. Avoid public sandboxes for samples that may hold [Organisation] data.
  2. Find patient zero and the vector: earliest detection time, first host, and how it arrived (email, download, exploited service, supplier tool, removable media).
  3. Map the spread: query EDR and the SIEM for the hash, file name, mutex, network indicators and the accounts seen on infected hosts. Look for service installs (Event ID 7045), scheduled tasks (4698), new local accounts (4720) and logons from infected hosts to others.
  4. Check the crown jewels: domain controllers, identity providers, hypervisors, backup servers, EDR and RMM consoles, CI/CD runners. Any hit here raises severity to Critical.
  5. Classify the payload (see the Malware Guide): worm, loader, stealer, remote access tool or wiper. A stealer means credential resets widen; a wiper or encryptor means handover to the Ransomware Playbook Template or the Wiper Malware Guide.

Decision point A: if spread is faster than the team can isolate individual hosts (for example new infections every few minutes), isolate the affected segment or VLAN at the switch or firewall rather than host by host.

Evidence to preserve: memory and disk images from patient zero and [2] or [3] representative hosts, before reimaging; the malware sample in a password-protected archive; EDR telemetry and timelines exported beyond normal retention; Windows Security, System, PowerShell Operational (4104) and Sysmon logs; firewall, proxy and DNS logs; and authentication logs from the directory and identity provider. Follow the Evidence Handling and Chain of Custody Guide and the Memory Forensics Guide.

4. Containment

  1. Isolate infected hosts with EDR network containment, which keeps the agent connected for investigation. Where EDR is missing or tampered with, disconnect at the switch port or disable Wi-Fi. Power off only when you cannot disconnect, because it destroys volatile memory evidence (CISA #StopRansomware Guide).
  2. Block the payload estate-wide: add hashes, certificates and behaviour rules to EDR in block mode, and push application control rules where you have them.
  3. Break the spread path: block workstation-to-workstation SMB (445), RDP (3389), WinRM (5985/5986) and RPC where not needed; block command-and-control domains and IPs at DNS and the proxy.
  4. Disable the accounts the malware is using, human and non-human, rather than only resetting them; a reset while the host is still infected may be captured again.
  5. Protect the recovery path: disconnect or lock backup systems and confirm immutable copies are intact. See the Backup Security and Immutable Backup Guide.
  6. Lock management planes (EDR, RMM, endpoint management, hypervisor consoles) to a named break-glass group with phishing-resistant MFA, and revoke their API tokens if any misuse is suspected.

Decision point B: isolating a business service versus keeping it running with heightened monitoring. The Business Owner decides on the Incident Lead's advice; the decision and its review time go in the log.

Decision point C: an exploited, unpatched internet-facing service goes offline or behind a block rule until patched.

5. Eradication

5.1 Remove the malware and its persistence. Use EDR remediation for well understood commodity malware on standard endpoints. Reimage from a known-good build any server, any host with signs of hands-on-keyboard activity, and any host where the persistence is not fully understood. CISA advises looking for both outside-in persistence (rogue accounts, remote access) and inside-out persistence (implants, admin tools such as PsExec).

5.2 Persistence checklist: services (T1543.003 Windows Service), scheduled tasks, Run keys, WMI subscriptions, new local or domain accounts, added SSH keys, cron entries, browser extensions, and RMM agents that were not deployed by IT.

5.3 Close the vector: patch the exploited service, remove the malicious email or package, and fix the control gap (macro policy, application control, EDR coverage).

5.4 Credential and NHI resets. Run these after the hosts are clean or isolated, in this order:

Credential typeWhen to resetAction
Accounts logged on to infected hostsAlwaysReset passwords, revoke sessions and refresh tokens, re-register MFA if a stealer was present
Local administrator accountsAlways for affected machinesRotate through LAPS; see the LAPS Guide
Service accounts and scheduled task identitiesIf used on or from infected hostsRotate, update dependent services, move to gMSA where possible
API keys, tokens, SSH keys and certificates stored on hostsIf a stealer or file access was seenRevoke and reissue from the secrets manager; check for use from unknown locations
Privileged domain accountsIf used on infected hosts or any domain controller is affectedReset, and reset the krbtgt account twice, with replication time between resets
Cloud and SaaS identities synced from the directoryIf sync servers or admin workstations were affectedRotate sync and app credentials; review consent grants and new app registrations

6. Recovery

  1. Restore in the priority order agreed by the Business Owner, starting with identity, DNS and core network services.
  2. Rebuild from standard images or infrastructure as code; restore data only from backups scanned for malware and taken before the earliest infection (NCSC advises scanning backups before restoring and connecting them only to known-clean devices).
  3. Reconnect hosts in stages to a recovery network, confirming the EDR agent is healthy and in block mode before each host rejoins.
  4. Remove temporary blocks in stages; keep payload and command-and-control blocks.
  5. Run heightened monitoring for [30] days: the hashes, accounts, persistence locations and network indicators from this incident, plus any logon by reset accounts from unusual hosts.

7. Communication and notification

AudienceWhenOwnerContent
ExecutivesCritical or High within [1] hourIncident LeadScope, business impact, decisions needed
StaffWhen isolation affects workCommunications LeadWhat to do (and not do), how to report symptoms, no technical detail
Cyber insurer and retainerWithin policy deadlines, often [24] hoursLegal CounselNotice of incident, request for support
Data protection regulatorIf personal data was accessed or lost, for example within 72 hours under UK and EU GDPR Art. 33Data Protection OfficerNature of breach, likely consequences, measures taken
Sector or national authorityAs NIS2, sector rules or contracts requireLegal CounselIncident notification in the required format
Law enforcement and national CERTFor criminal or significant incidentsLegal CounselIndicators, samples, timeline
Customers and suppliersIf their systems or data may be affectedCommunications LeadFacts, indicators they can check, contact point

8. Post-incident review

8.1 Within [10] business days run a blameless review using the Post-Incident Review and Root Cause Analysis Template.

8.2 Ask: how did it arrive; why did it spread (flat network, shared local admin passwords, over-privileged service accounts); how long from first detection to isolation; did EDR cover every infected host; did pre-authorisation work; were any credentials missed in section 5.4.

8.3 Update detections and share indicators with CISA, the NCSC or your sector ISAC.

Implementation guidance

Containment options compared.

OptionStrengthTrade-offUse when
EDR host containmentFast, precise, keeps telemetryNeeds a healthy agent; malware may tamper with itDefault for every infected host
Segment or VLAN isolationStops spread regardless of agent stateDisrupts every service in the segmentSpread is faster than host isolation
Port and protocol blocksBreaks the spread path with less disruptionMalware may switch methodSpread method is known (for example SMB)
Account disablementStops credential-based spreadBreaks services that depend on the accountThe malware uses a known account

Rollout.

  1. Confirm EDR coverage across all hosts, including servers and Linux, and that agents report tamper attempts. See the EDR Guide.
  2. Pre-build isolation: EDR containment policies, firewall rule sets that block lateral protocols per segment, and a tested way to isolate each segment.
  3. Pre-stage evidence collection scripts and storage, and agree the retention period for EDR telemetry.
  4. Test with a tabletop, then a controlled drill using a harmless test file (such as the EICAR test file) to time detection-to-isolation. See the Tabletop Exercise Guide.
  5. Rollback: document how to release every containment action, and test release as well as isolation.

Small vs large organisations. A small organisation with a managed EDR service should agree in its contract that the provider may isolate hosts without waiting for a call back, and keep one offline contact sheet. A large organisation needs per-segment isolation runbooks, tiered admin accounts so one infected workstation cannot reach servers, and an identity team ready to run section 5.4 at scale.

Metrics. Time from first detection to first isolation; number of hosts infected after the first detection; percentage of hosts with healthy EDR in block mode; percentage of credentials in 5.4 rotated within [48] hours; reinfection count within 30 days; time to restore priority services.

Framework mapping.

FrameworkReferences
NIST SP 800-61 Rev. 3 and CSF 2.0DE.CM-09 monitoring of computing assets; DE.AE-02 event analysis; RS.AN-03 analysis; RS.MI-01 containment; RS.MI-02 eradication; RS.CO-02 notification; RC.RP-01 recovery execution; RC.RP-03 backup integrity
NIST SP 800-53 Rev. 5IR-4 Incident Handling; IR-6 Incident Reporting; SI-3 Malicious Code Protection; SI-4 System Monitoring; SC-7 Boundary Protection; CP-9 System Backup; CP-10 System Recovery and Reconstitution; IA-5 Authenticator Management
ISO/IEC 27001:2022 Annex AA.5.24 to A.5.28 incident management and evidence; A.8.7 protection against malware; A.8.22 segregation of networks
CIS Controls v8.1Control 10 Malware Defenses; Control 17 Incident Response Management
MITRE ATT&CK v20T1210, T1021.002, T1570, T1047, T1053.005, T1003.001, T1078, T1080, T1091, T1072, T1543.003, T1685

Standards and references

Related NHI Mgmt Group resources: Ransomware Playbook Template · Malware Guide · EDR Guide · NIST SP 800-61 Incident Response Guide · Computer Worms Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 26 October 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.