SOC Operations

Threat Hunting

Proactive Adversary Detection

15 min read

Table of Contents
  1. What is Threat Hunting?
  2. The Hunting Process
  3. MITRE ATT&CK Framework
  4. Example Hunt Scenarios
  5. Tools & Data Sources

What is Threat Hunting?

Threat hunting is the proactive search for adversaries in your environment. Unlike detection (reactive, alert-driven), hunting assumes attackers may already be inside and actively looks for them.

Reactive vs Proactive

Detection (Reactive)Wait for alerts from SIEM/EDR
Hunting (Proactive)Form hypothesis, search for evidence

The Hunting Process

  1. Hypothesis: Form a theory based on threat intel, ATT&CK, or anomalies
  2. Collect Data: Gather relevant logs (endpoint, network, auth)
  3. Analyze: Search for indicators, patterns, anomalies
  4. Investigate: Drill down into suspicious findings
  5. Document: Record findings, create detections for future

MITRE ATT&CK Framework

Use ATT&CK to structure your hunts around known adversary techniques:

Initial AccessPhishing, exploits, valid accounts
ExecutionPowerShell, WMI, scripting
PersistenceRegistry run keys, scheduled tasks
Privilege EscalationToken manipulation, UAC bypass
Defense EvasionObfuscation, disable security
Lateral MovementRDP, SMB, Pass-the-Hash
ExfiltrationHTTP, DNS tunneling, cloud storage

Example Hunt Scenarios

Hunt: PowerShell Encoded Commands

Hypothesis: Attackers use base64-encoded PowerShell to evade detection.

# Splunk Query
index=windows EventCode=4104 
| regex ScriptBlockText="(?i)(encodedcommand|frombase64)"
| stats count by ComputerName, UserName

Hunt: Unusual Parent-Child Processes

Hypothesis: Malware spawns processes from unusual parents (e.g., Word spawning cmd.exe).

# Elastic Query
process.parent.name: ("winword.exe" OR "excel.exe") AND
process.name: ("cmd.exe" OR "powershell.exe" OR "wscript.exe")

Hunt: Beaconing Detection

Hypothesis: C2 malware beacons at regular intervals.

# Zeek conn.log analysis
# Look for connections with consistent timing
cat conn.log | zeek-cut ts id.orig_h id.resp_h id.resp_p | \
    awk '{print $2, $3, $4}' | sort | uniq -c | sort -rn | head -20

Tools & Data Sources

Data Sources

Hunting Platforms

Updated: December 2024