Ransomware IR is the most time-pressured IR scenario. The difference between 100 encrypted files and 100,000 encrypted files is the 30 minutes it takes to identify and stop the spread.
The Ransomware IR Timeline
T+0:00 Alert received — "files have wrong extension on Server-01"
T+0:02 Confirm ransomware: check for encrypted files + ransom note
T+0:05 Identify Patient Zero (source of encryption)
T+0:07 Network isolation of active encryption source
→ firewall block + VLAN change OR unplug network cable
→ Do NOT power off yet (memory evidence)
T+0:15 Memory acquisition from Patient Zero (if possible)
T+0:20 Identify all affected hosts (EDR telemetry / file extension sweep)
T+0:30 Isolate all confirmed affected hosts
T+0:45 Assess backup integrity (can we restore without paying?)
T+1:00 Notify legal counsel (double extortion evidence → potential breach)
T+2:00 Scope complete — brief leadership on containment status and options
T+4:00 Recovery decision: restore vs. negotiate
Confirming Ransomware — First 5 Minutes
# Step 1: Identify encrypted file extension
Get-ChildItem -Path C:\Users\ -Recurse -ErrorAction SilentlyContinue |
Where-Object {$_.Name -like "*.locked" -or $_.Name -like "*.encrypted" -or
$_.Extension -notin @('.exe','.dll','.sys','.lnk')} |
Select-Object -First 20
# Step 2: Find the ransom note
Get-ChildItem -Path C:\ -Recurse -Filter "HOW_TO_DECRYPT*" -ErrorAction SilentlyContinue |
Select-Object -First 5
Get-ChildItem -Path C:\ -Recurse -Filter "RANSOM_NOTE*" -ErrorAction SilentlyContinue |
Select-Object -First 5
Get-ChildItem -Path C:\ -Recurse -Filter "README*" -ErrorAction SilentlyContinue |
Select-Object -First 5
# Step 3: Identify ransomware family (submit to ID Ransomware)
# id-ransomware.malwarehunterteam.com — paste the ransom note or upload encrypted file
# Also: submit encrypted file extension to nomoreransom.org for decryptor availability
# Step 4: Check if encryption is still active
# Look for file system activity:
Get-WmiObject Win32_Process | Where-Object {$_.Name -like "*crypt*" -or $_.Name -like "*enc*"}
# Or watch file system events:
Get-EventLog -LogName Security -EntryType Information -Newest 100 |
Where-Object {$_.EventID -eq 4663} # File access events
Stopping Active Encryption
# NETWORK ISOLATION — preferred (preserves memory evidence)
# Option A: Firewall block (PowerShell — runs locally, no network needed)
New-NetFirewallRule -DisplayName "ISOLATE-IR" -Direction Outbound `
-Action Block -Protocol Any -Profile Any
New-NetFirewallRule -DisplayName "ISOLATE-IR-IN" -Direction Inbound `
-Action Block -Protocol Any -Profile Any
# Exceptions: leave open only the port needed for forensic evidence collection
# e.g., allow TCP 4444 to forensic server
# Option B: VLAN change (if managed switch accessible)
# Contact network team to move port to quarantine VLAN
# Option C: Physical disconnect (last resort — loses remote access)
# Unplug the network cable
# PROCESS TERMINATION — stop active encryption (emergency only)
# Kill the ransomware process if identified (risks triggering cleanup routine)
$proc = Get-Process | Where-Object {$_.Name -like "*update*"}
Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue
# IDENTIFY Shadow Copy deletion commands in recent history
Get-WinEvent -LogName Security | Where-Object {$_.Message -like "*vssadmin*" -or
$_.Message -like "*shadowcopy*"} | Select-Object -First 10
T1490 — Shadow Copy Status Check
# Verify if shadow copies still exist (critical for recovery options)
vssadmin list shadows
# If shadow copies exist → protect them immediately
# Block VSS deletion commands via GPO or just document their existence
# Schedule KAPE collection to include VSS via --vss flag
# If shadow copies are deleted (most ransomware does this):
# Check Windows Event Log 8222 for shadow copy deletion event
Get-WinEvent -LogName "Microsoft-Windows-StorageManagement/Operational" |
Where-Object {$_.Id -eq 8222}
# For LockBit/BlackCat/BlackMatter — they delete VSS before encryption
# Recovery requires external backup or paying ransom
# Backup integrity check
wbadmin get versions
# Lists all Windows Server Backup versions — verify most recent is intact
# Also check: are backup files encrypted? (some ransomware targets backup directories)
Scope Assessment
# Identify all encrypted hosts via EDR (pseudo-code — adjust for your EDR)
# Look for: high volume file rename events, VSS deletion, ransom note creation
# Via Active Directory — find all computers that beaconed the ransomware domain
Get-ADComputer -Filter * -Property LastLogonDate |
Where-Object {$_.LastLogonDate -gt (Get-Date).AddDays(-1)} |
Select-Object Name, LastLogonDate
# File extension sweep — find hosts with encrypted extensions
# Velociraptor VQL fleet hunt:
# SELECT Fqdn, OSPath FROM glob(globs=["C:/Users/**/*.locked"])
# Check event logs across all DCs for ransomware execution timeline
# Event 4688 (process creation) with ransomware binary name
# Event 7045 (service installed) — some ransomware installs as a service