✳ Field lesson DE4 / 12 min

Hunting starts with a hypothesis

Triage starts from an alert. A hunt starts from a hypothesis about something no alert has caught. It tests the hypothesis against data that can answer it, records the answer, and turns a query worth keeping into a new detection.

Helpful first: A detection nobody tested is a guess · How an intrusion unfolds

Thirty days to Halcyon · Case 13: The quiet rules · Episode 4 of 5

Friday, 07:30, the end of the night shift. The five KS-4 rules now fire on harmless tests, and the 38 ground-station hosts send the events they read.

Vera Vance, your mentor, is not ready to sign. "The rules have been watching since Wednesday," she says. "What if KS-4 planted something last month?"

Nyx, the Threat Hunter, pulls up a list of data sources. Most of them start on Wednesday. Where would a task planted weeks ago still show?

By the end you can

  • Turn a threat report into a testable hunting hypothesis
  • Choose the data that would prove or disprove the hypothesis
  • End a hunt with a recorded result: closed, new detection, or incident

A hunt starts where the alerts stop

Triage starts from an alert and asks whether it is real. A scheduled search reruns known logic on a timer, which makes it a detection. Threat hunting starts from a hypothesis about activity that no alert has caught. It tests that hypothesis against data, and it ends with a recorded result.

Vera's worry is a gap in time. Meridian's rules for KS-4 could only see events from Wednesday evening onward. Anything planted before then never had a chance to raise an alert. Only a hunt can look back.

Splunk's PEAK framework (2023) is one practitioner model for hunting. PEAK stands for Prepare, Execute, and Act with Knowledge. It names three kinds of hunt: hypothesis-driven, baseline, and model-assisted. This one is hypothesis-driven. The team states a supposition, then checks the data to prove or disprove it.

A hunt is not a search for a list. On Wednesday Nyx searched 30 days of logs for the 9 unexplained addresses and the 6 hashes. It was quick and worth doing once. But it tested indicators, not the behavior.

Write a hypothesis that could be wrong

A useful hypothesis names four things: a behavior, a place, a time window, and the data that would show it. Nyx writes: if KS-4 planted persistence before this week, a scheduled task on a ground-station host runs a program from a user-writable folder. A user-writable folder is one any signed-in user can change, such as C:\Users\Public\.

The place is the 38 ground-station hosts. The window is the last 90 days. The data is the hard part. The SIEM's process events from these hosts begin on Wednesday, so they cannot test 90 days.

Nyx chooses the endpoint management tool's daily scheduled-task inventory instead. Every day it records each task on each host, with its program path. It never depended on the forwarders, so it holds all 90 days.

The hypothesis can be wrong, which is the point. If no task on any host runs a program from a user-writable folder, the hunt has its answer. If some do, each match needs a second look.

SPOT THE PROBLEM

Nyx collects six draft hypotheses for next month's hunts. Flag the ones that could never be proved wrong, or that are not hunts at all.

Show the answers
  • KS-4 might be somewhere on our network. No behavior, no place, no window, no data. Nothing could ever show it false.
  • Search all hosts for the 6 file hashes in the report. A useful one-off search for indicators. It tests no hypothesis about behavior.
  • Look for anything unusual on the ground-station hosts. Unusual is not defined, so no result can confirm or refute it.

Matches are leads, not findings

The query runs over 90 days of inventory for the 38 hosts. It returns three matches. None of them is a finding yet. A match only says that the data fits the pattern. Each one needs a question that can settle it.

Two matches are the same task on two hosts. It runs the antenna vendor's firmware checker from C:\Users\Public\AntennaVendor\. The vendor documents that task and path, and the file matches its signed release. The query matched the path, not the permissions. Nyx checks the folder: the vendor's installer limits it to administrators, so no ordinary user can replace the checker.

The third match runs cleanup.ps1 from C:\Users\Public\scripts\ on one host. It is an old admin script for a nightly cleanup job. It has not changed in 90 days, and nothing else on the host points to an intruder. But it holds a service account password in plain text, in a folder any user can change.

That is a weakness, not an intrusion. It goes to Kael Cho, Staff Infrastructure Engineer, as a finding with an owner.

WORKED EXAMPLE

Three matches, three settling questions

  1. Matches 1 and 2. Question: does the vendor document this task, does the file match its signed release, and can an ordinary user change its folder? Yes, yes, and no. Explained.
  2. Match 3, first question. Is this KS-4's work? The script has not changed in 90 days and matches a known cleanup job. No sign of an intruder.
  3. Match 3, second question. Is it safe as it is? No. Anyone who can sign in to the host could edit a script that runs with a service account's password.
  4. Record each answer. Two matches closed as the vendor's documented checker. One closed as not KS-4, and opened as a finding for Kael.

Result: Three leads, three questions, no planted task. The hunt also found a weakness that no rule was looking for.

How a hunt ends

A hunt that just stops teaches nothing. It records an answer: the hypothesis is closed, or a match becomes an incident and response takes over. Either way, a query worth running every day becomes a new detection, as Nyx's did.

Each result is a success. A closed hypothesis is an answer Vera can sign. A new rule watches from now on. An incident found on Friday is better than one found at launch.

There is a fourth case. If the data cannot answer the hypothesis, the hunt has not failed. It has found a telemetry gap, and the hypothesis stays open until the data exists.

Friday's hunt answered each question in turn: the data covered the window, every match was explained, and the query was worth keeping. So the hypothesis closed and a new rule was added.

A clean hunt does not prove KS-4 was never here. It tested one hypothesis with the data available. A task created and deleted within one day would never appear in a daily inventory.

SORT IT OUT

Five hunts at other sites have ended. How should each one be recorded?

  1. Proxy logs are kept for 14 days, and the hypothesis covers 60.

  2. All 40 matches are one backup tool's documented jobs, and the query takes six hours to run.

  3. A service on two hosts runs an unsigned program from a temp folder, and an admin account signed in to both from a host nobody recognizes.

  4. The 12 matches are all the help desk's documented remote sessions. Nothing watches for this behavior today, and the query returns in seconds.

  5. Large uploads that no rule watches all come from one known data sync, and the team writes a rule that excludes only that sync.

Show the answers
  1. Telemetry gap. The data cannot answer the question. Keep the hypothesis open and fix the retention first.
  2. Closed, no new rule. The data answered the question. A six-hour query is not one to run every day, so record it and close.
  3. Incident. No innocent explanation, and a second sign that fits an intruder. Hand it to incident response now.
  4. Closed, new rule added. Every match is explained, so the hypothesis closes. The gap is real and the query is cheap, so it becomes a rule.
  5. Closed, new rule added. The matches were harmless, but now a narrow rule watches for anyone else doing the same.

CHECK YOUR JUDGMENT

Vera proposes a second hunt: if KS-4 created a service remotely before Wednesday, a ground-station host has a new service whose program sits in a user-writable folder. Which data can test it over the last 90 days?

CASE FILE · CASE 13 · ENTRY 4 OF 5

Answer the closing question correctly to add this entry to your case file.

Hypothesis closed, rule added

Ninety days of task inventory gave three matches, all explained, so the hunt closed its hypothesis, added a rule, and handed an old script to Kael.

Open the case file ↗

Review sheet: exam notes and quick reference

Find your next idea.

Tip: press / to open search. Escape closes this window.