Ransomware is two incidents at once - an intrusion and an extortion event. The encryption is usually the last step, not the first, so the response must cover both the attacker still inside the network and the business deciding whether, and how, to recover. Paying does not guarantee decryption, and it does not delete stolen data. This skill covers the decision path, the containment that actually stops spread, and the restore order that gets the business back safely. Authorized incident response only.
Quick Workflow
- Declare a ransomware incident and invoke the incident commander, legal counsel, and the backup owner immediately.
- Isolate affected hosts and segments, but keep one encrypted host powered on and untouched for forensics and the ransom note.
- Preserve the ransom note, the attacker contact channel, and a sample of encrypted files, and photograph the ransom screen.
- Identify the ransomware family from the note, the file extension, and known indicators, and check for a free decryptor.
- Scope the intrusion, not just the encryption - find initial access, persistence, and any data theft before the encryption.
- Decide on payment only with legal counsel and leadership, on the record, weighing sanctions, evidence, and recovery odds.
- Restore from clean backups in business priority order, after verifying the backups are not encrypted or poisoned.
- Hunt for persistence after restore, monitor for re-encryption, and report to law enforcement and insurers.
1. Triage and first containment
The first hour decides whether ten hosts or a thousand are encrypted. Speed matters, but blind mass shutdowns destroy volatile evidence and can corrupt databases mid-write, so isolate at the network level first and power off only on the commander's order.
# Triage checklist, run from the incident ticket, not from memory
# - ransom note text and file name (copy verbatim into the ticket)
# - encrypted file extension, for example .locked or .readme
# - first encrypted host and first detection time (UTC)
# - backup status: last successful backup, tested restore date
# - whether a leak site threat is present in the note
# - whether the attacker claims data theft, and what proof they offer
echo "INC ticket opened, commander paged, legal paged, backup owner paged"
# Network isolation wave, adapted per host from the containment playbook
# Prefer EDR isolation or switch-port shutdown over in-guest rules
# when the ransomware is actively spreading, because guest rules
# can be reverted by malware running as SYSTEM or root.
# Record every isolated host, the method, and the timestamp.
cat > /tmp/isolate-wave.txt <<'EOF'
host,method,time_utc
filesrv-02,edr-isolate,2026-10-27T04:12Z
wkstn-114,switch-port-down,2026-10-27T04:14Z
dbsrv-01,edr-isolate,2026-10-27T04:15Z
EOF
cat /tmp/isolate-wave.txt
# Preserve the ransom note and a sample before anything is wiped
# Work on copies, never on the originals, and hash everything.
mkdir -p /evidence/INC-2026-1042/ransomware
cp /mnt/filesrv-02/README.txt /evidence/INC-2026-1042/ransomware/ 2>/dev/null || true
sha256sum /evidence/INC-2026-1042/ransomware/* > /evidence/INC-2026-1042/ransomware/hashes.txt
cat /evidence/INC-2026-1042/ransomware/hashes.txt
2. Identify the family and check for a decryptor
Identification changes everything - some families have free decryptors, some have flawed encryption that researchers can break, and most have none. Never pay, and never wipe, before this check. Identification services compare the note and a sample encrypted file against known families, so submit copies, never originals.
# Gather the identification bundle (copies only)
# - the ransom note, verbatim
# - one small encrypted file plus its known original, if one exists
# - the encrypted extension and any attacker email or onion address
# Submit the bundle to a ransomware identification service and to
# the No More Ransom decryptor catalogue, and record the result.
ls -l /evidence/INC-2026-1042/ransomware/
echo "family result goes in the ticket before any payment discussion"
#!/usr/bin/env python3
"""Score the recovery options before the payment decision meeting."""
options = [
("restore from clean backups", "no payment, data loss = backup age", 9),
("free decryptor available", "no payment, test on copies first", 10),
("pay the ransom", "no guarantee, sanctions and leak risk remain", 2),
("rebuild from scratch", "slow, clean, no payment", 6),
]
for name, note, score in options:
print(f"{score}/10 - {name} - {note}")
print("payment is a business and legal decision, never a technical default")
3. Scope the intrusion behind the encryption
Encryption usually lands days or weeks after initial access. If you restore onto a network the attacker still controls, the second encryption arrives within days. Scope initial access, privilege escalation, lateral movement, persistence, and data staging, and treat any data theft claim as true until the evidence says otherwise.
# Velociraptor hunt across the fleet for the ransomware tooling
# Adapt the artifact and the hunt scope to the family you identified.
velociraptor --config server.config.yaml query \
"SELECT client_id, hostname FROM clients() WHERE last_seen > now() - 86400"
# Follow with targeted hunts for the family's known persistence
# mechanisms, scheduled tasks, services, and startup entries.
echo "scope the intrusion, not just the encrypted hosts"
# Check for data staging and exfiltration before encryption
# Look for large archives created shortly before the encryption
# time, and for unusual outbound transfers in firewall and proxy logs.
# Staging folders are often named innocuously in temp directories.
find /mnt/filesrv-02 -type f -newermt "2026-10-20" -size +100M 2>/dev/null | head -30
echo "any archive here is a candidate staging artifact, preserve it"
4. The ransom decision, on the record
The payment decision belongs to leadership with legal counsel, not to the technical team alone. Document who decided, on what advice, and what alternatives were considered. Check sanctions exposure, insurance conditions, and whether the attacker is a sanctioned entity, and never negotiate through a channel you have not verified with counsel. If payment is chosen, use a specialist negotiator and a verified wallet, and treat the decryptor as untrusted code to be tested on copies first.
# Decision record template, one entry per meeting, appended not edited
cat >> /evidence/INC-2026-1042/decision-log.txt <<'EOF'
2026-10-27T06:00Z - payment decision meeting
attendees: incident commander, general counsel, CEO, insurer contact
options considered: restore, decryptor, pay, rebuild
decision: [restore from backups / pay / rebuild]
rationale: [backup age, sanctions check result, insurer position]
sanctions check: [cleared / flagged / pending, by whom]
EOF
cat /evidence/INC-2026-1042/decision-log.txt
# If a decryptor is obtained, test it on COPIES in an isolated lab
# Never run an attacker-supplied decryptor on production data first.
mkdir -p /tmp/decrypt-test
cp /evidence/INC-2026-1042/ransomware/sample.locked /tmp/decrypt-test/
# Run the decryptor in the isolated lab, verify the output opens,
# and hash the output before touching any production restore.
echo "decryptor tested on copies, output verified, then and only then scale up"
5. Restore in business priority order
Restore order is a business call, not a technical one. Identity services and backups infrastructure come before user-facing apps, because everything else depends on them. Verify each restored system is clean, patched against the initial access vector, and monitored, before it rejoins the network. Reconnect in waves with a pause between waves to catch re-encryption early.
# Restore wave plan, one wave at a time, with a monitoring pause
# Wave 0: identity, DNS, backup infrastructure (verified clean)
# Wave 1: critical business systems, in owner priority order
# Wave 2: general servers and workstations
# Wave 3: decommissioned or rebuilt hosts that were patient zero
# After each wave, check for new encryption events for 60 minutes
# before starting the next wave.
cat > /tmp/restore-waves.txt <<'EOF'
wave,system,owner,verified_clean
0,identity-dc-01,identity-team,pending
0,backup-srv-01,backup-team,pending
1,erp-app-01,business-owner,pending
EOF
cat /tmp/restore-waves.txt
6. Double extortion and leak sites
Many groups steal data before encrypting and threaten to publish it. Payment does not reliably delete stolen data, and leak site claims are sometimes bluffs. Verify the theft claim from your own logs first, prepare the breach notification path in parallel, and monitor the leak site through a safe channel (never from a corporate network, and never by downloading the stolen data).
# Leak verification checklist
# - does the group name real internal file names or only generic claims
# - do proxy and firewall logs show the claimed volume of exfiltration
# - is the sample data genuinely yours, or scraped from elsewhere
# - has legal approved the notification plan if the leak is real
echo "verify the theft claim from your own logs before believing the leak post"
Edge cases
- Backups are encrypted too. The attacker found the backup server first, which is common. Fall back to offline, immutable, or cloud snapshots, and treat the backup infrastructure as compromised.
- The decryptor corrupts files. Test on copies, keep the encrypted originals until every restored file is verified, and never delete encrypted data during the restore.
- A second group claims the same data. Stolen data gets resold. Handle each claim separately with counsel, and do not assume one payment covers all holders of the data.
- Encryption is still spreading during restore. Stop the wave, re-isolate, and re-scope. Restoring into an active intrusion wastes the restore and teaches the attacker your order.
- The ransom note demands contact within a deadline. Deadlines are pressure tactics. Counsel decides whether and when to engage, and the technical response does not pause for the countdown.
- An insider helped the attacker in. Preserve HR and legal involvement, restrict the suspect's access quietly, and keep the evidence chain separate from any employment process.
Key references
- NIST SP 800-61 Rev. 2 incident handling: https://csrc.nist.gov/publications/detail/sp/800-61/rev-2/final
- CISA ransomware guidance: https://www.cisa.gov/stopransomware
- No More Ransom decryptor catalogue: https://www.nomoreransom.org
- Related skills in this repo - incident-response, incident-containment-playbooks, incident-breach-scoping, crisis-communications, incident-timeline-analysis.
See also
ransomware-response: Use it instead for defender readiness plus response, including backups, segmentation, and EDR preparation before an incident.ransomware-playbook-run: Use it instead for executing the ransomware playbook steps once ransomware is detected or suspected.
