Why SOC Analysts Need Malware Analysis Skills
Malware analysis is often seen as the exclusive domain of dedicated reverse engineers. But every L2+ SOC analyst should be able to perform basic behavioural analysis — enough to triage a suspicious file, extract network indicators, and determine whether a sample is benign, a known family, or something novel requiring escalation.
You do not need to read assembly to do useful malware analysis. Static properties and dynamic behaviour give you 80% of what you need for triage and IOC extraction.
The goal for most SOC analysts is not full reverse engineering — it's fast triage: is this malicious? What does it do? What network connections does it make? What persistence does it establish? Those questions can be answered with the right tools and methodology in under 30 minutes.
Safe Lab Setup
A Linux VM pre-built for malware analysis — network simulators, static analysis tools, sandbox environments, and disassemblers all pre-installed. Start here.
A Windows VM with analysis tools — needed for Windows malware that requires a real Windows environment to detonate. Always snapshot before detonation.
Network simulation tool that responds to DNS, HTTP, SMTP and other protocols — lets malware think it has internet access without actual internet exposure.
Capture all network traffic during dynamic analysis — even if malware uses encrypted C2, the connection patterns, destination IPs, and timing are valuable.
Never analyse malware on a production machine or a machine connected to your production network. Always use isolated VMs with no host-only network access to internal resources. Snapshot before detonation. Reset after every sample.
Static Analysis — Before You Run It
Static analysis examines the file without executing it. It is safe, fast, and often sufficient for triage.
# 1. Hash the sample — check against VirusTotal
sha256sum suspicious.exe
# curl -s -H x-apikey:VT_KEY https://www.virustotal.com/api/v3/files/HASH
# 2. File type — is it really an EXE? PE32? DLL?
file suspicious.exe
exiftool suspicious.exe
# 3. Strings — printable strings reveal IOCs
strings -n 8 suspicious.exe | grep -E "http|\.exe|\.dll|registry|HKEY"
# 4. PE headers — imports reveal capabilities
pecheck suspicious.exe
# Look for: CreateRemoteThread, VirtualAllocEx, WriteProcessMemory (injection)
# Look for: WinInet, WS2_32 (networking), Crypt* (encryption/C2 comms)
# 5. Packing detection — packed samples need dynamic analysis
die suspicious.exe # Detect-It-EasyDynamic Analysis — Watch It Run
Dynamic analysis executes the sample in a controlled environment and observes behaviour. It reveals what static analysis misses — decrypted payloads, runtime-generated domains, and exact persistence mechanisms.
# Start INetSim on REMnux to simulate internet
sudo inetsim
# Start Wireshark to capture traffic
wireshark -i eth0 -w capture.pcap
# On Windows Flare-VM, monitor with Process Monitor + Autoruns
# Enable all categories in Procmon before detonation:
# Registry — what keys are created/modified?
# File System — what files are dropped?
# Network — what connections are made?
# Process — what child processes are spawned?
# Detonate the sample and observe for 3–5 minutes
suspicious.exe| Behaviour | What It Means | Detection |
|---|---|---|
| Creates registry Run key | Persistence mechanism | T1547.001 — Registry Run Keys |
| Spawns cmd.exe/powershell.exe | Code execution, staging | T1059 — Command Scripting |
| Injects into svchost.exe | Process injection, evasion | T1055 — Process Injection |
| DNS lookup then HTTP GET | C2 beaconing | T1071.001 — Web Protocols |
| Accesses LSASS memory | Credential theft | T1003.001 — LSASS Dump |
| Mass file rename | Ransomware encryption | T1486 — Data Encrypted for Impact |
Extracting Actionable IOCs
from scapy.all import rdpcap, DNS, DNSQR
import re
packets = rdpcap(capture.pcap)
domains, ips = set(), set()
for pkt in packets:
if pkt.haslayer(DNSQR):
domains.add(pkt[DNSQR].qname.decode().rstrip(.))
if pkt.haslayer(IP):
ips.add(pkt[IP].dst)
print(Domains:, domains)
print(IPs:, ips)Writing YARA Rules from Analysis Findings
rule Trojan_Dropper_Generic_001 {
meta:
author = Sid Faza
description = Dropper observed writing payload to Temp and establishing Run key persistence
date = 2024-12-01
mitre = T1547.001, T1059.001
strings:
$reg1 = CurrentVersion\\Run wide ascii nocase
$drop1 = %TEMP%\\ wide ascii nocase
$ps1 = powershell wide ascii nocase
$c2 = maliciousdomain.com wide ascii
condition:
uint16(0) == 0x5A4D // MZ header and
2 of ($reg1, $drop1, $ps1) and $c2
}The 30-Minute Triage Workflow
| Minute | Step | Tool | Output |
|---|---|---|---|
| 0–3 | Hash & VT lookup | sha256sum + VT API | Known family / detection rate |
| 3–8 | Static properties | file, strings, pecheck | Packed? Suspicious imports? Strings IOCs? |
| 8–15 | Sandbox submission | Any.run or Cuckoo | Auto-extracted IOCs, behaviour summary |
| 15–22 | Dynamic analysis | Procmon + Wireshark | Network IOCs, persistence mechanism, child processes |
| 22–28 | IOC extraction | Custom scripts, MISP | Domains, IPs, hashes, registry keys, file paths |
| 28–30 | YARA rule & SIEM | YARA, Sigma | Permanent detection + ticket documentation |
After 30 minutes you should know: what the sample does, what IOCs to block, what MITRE techniques to reference, and whether you need to escalate to full reverse engineering.