CHAPTER 01 25 MIN READ BEGINNER

Threat Hunting Foundations

Your SIEM fired 12,000 alerts last week. Your team triaged 900 of them. An adversary who breached you on Monday is still on your network on Friday, silent and undetected, because nothing they did matched a signature. Threat hunting is how you find that adversary. It is not a tool. It is a process, driven by human analysis, that assumes the adversary is already inside and asks: what evidence would they leave?

foundations SOC mindset
New to security? This chapter assumes you already know the CIA triad, common attack types, and the Cyber Kill Chain / ATT&CK. If any of that is unfamiliar, start with the Fundamentals module first.

What Is Threat Hunting?

The Core Definition

Threat hunting is a proactive, analyst-led, iterative search for adversaries that are already present in an environment but have not triggered existing detection controls. The operative word is proactive. You do not wait for an alert. You go looking.

The core question threat hunting answers is: "If an adversary is already here, what evidence exists?" Every hunt starts from that assumption. The adversary is assumed to be present. The hunt is an investigation to find or rule out their presence.

Hunting vs. Alert Triage

Hunting inverts the alert-triage model. Here is the same process compared side by side:

Alert Triage Threat Hunting
Who drives it The tool The analyst
Starting point An alert fires An analyst forms a belief about adversary behavior
Requires a signature Yes, depends on known-bad indicators No, a hypothesis replaces the rule
What happens when there is no match No alert fires, triage never begins The hunt queries data anyway to test the belief
Note: Hunting is not incident response. Incident response begins when a threat is confirmed. Hunting begins before confirmation, with the assumption that a threat may exist. If a hunt finds something, it hands off to IR. The disciplines are complementary, not overlapping.

Origins and Scale

  • 2015, Sqrrl: formalized the modern definition of threat hunting, publishing the Hunting Maturity Model and the hunting loop concept.
  • CrowdStrike OverWatch: operationalized hunting as a managed service. Its threat graph processes over 3 trillion events per week and interrupted more than 41,000 intrusion attempts in the first half of 2020 alone, attempts that would have been missed without a human-led hunt function on top of automated detection.

Why "Assume Breach" Matters

The "assume breach" mindset is not paranoia. It is a calibrated response to the reality that no detection system catches everything. Zero Trust architecture bakes this assumption into network and identity design, and threat hunting operationalizes it at the detection layer.

Mindset What It Drives Result
Assume breach Build the security program to find the adversary quickly Faster detection
Assume the perimeter holds Rely on prevention alone Adversary found in 197 days on average
Tip: The clearest test of whether something is hunting: did a human form a hypothesis before querying data? If yes, it is hunting. If an automated rule fired and a human is investigating the result, it is alert triage. Both are necessary. Only one is proactive.

The Detection Gap

The 197-Day Number

IBM's 2023 Cost of a Data Breach report found an average dwell time of 197 days before detection. Some organizations find adversaries faster now, and median dwell times have improved. But the mean remains high because outliers, the adversaries who stay for months or years, pull the average up. For every breach caught in a week, another goes undetected for a year.

That 197-day window is the detection gap. Your tools were running. Your team was working. The adversary operated undetected anyway.

Why Detection Has Structural Limits

The reason is structural. Most detection relies on two mechanisms, and both have known blind spots:

  • Signatures work well against commodity threats but fail against novel malware, living-off-the-land binaries (LOLBins), and advanced actors who deliberately avoid known-bad indicators.
  • Threshold-based alerts catch volume anomalies but miss slow, low-volume operations.

Alert Fatigue at Scale

SOCs also face alert fatigue at scale. Red Canary analyzed 329 billion records per day across 1,700 organizations, and the volume narrows sharply on the way to a confirmed threat:

1
329B Records/Day
Raw telemetry across 1,700 organizations
→
2
419M Leads
Investigative leads generated
→
3
8.5M Events
Filtered to potentially malicious events
→
4
110,000 Threats
Confirmed actual threats, roughly a 3,800:1 ratio

For every confirmed threat, analysts review thousands of false positives. True positives get buried.

Warning: Most detections catch known-bad. Hunting finds the novel, the stealthy, and the living-off-the-land. A SOC with no hunting function is entirely dependent on the adversary making a mistake that matches a pre-written rule. Modern adversaries study those rules and avoid triggering them.

The Pyramid of Pain

The Pyramid of Pain illustrates why signature-based detection has structural limits: the higher an indicator sits, the more it costs an adversary to change it.

Level (base to apex) Example Cost to Adversary
Hash values File hashes caught by AV Trivial, defeated by recompiling
IP addresses C2 or exfil endpoints Easy to rotate
Domain names C2 or phishing infrastructure Cheap to register
Network / host artifacts File paths, registry keys, mutexes More effort to change
Tools Malware families, frameworks Harder, requires rewriting capabilities
TTPs PowerShell execution, lateral movement via SMB Expensive, baked into tradecraft

Hunting operates at the TTP level. It asks "what behaviors would this technique produce?" not "does this hash match our blocklist?" That is why it finds what signatures miss.

Dimension Reactive (Alert-Based) Proactive (Hunting-Based)
Trigger Tool fires an alert Analyst forms a hypothesis
Data Focus Alert queue, known-bad indicators Raw telemetry, behavioral patterns
Skill Required Alert triage, playbook execution ATT&CK knowledge, query writing, baseline understanding
Output Ticket closed / escalated Threat confirmed or ruled out + new detection rules
Time Horizon Minutes to hours post-alert Hours to days, covers historical data

SOC Maturity and Hunt Readiness

Maturity Levels and Hunt Readiness

You cannot hunt without data. You cannot hunt effectively without a baseline. SOC maturity determines what kind of hunting is possible, not whether hunting is possible. Even L2 teams can perform basic TTP hunts if they have endpoint telemetry and a query tool.

Level Capability Hunt Readiness First Recommended Step
L1 Reactive, alert-only, minimal log collection Not ready Enable Windows Security event logging and forward to any SIEM
L2 Basic SIEM correlation, signature-based detection Limited Enable 4688 CommandLine auditing and deploy basic Sysmon config
L3 Threat intel integrated, some behavioral detection Ready for hypothesis-driven hunts Pick one ATT&CK technique, write your first hunt query
L4 Hypothesis-driven hunting, structured process Full hunting capability Formalize methodology (PEAK or TaHiTI), track hunt backlog
L5 Automated hunting, ML-assisted, continuous Proactive + automated Integrate Model-Assisted Threat Hunting (M-ATH), close feedback loop

What L3 Requires

Hunting lives at L3 and above. To hunt meaningfully, you need three things to converge:

  • Log coverage: sufficient telemetry across your environment.
  • Behavioral baseline: a picture of normal, so deviations stand out.
  • Threat intelligence: to inform what you actually hunt for.
Tip: You do not need L5 to start hunting. L3 with good endpoint telemetry is enough. Deploy Sysmon, enable Script Block Logging, forward to your SIEM, and you have the raw material for dozens of meaningful hunts.

The Model Is a Map, Not a Gate

The maturity model is not a gate. It is a map. A team at L2 who understands their gap can prioritize telemetry improvements specifically to enable hunting. That prioritization is more effective than general "improve logging" initiatives because it ties each log source to a specific hunt capability.

CrowdStrike OverWatch operates at the far end of this spectrum: a team of dedicated hunters with access to a threat graph ingesting trillions of events per week, tracking 140+ named adversary groups. That is not a benchmark for most organizations. The relevant insight from their work is the methodology and the adversary behaviors they consistently find. The volume scales down. The techniques do not change.

Hunting vs. IR vs. Threat Intelligence

Comparing the Three Disciplines

These three disciplines are often confused, sometimes merged, and occasionally treated as the same job. They are not. Each has a distinct trigger, goal, primary input, and output. Understanding the difference matters because conflating them produces worse results in all three areas.

Dimension Threat Hunting Incident Response Threat Intelligence
Trigger Hypothesis / scheduled cadence Confirmed alert or report Collection requirement / new report
Goal Find what was missed by detection Contain, eradicate, recover Produce finished intel product
Primary Input Hypothesis + raw telemetry Incident artifacts + forensics Raw reporting + OSINT + feeds
Output Detections + new hypotheses Incident closure report Threat report / IOC feed / brief
Who Threat hunter / senior analyst IR analyst / DFIR team CTI analyst
When Proactive, before known compromise Reactive, after confirmation Continuous collection + periodic production

The Feedback Loop

The three disciplines form a feedback loop. Each one feeds the others.

Worked Example: the loop in motion
1
CTI Publishes
"APT29 targeting financial services with BITS job persistence (T1197)."
→
2
Hunter Hypothesizes
Hunts for BITSAdmin.exe spawning from unusual parents or downloading from external hosts.
→
3
Hunt Finds, Escalates
A suspicious BITS job on a finance workstation is escalated to IR.
→
4
IR Confirms
Investigates, confirms compromise, documents the full attack chain.
→
5
CTI Updates
The incident report feeds back into an updated APT29 profile and brief.
→
6
Loop Continues
The hunter uses the updated brief to generate three more hypotheses.

Each discipline is a node in the same network. CTI without hunting is intelligence that never gets tested. Hunting without CTI is searching without direction. IR without hunting misses the full scope of compromise. Together, they close the detection gap.

Thinking Like an Adversary

From Alerts to Artifacts

The most important shift in threat hunting is not technical. It is conceptual. Stop asking "what do my alerts say?" Start asking "what would an attacker do here, and what evidence would they leave behind?"

Every action an attacker takes produces artifacts recorded in your logs, for example:

  • Process creation events
  • Registry modifications
  • Network connections
  • File writes
  • Authentication events

The adversary's goal is to minimize their footprint, but they cannot operate without leaving traces. Your job is to know what traces each technique produces and go looking for them.

Mapping ATT&CK Phases to Artifacts

Walk through the ATT&CK lifecycle with this question in mind for each phase:

ATT&CK Phase Adversary Goal Key Artifacts Left Behind Primary Event IDs
Initial Access Get code execution on a target Office process spawning cmd.exe, exploit artifacts, macro execution logs 4688 (process creation), Sysmon 1, 4104 (script block)
Execution Run malicious code Process creation events, PowerShell script block logs, script interpreter activity 4688, Sysmon 1, 4103, 4104
Persistence Survive reboots, maintain access Registry run key writes, scheduled task creation, new service installs 4657 (registry), 4698 (scheduled task), 7045 (service), Sysmon 13
Lateral Movement Reach higher-value targets Network logon events, Kerberos tickets, WMI remote execution, SMB access 4624 Type 3, 4769, 5140, Sysmon 3
Collection / Exfil Extract target data Large outbound transfers, archive file creation, cloud upload utility execution Sysmon 3 (network), Sysmon 11 (file create), proxy/DNS logs

Case Study: Encoded PowerShell

Worked Example: T1059.001 PowerShell Encoded Command

An attacker sends a phishing email with a macro-enabled document. The victim opens it and enables macros. The macro spawns PowerShell with a Base64-encoded command: powershell.exe -enc JABjAD0ATgBlAHcA.... The encoded command downloads a second-stage payload from an attacker-controlled domain and executes it in memory.

What artifacts does this leave?

  • Event 4688 / Sysmon 1: Process creation. powershell.exe spawned by WINWORD.EXE. Parent process is abnormal. CommandLine contains -enc flag. This is the first indicator.
  • Event 4104 (Script Block Log): PowerShell decodes and logs the full decoded script before execution. If Script Block Logging is enabled, you see the decoded payload, including the download URL. This is the richest evidence source.
  • Sysmon Event 3 (Network Connection): powershell.exe establishes an outbound TCP connection to an external IP on port 443. Domain had low reputation and was registered recently.
  • Sysmon Event 22 (DNS Query): powershell.exe queries the C2 domain immediately before the network connection. If you see Sysmon 22 from powershell.exe to a domain not matching known software update infrastructure, investigate it.

A hunter who understands this chain does not wait for an alert. They proactively query: PowerShell with -enc flag, parent process is an Office application, followed within 60 seconds by an outbound network connection. That pattern has a very small legitimate population. Any results warrant investigation.

Note: The adversary mindset is not about assuming every event is malicious. It is about knowing which combinations of events are uncommon in a healthy environment. Rare combinations are where threats hide. Your baseline knowledge of "normal" is what makes the abnormal visible.

Prerequisites for an Effective Hunt

Four pillars determine whether a hunt produces results: Data, Tools, Process, and People. Weakness in any one limits the entire hunt. Most teams underinvest in Data and Process while overestimating what Tools alone can do.

Data: Minimum Viable Telemetry

These are the log sources you need before a meaningful hunt is possible. Each one maps directly to specific ATT&CK techniques.

Log Source Key Events / Config ATT&CK Coverage Enabled
Windows Security 4624, 4625, 4648, 4688 (with CommandLine), 4698, 4768, 4769, 5140 Execution, Persistence, Lateral Movement, Credential Access
Sysmon Events 1, 3, 7, 10, 11, 13, 22, 25 (minimum config) Process activity, Network, DLL loads, Credential theft, Persistence, C2
PowerShell 4103 (Module Logging), 4104 (Script Block Logging) Execution, Defense Evasion, encoded/obfuscated scripts
Windows System 7045 (new service) Persistence via service installation
DNS Windows DNS debug log, Sysmon 22, EDR DNS telemetry C2 communication, DGA domains, DNS tunneling

Tools: Minimum Viable Stack

Three tools form the floor. You can hunt with these:

  • SIEM or query engine for searching logs.
  • EDR for process and memory telemetry, richer data than Windows event logs alone.
  • Threat intelligence source, even a free one like MITRE ATT&CK or open-source CTI feeds, to seed hypotheses.

Process: Repeatability

Ad hoc hunting is better than no hunting. But it does not scale. A documented process ensures that every hunt produces artifacts that other analysts can build on. Chapter 3 covers the major frameworks: PEAK, TaHiTI, and SANS PAM. Pick one and use it consistently from day one.

People: Analyst Baseline Knowledge

The hunter needs three skills:

  • Knowledge of ATT&CK techniques relevant to your environment's threat model.
  • Knowledge of what "normal" looks like in your environment: which processes run on which hosts, what the normal network flows are, what legitimate admin activity looks like.
  • Proficiency in at least one query language: KQL, SPL, SQL, or XQL depending on your stack.
Tip: You can hunt with Windows Event Logs alone. It is harder, but possible. You cannot hunt without logs. Before your first hunt, run a data audit: for each log source in the minimum viable list above, confirm it is collected, retained for at least 30 days, and contains the expected fields. Missing CommandLine in 4688 events is the most common gap that breaks PowerShell hunts before they start.

The following query is a first hunt for any analyst with endpoint telemetry and a KQL-capable tool. It detects encoded PowerShell commands, one of the most consistent attacker behaviors across all threat actor groups. Red Canary has tracked PowerShell (T1059.001) in the top attacker techniques for five consecutive years.

KQL
// Chapter 1 starter: Hunt for encoded PowerShell commands (T1059.001 + T1027)
// This is one of the most consistent attacker behaviors across all threat actor groups
DeviceProcessEvents
| where FileName =~ "powershell.exe" or FileName =~ "pwsh.exe"
| where ProcessCommandLine has_any ("-enc", "-EncodedCommand", "-en ", "-e ")
| where InitiatingProcessFileName !in~ ("explorer.exe", "services.exe", "svchost.exe")
| project Timestamp, DeviceName, AccountName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine
| order by Timestamp desc

This query surfaces PowerShell invocations with encoding flags that did not originate from common legitimate parents. Results require analyst review. You will see some legitimate automation. The goal at this stage is to understand your population, not to auto-close results. Every legitimate result teaches you your baseline. Every suspicious result is the start of a hypothesis.

Note: The -e flag alone can match legitimate PowerShell. If you get high noise from that term, remove it from the has_any list and start with -enc and -EncodedCommand only. Tuning is normal. Document each exclusion and why you made it.

Key Takeaways

  • Threat hunting is proactive, analyst-led, and assumes the adversary is already present. It is not incident response and it is not alert triage.
  • The average dwell time before detection is 197 days (IBM 2023). The detection gap between "we have an alert policy" and "we actively look for what alerts miss" is what hunting fills.
  • Signatures cover known-bad. Hunting covers TTP-level behavior at the top of the Pyramid of Pain, where adversary tradecraft is expensive to change.
  • Hunting requires L3+ SOC maturity: threat intel integration, behavioral detection capability, and sufficient telemetry baseline. But you can start building that foundation at L2.
  • Hunting, IR, and CTI form a feedback loop. Each discipline feeds the others. Treating them as isolated functions weakens all three.
  • The adversary mindset: every technique leaves artifacts. Know which event IDs each ATT&CK phase produces. Hunt for those patterns, not just for known-bad signatures.
  • Minimum viable telemetry: Windows Security events with CommandLine in 4688, Sysmon with Events 1/3/7/10/11/13/22, and PowerShell Script Block Logging (Event 4104).

Knowledge Check

Click an answer to reveal the explanation.

Q1. Which statement best defines threat hunting?

  • A. Investigating alerts generated by a SIEM or EDR tool
  • B. Containing and eradicating a confirmed threat after an incident is declared
  • C. A proactive, analyst-led search for adversaries evading existing detection controls
  • D. Automating threat detection using machine learning models

Q2. According to IBM's 2023 data, what is the average dwell time before a breach is detected?

  • A. 21 days
  • B. 90 days
  • C. 197 days
  • D. 365 days

Q3. At which SOC maturity level does hypothesis-driven threat hunting become realistic?

  • A. L1 (reactive, alert-only)
  • B. L2 (basic SIEM correlation)
  • C. L3 (threat intel integrated, behavioral detection)
  • D. L5 (automated hunting, ML-assisted)

Q4. What is the primary distinction between threat hunting and incident response?

  • A. IR uses tools, hunting uses manual analysis only
  • B. Hunting only covers network threats, IR covers endpoint threats
  • C. IR begins after a threat is confirmed; hunting begins before confirmation, assuming presence
  • D. There is no meaningful distinction; both terms describe the same activity

Q5. Which Windows event log provides the richest detail for hunting PowerShell-based attacks, including decoded script content?

  • A. Event 4688 (Process Creation)
  • B. Event 4624 (Logon Success)
  • C. Event 4104 (PowerShell Script Block Logging)
  • D. Event 7045 (New Service Installed)