Ransomware combines encryption for impact with double extortion (data
theft plus the threat to leak). Response speed and preparation decide
the outcome more than any tool bought during the crisis. This skill
covers the defensive playbook: readiness before it happens, the
response sequence when it does, recovery, and the ransom decision.
For your own organization or an authorized client, with legal involved
from the first hour.
Quick Workflow
- Declare SEV-1, name the incident commander, start the timeline,
engage legal and the IR retainer.
- Identify the ransomware family from the note, extensions, and
known IOCs; check for a free decryptor before anything else.
- Contain: isolate affected hosts, kill remote access paths, stop
lateral movement, protect the backups.
- Preserve evidence: memory, disk images of patient zero, logs,
the ransom note, and attacker communications.
- Scope: how many hosts, which data was accessed or exfiltrated,
is encryption still spreading.
- Eradicate: remove persistence and access, close the initial
vector, reset credentials enterprise-wide if needed.
- Recover: rebuild from known-clean backups or gold images,
verify integrity, restore in priority order.
- Post-incident: blameless review, close the gaps the attackers
used, monitor for re-entry for 90 days.
1. Readiness (do this now)
The response starts before the incident:
- Backups: 3-2-1 rule (3 copies, 2 media types, 1 offline or
immutable). Test restores quarterly; an untested backup is a hope.
- Protect the backup infrastructure: separate credentials, MFA,
immutable storage, and network segmentation from production.
- Segment the network: ransomware spreads over SMB and RDP. Limit
lateral paths now, not during the fire.
- EDR in block mode with tamper protection on every host, plus
behavioral rules for mass file modification.
- Keep an offline copy of this playbook, contact lists, and network
diagrams. Ransomware takes the wiki down too.
- Know your cyber insurance and IR retainer numbers; call them in
the first hour, not the third day.
# Readiness check: verify backup immutability and last successful restore test
# (adapt to your backup platform; the point is a scheduled, evidenced test)
echo "last restore test: $(cat /var/log/backup-restore-test.log | tail -1)"
2. Identification
Confirm what you are dealing with fast:
# Collect the ransom note and file markers from one host (do not pay yet)
ls ~/Desktop/*ransom* ~/Documents/*README* 2>/dev/null
cat ~/Desktop/*ransom*.txt 2>/dev/null | head -30
# Note the encrypted file extension and any new wallpaper text
ls ~ | grep -iE "locked|encrypted|crypt" | head
# Hash the note and the encryptor binary if present, check reputation
sha256sum /tmp/suspicious-binary 2>/dev/null
- Identify the family: ransom note text, file extension, and IOCs
matched against threat intel (many families have known notes).
- Check No More Ransom (nomoreransom.org) and vendor decryptor pages
for a free decryptor for the exact variant. Some older or flawed
families are decryptable.
- Determine the initial access: phishing, exposed RDP, VPN without
MFA, unpatched edge device. This decides the eradication work.
Do not delete the ransom note or reformat patient zero. They are
evidence and may hold the decryption path.
3. Containment
Speed matters; encryption spreads in minutes over flat networks.
[ ] Isolate affected hosts in EDR (network quarantine, power stays on)
[ ] Disable VPN and remote access if the entry was remote; force MFA reset
[ ] Block C2 domains and IPs at firewall, proxy, and DNS
[ ] Disable the compromised accounts and service accounts used for spread
[ ] PROTECT THE BACKUPS: verify backup servers are isolated and immutable
copies are intact before the attacker finds them
[ ] If spreading fast and isolation is unavailable: power off affected
hosts (accept the memory evidence loss to stop the bleeding)
Verify containment: pick three affected hosts and confirm they
cannot reach the C2 infrastructure or write to network shares.
Containment you did not verify is a guess.
Common ransomware behaviors to hunt while containing (T1486, T1490):
# Volume shadow copies deleted (vssadmin, wmic) across the fleet
index=wineventlog EventCode=1 earliest=-7d@d latest=@d
| eval cmd=lower(CommandLine)
| where match(cmd,"vssadmin.*delete.*shadows") OR match(cmd,"wmic.*shadowcopy.*delete")
| stats values(ComputerName) as hosts count
# Mass file renames with new extensions in user folders (Sysmon ID 11 volume)
index=wineventlog EventCode=11 earliest=-24h latest=@h TargetFilename="*.locked"
| stats dc(ComputerName) as hosts count | where hosts > 0
4. Evidence preservation
Collect before eradication changes the scene:
- Memory capture of patient zero and any host with the encryptor
still resident.
- Disk image or at least the encryptor binary, ransom note, and
persistence artifacts (scheduled tasks, services, registry run
keys, startup folders).
- Central logs: EDR timeline, firewall, proxy, VPN, and identity
logs for the intrusion window (go back 60 to 90 days; ransomware
crews dwell for weeks).
- The attacker's communications: ransom note, leak site post if
any, negotiation chat logs if you engage.
# Timeline the intrusion window from EDR/Sysmon for patient zero
index=wineventlog ComputerName="PATIENT-ZERO" earliest=-90d@d latest=@d
| eval proc=lower(mvindex(split(Image,"\\"),-1))
| where proc IN ("powershell.exe","cmd.exe","rundll32.exe","wmic.exe")
| table _time, proc, CommandLine | sort _time | head -100
Chain of custody: hash everything, log who collected what and when,
store on write-once or access-controlled media.
5. Scoping the blast radius
Answer five questions before recovery:
- How many hosts encrypted, and how many touched but not encrypted.
- Was data exfiltrated (proxy/DNS/EDR upload volumes, staging
directories, archive tools like WinRAR or rclone in the timeline).
- Which accounts and credentials are burned (domain admin
compromise means enterprise-wide reset).
- Is the attacker still present (active C2 in the last 24h).
- Are backups intact and clean (scan backup sets for the
encryptor before trusting them).
# Look for staging and exfiltration tooling in the intrusion window
index=wineventlog EventCode=1 earliest=-60d@d latest=@d
| eval p=lower(Image), c=lower(CommandLine)
| where match(p,"rclone|winrar|7z|megacmd") OR match(c,"rclone|mega\\.nz")
| stats values(ComputerName) as hosts values(c) as cmds by p
Assume exfiltration until the evidence says otherwise. Double
extortion is the norm; the leak-site post is the confirmation.
6. Eradication
Remove every foothold, not just the encryptor:
- Delete persistence: scheduled tasks, services, WMI consumers,
registry run keys, startup folder items created in the intrusion
window.
- Remove rogue accounts and reset credentials: if domain admin was
compromised, reset KRBTGT twice and every privileged account.
- Close the initial vector: patch the exploited edge device,
enforce MFA on VPN, disable exposed RDP.
- Reimage affected hosts from known-good media. Do not "clean"
ransomware hosts.
# Hunt persistence created during the intrusion window (example: tasks)
index=wineventlog EventCode=4698 earliest=-90d@d latest=@d
| table _time, ComputerName, TaskName, SubjectUserName | sort _time
7. Recovery
Recover in priority order, verifying each step:
- Restore the identity infrastructure first (domain controllers
from clean backups), then network and security tooling.
- Rebuild servers from gold images or clean backups; verify hashes
of restored system files against known-good.
- Scan restored data for encryptor remnants and for the
exfiltrated data's sensitivity (drives notification decisions).
- Bring systems online in isolated VLANs first, watch EDR for 48h,
then reconnect.
- Enhanced monitoring for 90 days: the same crew often returns
through the same hole.
Test the restore before you need it at scale: restore one critical
system to an isolated network and validate the application works.
Recovery time estimates come from these tests, not from vendor
claims.
8. The ransom decision
Factors, not advice; the decision belongs to leadership with legal
counsel:
- Do you have clean, tested backups that meet the recovery
objective. If yes, paying buys little.
- Was data exfiltrated. Paying does not guarantee deletion; leaked
data has been published after payment.
- Sanctions: paying certain groups is illegal in some
jurisdictions. Legal must clear the recipient.
- Decryptor quality: attacker tools are often buggy and slow;
factor in the recovery risk.
- Cost of downtime vs cost of rebuild from backups.
If negotiation happens, use the IR firm's experienced negotiators,
never the victim's staff. Document everything; some jurisdictions
require reporting of payments.
Edge cases
- The decryptor exists but is for a different variant. Verify the
exact version; wrong decryptors corrupt files further. Test on
copies, never on originals.
- Backups are encrypted too. Fall back to immutable or offline
copies; if none exist, recovery becomes rebuild-from-scratch plus
data re-creation.
- The attacker threatens to leak data on a countdown. Do not let
the timer rush containment; work the playbook, let legal handle
the clock.
- Encryption is still spreading during recovery. Stop, re-verify
containment and eradication before bringing more systems online.
- OT or medical devices are affected. Safety and care continuity
outrank forensics; involve the right specialists immediately.
- Insurance requires their approved IR firm. Call the insurer
before engaging anyone else, or coverage may be at risk.
Escalation
- Scope exceeds internal capacity: the IR retainer takes the lead;
your team supports with access and knowledge.
- Data theft involves regulated personal data: legal owns the
notification timeline (GDPR 72 hours from awareness).
- The attacker contacts executives directly: route all contact
through the negotiator and legal; nobody freelances.
- Law enforcement: report through the proper channels (they will
not decrypt your files, but reporting helps everyone and may be
required).
- Re-infection after recovery: the initial vector is still open.
Stop recovery, re-scope, and assume the attacker kept access
somewhere you have not looked.
Detection and defender view
Ransomware defense is an arms race the defender can win with
preparation:
- Attackers dwell for weeks, then encrypt in minutes. The detection
window is the dwell period: hunt for their pre-encryption tooling
(AD recon, credential dumping, backup discovery).
- Attackers kill backups first (T1490: shadow copies, backup
agents). Alert on backup tampering as SEV-1; it is the clearest
pre-ransomware signal.
- Attackers exfiltrate before encrypting. Egress anomaly detection
and staging-directory hunts catch the quiet phase.
- Attackers re-enter through unpatched edge devices. Post-incident
hardening must close the exact initial vector, verified by a
retest.
- Your recovery capability is the deterrent. Tested, immutable
backups turn ransomware from existential to expensive.
Key references
See also
ransomware-incident-response: Use it instead for the full ransomware incident, including the ransom decision with legal counsel and double-extortion handling.
ransomware-playbook-run: Use it instead for executing the ransomware playbook steps once ransomware is detected or suspected.
1---2name: ransomware-response3description: Use when preparing for or responding to a ransomware incident4 as a defender. Covers pre-incident readiness (backups, segmentation,5 EDR), identifying the ransomware family, containment of encryption and6 lateral spread, evidence preservation, eradication, recovery from7 backups, decryptor checks, ransom decision factors, and post-incident8 hardening. Use when ransomware is suspected or confirmed, or when9 building the organization's ransomware playbook before it is needed.10version: 1.0.011domain: defensive12lifecycle: stable13last_verified: "2026-10-23"14requires: []15extends: []16relates: [incident-response, incident-playbooks]17tools:18 - name: Velociraptor19 version: "0.72"20 - name: Sysmon21 version: 15.x22 - name: Python23 version: "3.12"24metadata:25 source: https://skillmd.com/skills/mizazhaider-ceh/ransomware-response26---2728Ransomware combines encryption for impact with double extortion (data29theft plus the threat to leak). Response speed and preparation decide30the outcome more than any tool bought during the crisis. This skill31covers the defensive playbook: readiness before it happens, the32response sequence when it does, recovery, and the ransom decision.33For your own organization or an authorized client, with legal involved34from the first hour.3536## Quick Workflow37381. Declare SEV-1, name the incident commander, start the timeline,39 engage legal and the IR retainer.402. Identify the ransomware family from the note, extensions, and41 known IOCs; check for a free decryptor before anything else.423. Contain: isolate affected hosts, kill remote access paths, stop43 lateral movement, protect the backups.444. Preserve evidence: memory, disk images of patient zero, logs,45 the ransom note, and attacker communications.465. Scope: how many hosts, which data was accessed or exfiltrated,47 is encryption still spreading.486. Eradicate: remove persistence and access, close the initial49 vector, reset credentials enterprise-wide if needed.507. Recover: rebuild from known-clean backups or gold images,51 verify integrity, restore in priority order.528. Post-incident: blameless review, close the gaps the attackers53 used, monitor for re-entry for 90 days.5455## 1. Readiness (do this now)5657The response starts before the incident:5859- Backups: 3-2-1 rule (3 copies, 2 media types, 1 offline or60 immutable). Test restores quarterly; an untested backup is a hope.61- Protect the backup infrastructure: separate credentials, MFA,62 immutable storage, and network segmentation from production.63- Segment the network: ransomware spreads over SMB and RDP. Limit64 lateral paths now, not during the fire.65- EDR in block mode with tamper protection on every host, plus66 behavioral rules for mass file modification.67- Keep an offline copy of this playbook, contact lists, and network68 diagrams. Ransomware takes the wiki down too.69- Know your cyber insurance and IR retainer numbers; call them in70 the first hour, not the third day.7172```bash73# Readiness check: verify backup immutability and last successful restore test74# (adapt to your backup platform; the point is a scheduled, evidenced test)75echo "last restore test: $(cat /var/log/backup-restore-test.log | tail -1)"76```7778## 2. Identification7980Confirm what you are dealing with fast:8182```bash83# Collect the ransom note and file markers from one host (do not pay yet)84ls ~/Desktop/*ransom* ~/Documents/*README* 2>/dev/null85cat ~/Desktop/*ransom*.txt 2>/dev/null | head -308687# Note the encrypted file extension and any new wallpaper text88ls ~ | grep -iE "locked|encrypted|crypt" | head8990# Hash the note and the encryptor binary if present, check reputation91sha256sum /tmp/suspicious-binary 2>/dev/null92```9394- Identify the family: ransom note text, file extension, and IOCs95 matched against threat intel (many families have known notes).96- Check No More Ransom (nomoreransom.org) and vendor decryptor pages97 for a free decryptor for the exact variant. Some older or flawed98 families are decryptable.99- Determine the initial access: phishing, exposed RDP, VPN without100 MFA, unpatched edge device. This decides the eradication work.101102Do not delete the ransom note or reformat patient zero. They are103evidence and may hold the decryption path.104105## 3. Containment106107Speed matters; encryption spreads in minutes over flat networks.108109```text110[ ] Isolate affected hosts in EDR (network quarantine, power stays on)111[ ] Disable VPN and remote access if the entry was remote; force MFA reset112[ ] Block C2 domains and IPs at firewall, proxy, and DNS113[ ] Disable the compromised accounts and service accounts used for spread114[ ] PROTECT THE BACKUPS: verify backup servers are isolated and immutable115 copies are intact before the attacker finds them116[ ] If spreading fast and isolation is unavailable: power off affected117 hosts (accept the memory evidence loss to stop the bleeding)118```119120Verify containment: pick three affected hosts and confirm they121cannot reach the C2 infrastructure or write to network shares.122Containment you did not verify is a guess.123124Common ransomware behaviors to hunt while containing (T1486, T1490):125126```bash127# Volume shadow copies deleted (vssadmin, wmic) across the fleet128index=wineventlog EventCode=1 earliest=-7d@d latest=@d129| eval cmd=lower(CommandLine)130| where match(cmd,"vssadmin.*delete.*shadows") OR match(cmd,"wmic.*shadowcopy.*delete")131| stats values(ComputerName) as hosts count132133# Mass file renames with new extensions in user folders (Sysmon ID 11 volume)134index=wineventlog EventCode=11 earliest=-24h latest=@h TargetFilename="*.locked"135| stats dc(ComputerName) as hosts count | where hosts > 0136```137138## 4. Evidence preservation139140Collect before eradication changes the scene:141142- Memory capture of patient zero and any host with the encryptor143 still resident.144- Disk image or at least the encryptor binary, ransom note, and145 persistence artifacts (scheduled tasks, services, registry run146 keys, startup folders).147- Central logs: EDR timeline, firewall, proxy, VPN, and identity148 logs for the intrusion window (go back 60 to 90 days; ransomware149 crews dwell for weeks).150- The attacker's communications: ransom note, leak site post if151 any, negotiation chat logs if you engage.152153```bash154# Timeline the intrusion window from EDR/Sysmon for patient zero155index=wineventlog ComputerName="PATIENT-ZERO" earliest=-90d@d latest=@d156| eval proc=lower(mvindex(split(Image,"\\"),-1))157| where proc IN ("powershell.exe","cmd.exe","rundll32.exe","wmic.exe")158| table _time, proc, CommandLine | sort _time | head -100159```160161Chain of custody: hash everything, log who collected what and when,162store on write-once or access-controlled media.163164## 5. Scoping the blast radius165166Answer five questions before recovery:1671681. How many hosts encrypted, and how many touched but not encrypted.1692. Was data exfiltrated (proxy/DNS/EDR upload volumes, staging170 directories, archive tools like WinRAR or rclone in the timeline).1713. Which accounts and credentials are burned (domain admin172 compromise means enterprise-wide reset).1734. Is the attacker still present (active C2 in the last 24h).1745. Are backups intact and clean (scan backup sets for the175 encryptor before trusting them).176177```bash178# Look for staging and exfiltration tooling in the intrusion window179index=wineventlog EventCode=1 earliest=-60d@d latest=@d180| eval p=lower(Image), c=lower(CommandLine)181| where match(p,"rclone|winrar|7z|megacmd") OR match(c,"rclone|mega\\.nz")182| stats values(ComputerName) as hosts values(c) as cmds by p183```184185Assume exfiltration until the evidence says otherwise. Double186extortion is the norm; the leak-site post is the confirmation.187188## 6. Eradication189190Remove every foothold, not just the encryptor:191192- Delete persistence: scheduled tasks, services, WMI consumers,193 registry run keys, startup folder items created in the intrusion194 window.195- Remove rogue accounts and reset credentials: if domain admin was196 compromised, reset KRBTGT twice and every privileged account.197- Close the initial vector: patch the exploited edge device,198 enforce MFA on VPN, disable exposed RDP.199- Reimage affected hosts from known-good media. Do not "clean"200 ransomware hosts.201202```bash203# Hunt persistence created during the intrusion window (example: tasks)204index=wineventlog EventCode=4698 earliest=-90d@d latest=@d205| table _time, ComputerName, TaskName, SubjectUserName | sort _time206```207208## 7. Recovery209210Recover in priority order, verifying each step:2112121. Restore the identity infrastructure first (domain controllers213 from clean backups), then network and security tooling.2142. Rebuild servers from gold images or clean backups; verify hashes215 of restored system files against known-good.2163. Scan restored data for encryptor remnants and for the217 exfiltrated data's sensitivity (drives notification decisions).2184. Bring systems online in isolated VLANs first, watch EDR for 48h,219 then reconnect.2205. Enhanced monitoring for 90 days: the same crew often returns221 through the same hole.222223Test the restore before you need it at scale: restore one critical224system to an isolated network and validate the application works.225Recovery time estimates come from these tests, not from vendor226claims.227228## 8. The ransom decision229230Factors, not advice; the decision belongs to leadership with legal231counsel:232233- Do you have clean, tested backups that meet the recovery234 objective. If yes, paying buys little.235- Was data exfiltrated. Paying does not guarantee deletion; leaked236 data has been published after payment.237- Sanctions: paying certain groups is illegal in some238 jurisdictions. Legal must clear the recipient.239- Decryptor quality: attacker tools are often buggy and slow;240 factor in the recovery risk.241- Cost of downtime vs cost of rebuild from backups.242243If negotiation happens, use the IR firm's experienced negotiators,244never the victim's staff. Document everything; some jurisdictions245require reporting of payments.246247## Edge cases248249- The decryptor exists but is for a different variant. Verify the250 exact version; wrong decryptors corrupt files further. Test on251 copies, never on originals.252- Backups are encrypted too. Fall back to immutable or offline253 copies; if none exist, recovery becomes rebuild-from-scratch plus254 data re-creation.255- The attacker threatens to leak data on a countdown. Do not let256 the timer rush containment; work the playbook, let legal handle257 the clock.258- Encryption is still spreading during recovery. Stop, re-verify259 containment and eradication before bringing more systems online.260- OT or medical devices are affected. Safety and care continuity261 outrank forensics; involve the right specialists immediately.262- Insurance requires their approved IR firm. Call the insurer263 before engaging anyone else, or coverage may be at risk.264265## Escalation266267- Scope exceeds internal capacity: the IR retainer takes the lead;268 your team supports with access and knowledge.269- Data theft involves regulated personal data: legal owns the270 notification timeline (GDPR 72 hours from awareness).271- The attacker contacts executives directly: route all contact272 through the negotiator and legal; nobody freelances.273- Law enforcement: report through the proper channels (they will274 not decrypt your files, but reporting helps everyone and may be275 required).276- Re-infection after recovery: the initial vector is still open.277 Stop recovery, re-scope, and assume the attacker kept access278 somewhere you have not looked.279280## Detection and defender view281282Ransomware defense is an arms race the defender can win with283preparation:284285- Attackers dwell for weeks, then encrypt in minutes. The detection286 window is the dwell period: hunt for their pre-encryption tooling287 (AD recon, credential dumping, backup discovery).288- Attackers kill backups first (T1490: shadow copies, backup289 agents). Alert on backup tampering as SEV-1; it is the clearest290 pre-ransomware signal.291- Attackers exfiltrate before encrypting. Egress anomaly detection292 and staging-directory hunts catch the quiet phase.293- Attackers re-enter through unpatched edge devices. Post-incident294 hardening must close the exact initial vector, verified by a295 retest.296- Your recovery capability is the deterrent. Tested, immutable297 backups turn ransomware from existential to expensive.298299## Key references300301- MITRE ATT&CK T1486 (Data Encrypted for Impact), T1490 (Inhibit302 System Recovery), T1070.001 (Clear Windows Event Logs), T1021303 (Remote Services), T1048 (Exfiltration Over Alternative Protocol).304- No More Ransom decryptor portal: https://www.nomoreransom.org/305- CISA ransomware guidance:306 https://www.cisa.gov/stopransomware/ransomware-guide307- NIST SP 800-61 Rev. 2 (incident handling) and SP 800-184 (recovery).308309## See also310311- `ransomware-incident-response`: Use it instead for the full ransomware incident, including the ransom decision with legal counsel and double-extortion handling.312- `ransomware-playbook-run`: Use it instead for executing the ransomware playbook steps once ransomware is detected or suspected.