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

What Is Threat Hunting?

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.

This is meaningfully different from alert triage. Alert triage is reactive: a tool fires, an analyst investigates, the analyst closes or escalates. The tool drives the process. Alert triage depends on known-bad signatures. If the adversary's behavior does not match a signature, no alert fires, and triage never begins.

Hunting inverts that model. The analyst drives the process. The analyst forms a belief about what an adversary might be doing, then queries data to test that belief. No signature is required. The hypothesis replaces the rule.

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.

The modern definition of threat hunting was formalized around 2015 by Sqrrl, a threat intelligence company that published the Hunting Maturity Model and the hunting loop concept. CrowdStrike OverWatch operationalized it as a managed service, demonstrating at scale what a dedicated hunt team could find. Their threat graph processes over 3 trillion events per week and interrupted more than 41,000 intrusion attempts in the first half of 2020 alone. Those are attempts that would have been missed without a human-led hunt function on top of automated detection.

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. Threat hunting operationalizes it at the detection layer. If you assume breach, you build your security program to find the adversary quickly. If you assume your perimeter holds, you find them 197 days later.

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

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.

The reason is structural. Most detection relies on two mechanisms: known-bad signatures and threshold-based alerts. Signatures work well against commodity threats. They fail against novel malware, living-off-the-land binaries (LOLBins), and advanced actors who deliberately avoid known-bad indicators. Threshold alerts catch volume anomalies but miss slow, low-volume operations.

SOCs also face alert fatigue at scale. Red Canary analyzed 329 billion records per day across 1,700 organizations. That volume produced 419 million investigative leads, which filtered down to 8.5 million potentially malicious events, which confirmed as 110,000 actual threats. The ratio is roughly 3,800:1. 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 illustrates why signature-based detection has structural limits. At the base sit hash values: trivial to change, caught by AV, useless against a motivated actor who recompiles every sample. Moving up: IP addresses (easy to rotate), domain names (cheap to register), network and host artifacts (more effort to change), tools (harder, requires rewriting capabilities), and TTPs at the apex. TTPs, the actual techniques and procedures an adversary uses, are expensive to change. An actor cannot easily stop using PowerShell or lateral movement via SMB. Those behaviors are baked into their 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

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

Hunting lives at L3 and above. To hunt meaningfully, you need three things: logs with sufficient coverage, a baseline of normal behavior to spot deviations from, and threat intelligence to inform what you hunt for. L3 is when these three converge.

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 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

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 three disciplines form a feedback loop. Each one feeds the others.

Worked Example:

A CTI analyst publishes a report: "APT29 targeting financial services with BITS job persistence (T1197)." A threat hunter reads this report, forms a hypothesis, and runs a hunt for BITSAdmin.exe spawning from unusual parent processes or downloading from external hosts. The hunt finds a suspicious BITS job on a finance workstation. The hunter escalates to IR. IR investigates, confirms compromise, and produces an incident report documenting the full attack chain. The incident report feeds back to CTI, who updates the APT29 profile with newly confirmed TTPs. CTI publishes an updated brief. The hunter uses the updated brief to generate three more hypotheses about related techniques the actor may have used. The loop continues.

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

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. Process creation events, registry modifications, network connections, file writes, authentication events. These artifacts are recorded in your logs. 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.

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
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

A SIEM or query engine for searching logs. An EDR for process and memory telemetry, which provides richer data than Windows event logs alone. A threat intelligence source, even a free one like MITRE ATT&CK or open-source CTI feeds, to seed hypotheses. That is the floor. You can hunt with these three.

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, specifically which processes run on which hosts, what the normal network flows are, and 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)
VISITORS
VISITORS