Malware Attack Investigation Runbook
SOC & DFIR Operations Guide
Environment: Windows AD | Microsoft 365 | Defender XDR | Sentinel | Entra ID | Palo Alto Prisma Access
Overview & Scope
This runbook provides standardised procedures for investigating malware-based attacks across the hybrid enterprise environment. It covers detection, triage, investigation, containment, eradication, and recovery workflows using Microsoft Defender XDR, Sentinel, and Palo Alto Prisma Access.
Malware Categories
Ransomware
Encrypts files, demands payment
LockBit, BlackCat, Cl0p, Play
Trojans
Disguised malicious software
Emotet, TrickBot, QakBot
RATs
Remote Access Trojans for persistent access
Cobalt Strike, AsyncRAT, RemcosRAT
Infostealers
Credential and data theft
RedLine, Raccoon, Vidar, Lumma
Loaders/Droppers
Initial access, downloads additional payloads
IcedID, BumbleBee, Gootloader
Rootkits
Deep system persistence, evasion
BlackLotus, various bootkits
Fileless Malware
Memory-resident, LOLBins abuse
PowerShell-based, WMI persistence
Worms
Self-propagating network threats
Various SMB/network worms
Cryptominers
Unauthorized cryptocurrency mining
XMRig variants
Wipers
Data destruction
HermeticWiper, CaddyWiper
Common Attack Vectors
Phishing Emails
Malicious attachments/links
MDO, EmailEvents
Drive-by Downloads
Compromised websites
MDE, Prisma URL filtering
Supply Chain
Compromised software updates
MDE, application allow-listing
Removable Media
USB-based infection
MDE, DeviceEvents
Exploitation
Vulnerability exploitation
MDE, DeviceEvents
Malvertising
Malicious advertisements
Prisma Access, MDE
Social Engineering
User manipulation
MDO, user reporting
Detection Sources & Data Mapping
Log Sources Matrix
Defender for Endpoint
DeviceEvents
Process creation, file operations, registry
Defender for Endpoint
DeviceProcessEvents
Process execution, command lines
Defender for Endpoint
DeviceNetworkEvents
Network connections, DNS queries
Defender for Endpoint
DeviceFileEvents
File creation, modification, deletion
Defender for Endpoint
DeviceRegistryEvents
Registry modifications
Defender for Endpoint
DeviceImageLoadEvents
DLL loads, driver loads
Defender for Endpoint
DeviceLogonEvents
Authentication events
Defender for Endpoint
AlertInfo, AlertEvidence
Correlated alerts and evidence
Defender for Office
EmailEvents, EmailAttachmentInfo
Email metadata, attachments
Defender for Office
EmailUrlInfo, UrlClickEvents
URLs in emails, click tracking
Sentinel
SecurityAlert
Aggregated alerts from all sources
Sentinel
ThreatIntelligenceIndicator
IOC matches
Prisma Access
PaloAltoPrismaAccess
Network threats, URL categories
Critical MDE Alert Categories
Malware
Known malware detected
High-Critical
Ransomware
Ransomware behavior detected
Critical
Suspicious activity
Anomalous behavior patterns
Medium-High
Unwanted software
PUPs, adware, tools
Low-Medium
Exploit
Exploitation attempt detected
High-Critical
Persistence
Persistence mechanism detected
Medium-High
Lateral movement
Movement between systems
High
Command and control
C2 communication detected
High-Critical
Exfiltration
Data theft indicators
Critical
Defense evasion
Security tool tampering
High
Investigation Workflows
Malware Alert Triage
Objective: Quickly assess alert validity, determine scope, and prioritise response.
Step 1: Initial Alert Assessment
Review alert in Defender XDR incident queue
Check alert severity, category, and detection source
Identify affected device(s) and user(s)
Review MITRE ATT&CK techniques mapped to alert
Check if alert is part of larger incident (auto-correlated)
Step 2: Validate Detection
Review the specific file/process that triggered alert
Check file hash against VirusTotal and internal threat intel
Review file metadata: signer, compilation time, path
Examine parent-child process relationships
Determine if activity is expected (false positive check)
Step 3: Scope Assessment
Search for same IOCs across all endpoints
Check if other devices have similar alerts
Review user's recent email for delivery vector
Check network logs for related C2 traffic
Identify patient zero and initial access timeline
Step 4: Risk Classification
🔴 Critical
Ransomware, active C2, domain admin compromise
Immediate isolation
🟠 High
Confirmed malware, lateral movement, data staging
Isolate within 30 min
🟡 Medium
Suspicious activity, potential malware
Investigate within 4 hours
🟢 Low
PUP, adware, likely false positive
Next business day
Ransomware Investigation
Objective: Contain ransomware spread, identify scope, preserve evidence, and enable recovery.
Immediate Actions (First 15 Minutes)
Isolate affected devices via MDE device isolation
Disable compromised accounts if credentials suspected stolen
Block known IOCs at network perimeter (Prisma Access)
Alert incident response team and leadership
Preserve volatile evidence if possible
Step 1: Identify Ransomware Variant
Review ransom note filename and content
Check encrypted file extension
Submit sample to threat intel platforms
Identify known decryptors if available
Document ransomware family and known TTPs
Step 2: Determine Patient Zero
Query earliest file encryption events across environment
Identify initial infected device by timestamp
Review device timeline for initial access vector
Check email logs for phishing delivery
Examine network logs for exploitation attempts
Step 3: Map Lateral Movement
Query authentication events from patient zero
Identify all accessed systems and shares
Check for credential harvesting tools (Mimikatz, etc.)
Review network connections to other endpoints
Document full scope of compromise
Step 4: Identify Data Exfiltration
Check for large data transfers before encryption
Review cloud storage uploads (OneDrive, SharePoint)
Examine network traffic to unknown external IPs
Check for staging directories
Identify potentially exfiltrated data types
Step 5: Containment & Eradication
Extend isolation to all affected devices
Block all identified C2 infrastructure
Reset credentials for affected users
Remove persistence mechanisms
Scan and clean all affected systems
Fileless Malware Investigation
Objective: Detect and investigate memory-resident and LOLBin-based malware.
Detection Indicators
PowerShell with encoded commands (-enc, -e, -encodedcommand)
WMI/CIM for execution or persistence
Unusual parent-child process relationships
LOLBAS tool abuse (certutil, mshta, regsvr32, rundll32)
.NET assembly loading in memory
Reflective DLL injection
Process hollowing indicators
Investigation Steps
Review process command lines for obfuscation
Decode Base64/encoded PowerShell commands
Analyse script block logging events
Check for WMI subscriptions and persistence
Review scheduled tasks for suspicious entries
Examine registry run keys and startup locations
Analyse memory dumps if available
Key LOLBins to Monitor
powershell.exe
Script execution, download cradles
Encoded commands, web requests
cmd.exe
Command execution
Unusual parent, obfuscation
mshta.exe
HTA execution, proxy execution
Network connections, child processes
certutil.exe
Download files, decode payloads
-urlcache, -decode flags
regsvr32.exe
Proxy execution, COM objects
/s /u /i: parameters
rundll32.exe
DLL execution, proxy
Unusual DLLs, network activity
wmic.exe
WMI queries, remote execution
/node:, process calls
msiexec.exe
MSI installation from URL
/q /i http://
bitsadmin.exe
File downloads
/transfer, /download
cscript/wscript
Script execution
Unusual scripts, network calls
Email-Based Malware Investigation
Objective: Investigate malware delivered via email, identify all recipients, and remediate.
Step 1: Identify Malicious Email
Query EmailEvents for the malicious message
Extract sender, subject, recipient(s), and timestamps
Identify attachment details or malicious URLs
Check if email passed or was caught by MDO
Determine delivery status to all recipients
Step 2: Recipient Analysis
List all recipients of the malicious email
Identify who opened/clicked the email
Check UrlClickEvents for link interactions
Review endpoint alerts for recipients
Prioritise users who interacted with content
Step 3: Email Artifact Analysis
Extract and analyse attachment hashes
Submit to sandbox for detonation
Review URL reputation and redirects
Check for known phishing kit indicators
Document all IOCs from email
Step 4: Remediation
Purge malicious email from all mailboxes
Block sender domain/address
Add URL/hash to block lists
Notify users who received email
Reset credentials if any user interacted
KQL Query Cheat Sheet
Device Process Analysis
Suspicious Process Execution
Process Tree Analysis
Encoded PowerShell Detection
Malware Detection Queries
New/Rare Executables
Suspicious File Drops
Ransomware Behaviour Detection
Network & C2 Detection
Suspicious Outbound Connections
Beaconing Detection
DNS Anomaly Detection
Persistence Detection
Registry Persistence
Scheduled Task Creation
Service Installation
WMI Persistence
Email Malware Queries
Malicious Attachment Hunt
URL Click Analysis
Emails with Password-Protected Attachments
Threat Hunting Queries
Hunt for Cobalt Strike Indicators
Hunt for Mimikatz Activity
Living Off the Land Detection
Response Actions & Remediation
Immediate Containment Actions
Active Malware
Isolate device
MDE → Device page → Isolate device
Ransomware
Network isolation
Isolate + disable network shares
C2 Communication
Block C2 IPs/domains
Prisma Access + MDE custom indicators
Compromised Account
Disable account
Entra ID + on-prem AD
Malicious Email
Purge from mailboxes
MDO → Threat Explorer → Soft/Hard delete
Malicious File
Block by hash
MDE → Indicators → Add file hash
MDE Live Response Commands
Evidence Collection
Remediation Commands
Network Containment (Prisma Access)
Block malicious URL
URL Filtering → Custom Categories
Add URL to block category
Block C2 IP
Security Policy → External Dynamic Lists
Add IP to block list
Block file hash
Threat Prevention → Antivirus
Add to custom signature
Isolate user traffic
GlobalProtect → HIP Profiles
Quarantine non-compliant
Post-Incident Remediation Checklist
Eradication
[ ] Remove all malware files from affected systems
[ ] Delete persistence mechanisms (registry, scheduled tasks, services)
[ ] Remove malicious accounts created by attacker
[ ] Clear cached credentials on affected systems
[ ] Reset passwords for compromised accounts
[ ] Revoke all sessions for affected users
[ ] Block all identified IOCs at all layers
Recovery
[ ] Restore systems from clean backups if needed
[ ] Rebuild compromised systems if necessary
[ ] Verify integrity of restored data
[ ] Re-enable disabled accounts after password reset
[ ] Remove device isolation in phases
[ ] Monitor recovered systems closely for 72 hours
Hardening
[ ] Patch exploited vulnerabilities
[ ] Review and tighten application control policies
[ ] Enable ASR rules relevant to attack technique
[ ] Update email filtering rules
[ ] Review firewall rules and network segmentation
[ ] Conduct user awareness training if phishing-based
Quick Reference Cards
Malware Analysis Checklist
1
Collect file hash (SHA256)
MDE, PowerShell
2
Check reputation
VirusTotal, MDE TI
3
Analyze strings
FLOSS, strings
4
Sandbox detonation
MDE Deep Analysis, Any.Run, Joe Sandbox
5
Review network IOCs
Sandbox report, Wireshark
6
Extract config
Malware-specific tools
7
Document TTPs
MITRE ATT&CK mapping
File Hash Quick Check
Common Malware File Locations
%TEMP%
Initial payload drops
%APPDATA%
User-level persistence
%LOCALAPPDATA%
User-level persistence
%PROGRAMDATA%
System-wide persistence
C:\Users\Public
Shared access drops
%WINDIR%\Temp
System temp drops
%WINDIR%\Tasks
Scheduled task abuse
Recycle Bin ($Recycle.Bin)
Hidden storage
Attack Stage Indicators
Delivery
Phishing email, malicious download
EmailEvents, DeviceNetworkEvents
Exploitation
Vulnerability trigger, macro execution
DeviceEvents, DeviceProcessEvents
Installation
File drops, registry changes
DeviceFileEvents, DeviceRegistryEvents
C2
Beaconing, DNS queries
DeviceNetworkEvents
Actions
Data staging, lateral movement
DeviceFileEvents, DeviceLogonEvents
Exfiltration
Large transfers, cloud uploads
DeviceNetworkEvents, CloudAppEvents
Escalation Matrix
Severity Classification
🔴 Critical
Active ransomware, confirmed C2, data exfiltration in progress, wiper malware
Immediate - 15 min
🟠 High
Confirmed malware execution, lateral movement, credential theft tools
30 min - 1 hour
🟡 Medium
Suspicious execution blocked, potential malware, single endpoint
4 hours
🟢 Low
PUP detected, adware, blocked download attempt
Next business day
Escalation Triggers
>5 endpoints with same malware
Tier 2 SOC
Any ransomware detection
Tier 2 SOC + DFIR
Domain controller affected
DFIR + Identity Team + Leadership
Confirmed data exfiltration
DFIR + Legal + Leadership
Supply chain compromise suspected
DFIR + Leadership + External IR
Critical business system affected
DFIR + Business Owner + Leadership
Communication Templates
Initial Notification (Internal)
MITRE ATT&CK Mapping
Initial Access
Phishing: Attachment
T1566.001
Malicious attachment detected
EmailAttachmentInfo
Phishing: Link
T1566.002
Malicious URL clicked
UrlClickEvents
Drive-by Compromise
T1189
Browser exploitation
DeviceProcessEvents
Supply Chain
T1195
Compromised software
DeviceFileEvents
External Remote Services
T1133
VPN/RDP compromise
DeviceLogonEvents
Execution
PowerShell
T1059.001
Encoded commands, download cradles
DeviceProcessEvents
Command Shell
T1059.003
Suspicious cmd.exe usage
DeviceProcessEvents
Windows Script Host
T1059.005
VBS/JS execution
DeviceProcessEvents
Mshta
T1218.005
HTA execution
DeviceProcessEvents
Regsvr32
T1218.010
Proxy execution
DeviceProcessEvents
Rundll32
T1218.011
DLL side-loading
DeviceProcessEvents
Persistence
Registry Run Keys
T1547.001
Run key modification
DeviceRegistryEvents
Scheduled Task
T1053.005
Task creation
DeviceEvents
Services
T1543.003
Service installation
DeviceEvents
WMI Subscription
T1546.003
WMI filter/consumer
DeviceEvents
Boot/Logon Scripts
T1037
Startup script
DeviceRegistryEvents
Defense Evasion
Process Injection
T1055
Remote thread creation
DeviceEvents
Masquerading
T1036
Renamed executables
DeviceProcessEvents
Obfuscated Files
T1027
Encoded payloads
DeviceProcessEvents
Disable Security Tools
T1562
AV/EDR tampering
DeviceEvents
Indicator Removal
T1070
Log clearing
DeviceEvents
Credential Access
LSASS Dump
T1003.001
LSASS access
DeviceEvents
SAM Dump
T1003.002
Registry SAM access
DeviceRegistryEvents
Credential Dumping
T1003
Mimikatz execution
DeviceProcessEvents
Keylogging
T1056.001
Keylogger installation
DeviceEvents
Command & Control
HTTP/HTTPS
T1071.001
Web traffic to C2
DeviceNetworkEvents
DNS
T1071.004
DNS tunneling
DeviceNetworkEvents
Non-Standard Port
T1571
Unusual ports
DeviceNetworkEvents
Encrypted Channel
T1573
SSL/TLS to C2
DeviceNetworkEvents
Exfiltration
Exfil Over C2
T1041
Large uploads to C2
DeviceNetworkEvents
Exfil Over Web
T1567
Cloud storage uploads
CloudAppEvents
Automated Exfil
T1020
Scheduled transfers
DeviceNetworkEvents
Appendix: Useful Commands
PowerShell Investigation
MDE Advanced Hunting in PowerShell
Network Analysis
Memory Analysis Prep
Evidence Collection Script
⚠️ Important: This runbook should be tested regularly through tabletop exercises and updated after each significant incident to incorporate lessons learned and emerging malware techniques.
Last updated