Blue Teamby OneToSecure
Book a call

Chapter 04 · Threat hunting

Threat hunting: looking for what alerts cannot see

Automated detections catch what we know how to describe. Threat hunting starts from the opposite premise: an attacker may already be inside, silent. The hunter formulates hypotheses, digs through the data and turns every finding into a detection.

Chapter 04 of 094 min readUpdated

Silhouette walking with a lit flashlight through a snowy birch forest at dawn, in cold blue light
Approach
Hypothesis
Models
PEAK · TaHiTI
Outcome
New detections

What is threat hunting?

Threat hunting is a proactive and iterative search for malicious activity that has evaded automated defences. It does not replace detection: it complements and feeds it. Every hunt produces either the discovery of a compromise or a reasoned assurance of its absence, and almost always new rules, new data sources or configuration improvements.

  • The assumed compromise principle

    The hunter assumes that a skilled attacker may have bypassed the controls. The question is not "are we under attack?" but "where would they hide, and what traces would they leave?".

  • Human-driven

    Tools provide the data; intuition, knowledge of the environment and of attackers make the difference. It is an expert-level (L3) activity.

  • Measurable

    A hunt has an objective, a duration, data, documented results and deliverables: detections, fixes, knowledge.

The three types of hunt

TypeStarting pointExample
Hypothesis-drivenA plausible attack technique in your context"An attacker uses scheduled tasks to persist on our servers"
Intelligence-drivenA recent indicator or threat report"Group X exploits a given VPN vulnerability: let's look for its traces"
Data-driven (anomalies)Statistics on the environment, without assumptions"Which processes only appear on one or two machines in the fleet?"

The PEAK model

The PEAK model (Prepare, Execute, Act with Knowledge), published by Splunk's research team in 2023, structures a hunt in three stages. In the Netherlands, the TaHiTI method (Targeted Hunting integrating Threat Intelligence), created by Dutch banks, offers a similar, strongly intelligence-driven approach.

  1. 01PrepareTopic, hypothesis, research, data, scope
  2. 02ExecuteCollect, analyse, pivot, refine
  3. 03ActDocument, create detections, communicate
The three stages of a hunt according to PEAK
  1. Prepare

    Choose a topic (often a priority ATT&CK technique), formulate a testable hypothesis, study the technique, identify the necessary data and check that it exists, set the duration and scope.

  2. Execute

    Query the data, filter legitimate noise, examine atypical cases, pivot from one clue to the next (user, host, process, connection), refine the hypothesis as findings emerge. If a compromise is found, switch immediately to incident response.

  3. Act with knowledge

    Document the hunt (even without results), turn effective queries into detections, report visibility gaps, share lessons with the SOC and the Red Team.

Formulating a good hypothesis

A good hypothesis is precise, testable and tied to a behaviour. Compare:

Weak hypothesisActionable hypothesis
  1. "We may be compromised"
    "An attacker created a forwarding rule in executives' mailboxes to exfiltrate emails (T1114.003)"
  2. "There may be malware"
    "An implant communicates with its server at regular intervals over HTTPS from a user workstation (T1071.001)"
  3. "Let's check Active Directory"
    "A service account is used interactively outside its usual servers (T1078.002)"
  4. "Let's look for PowerShell"
    "PowerShell is launched by an office application with an encoded command (T1059.001, T1027)"

Annotated sample hunts

Hunt 1: C2 beaconing

An implant contacts its server at regular intervals. Even with random variation (jitter), this regularity can be spotted statistically.

Search for regular connections to rare destinations
DeviceNetworkEvents
| where Timestamp > ago(7d) and RemoteIPType == "Public"
| summarize Connections = count(), Hours = dcount(bin(Timestamp, 1h)),
            Devices = dcount(DeviceName) by RemoteUrl
| where Devices <= 2 and Connections > 100 and Hours > 100   // present almost every hour, on very few devices
| order by Hours desc

Results are then sorted manually: update services, legitimate agents, and sometimes an unknown destination worth investigating.

Hunt 2: rare binaries (frequency analysis)

Attackers introduce files that exist nowhere else in the fleet. Stack counting brings the rarest items to the surface.

Processes run on a single device in the last 30 days
DeviceProcessEvents
| where Timestamp > ago(30d)
| summarize Devices = dcount(DeviceName), Example = any(DeviceName),
            Path = any(FolderPath) by SHA256, FileName
| where Devices == 1
| where Path !startswith @"C:\Program Files"
| order by FileName asc

Hunt 3: persistence through scheduled tasks

Scheduled tasks created with suspicious commands
DeviceEvents
| where ActionType == "ScheduledTaskCreated"
| extend Details = parse_json(AdditionalFields)
| extend Command = tostring(Details.TaskContent)
| where Command has_any ("powershell", "cmd /c", "rundll32", "mshta", "-enc", "http")
| project Timestamp, DeviceName, InitiatingProcessAccountName, Command

Measuring the value of hunting

MetricWhat it measures
Number of hunts per quarterThe regularity of the programme
Detections created from huntsTurning knowledge into automated defence
Visibility gaps identified and fixedImprovement of collection
Incidents discovered by huntingThe ability to find what alerts missed
ATT&CK coverage huntedThe breadth of techniques explored

Hunting and the Purple Team

Threat hunting and purple teaming reinforce each other: the Red Team executes a technique, the hunter checks whether they can find its traces and with which queries, then the detection engineer turns the query into a rule. See the purple team approach.

Frequently asked questions

Do you need a SIEM to do threat hunting?

Above all you need data and an efficient way to query it: a modern EDR console, a SIEM or a data lake. The quality and depth of telemetry (processes, network, authentications) matter more than the tool.

How often should you hunt?

A realistic pace for a mid-sized team is one or two structured hunts per month, plus ad hoc hunts triggered by the news (critical vulnerability, campaign targeting your sector).

Can threat hunting be outsourced?

Yes. Many MDR services include regular hunts. Make sure you receive detailed reports and the queries used, to build internal capability.

Does your defence really see what matters?

In 45 minutes, let's review your SOC, your detection coverage and your response capability, and identify the three workstreams that will make the biggest difference.

Book a meeting