Hunting Ransomware Indicators
Introduction
1. Identify Initial Compromise
DeviceFileEvents | where FileName endswith ".exe" or FileName endswith ".dll" or FileName endswith ".js" | where FolderPath startswith "C:\\Users\\Public\\Downloads\\" or FolderPath startswith "C:\\Temp\\" | where InitiatingProcessFileName in~ ("powershell.exe", "cmd.exe", "wscript.exe", "mshta.exe") | project DeviceName, FolderPath, FileName, InitiatingProcessFileName, InitiatingProcessCommandLine, TimestampDeviceLogonEvents | where Timestamp > ago(1d) | where LogonType == "RemoteInteractive" or LogonType == "Network" | where AccountName endswith "$" == false | where AccountDomain != "ExpectedDomain" | summarize count() by AccountName, DeviceName | where count_ > 32. Trace Lateral Movement and Privilege Escalation
DeviceProcessEvents | where InitiatingProcessFileName in ("psexec.exe", "wmic.exe", "powershell.exe") | where ProcessCommandLine contains "Invoke-Command" or ProcessCommandLine contains "-EncodedCommand" | summarize count() by DeviceName, InitiatingProcessFileName, InitiatingProcessAccountName | where count_ > 5 | project DeviceName, InitiatingProcessFileName, InitiatingProcessAccountName3. Detect Encryption Activity
4. Persistence Mechanisms and Cleanup
5. Analyse Network Traffic for C2 Communication
6. Isolate Affected Devices
7. Post-Incident Analysis and Cleanup
Step 1: Detection and Triage
Step 2: Analyse Initial Access and Execution
Step 3: Contain and Isolate
Step 4: Eradication
Step 5: Recovery and Post-Incident Analysis
Advanced Analysis Queries
Summary
1. Initial Preparation
2. Advanced KQL Queries for Ransomware Detection
Last updated