DETECT hunt Build detections

Overview

Build detections

This part follows a single detection from somebody's idea to a reviewed rule: how you choose it, research it, write it, and prove it works. It's the practitioner's half of the framework, and the half where you get to open an editor.

Framework v0.136.0.

On this page

The path of one detection

Every candidate starts at intake with six scored inputs. If the log source it needs isn't collected, the score is 0 and the candidate is blocked, which saves you from writing a careful rule for logs you don't have. A candidate that passes intake gets a written hypothesis, a named blind spot, and a read-only count over 7 days of production data. That count tells you how loud the rule will be before it pages anyone.

Before a rule ships, it needs real events to test against, because a rule that has only ever met its author's imagination tends to do well there. Engineers capture those events through emulation and scrub credentials and personal data out of them. The rule is written once in Sigma, converted for every target, and replayed against its fixtures on every replay engine. An agent can draft most of what each stage produces, and people keep review, deployment, and retirement.

HypothesisOne sentence: when an attacker does X, log source Y records Z.
->
EmulationRun it from a believable foothold and read what lands in the log.
->
RecordEvery section filled in, so somebody other than the author can triage and change it.
->
Detection and fixturesSigma, converted to every target, with an event it must match and one it must ignore.
->
ReviewA second engineer approves. The fixtures replay in CI.
The path a single detection takes from idea to review. The score decides which idea goes first.

Backlog order

ValueT + I + BThreat relevance, impact, and how hard the detection is to evade.
÷
CostE + CHours to build, and analyst minutes a day to live with.
×
Readiness(R / 5)^kIs the data in the SIEM and usable? A 0 blocks the candidate.
×
MarginalMWhat it adds to what already fires: first 1, stronger 0.8, equal 0.5.
=
Score0.03 to 7.50On the balanced preset. Scores in one 0.2 band tie, and the lower run cost goes first. Mandates due inside 90 days go ahead of every score.
Each input carries an evidence line. Readiness is scored 0 to 5 and the rest 1 to 5. Every weight and k start at 1 on the balanced preset; threat_led doubles wT, asset_led doubles wI, and telemetry_led raises k to 2.

In this part

Ship a detectionA checklist for each stage: what to do, the command to run, and the definition of done.Read this when you're building a detection right now.PrioritizationThe inputs, the formula, and the evidence each score needs.Read this when you need to order a backlog.Worked examplesScoring, blocking, deadlines, and retirement, step by step.Read this when the formula doesn't make sense to you.EmulationHow a detection gets the events you write and test it against.Read this when you're about to write a detection.A detection recordFinished detection records with every section filled in.Read this when you need to see what good looks like.Query languagesThe same detection in Sigma, SPL, KQL, SQL, ES|QL, EQL, and LogScale, with tips for each.Read this when you write or review queries for a specific platform.Detections in SQLA detection as warehouse SQL, with declared variables.Read this when your detections run as scheduled queries.Detection as codeThe rules, the pipeline they run in, and the hosts, CI systems, and platforms that fill it.Read this when you're moving detections into version control.Working with agentsWhat an agent drafts, what a person approves, and how to keep log content from steering it.Read this when agents are writing detections.The closed loopAgents run every stage, a check after each one is written against how an agent would fake it, and three routes send work back.Read this when you want agents to run the pipeline, not only draft for it.Choosing AI for detection and responseWhich AI uses to adopt first, build or buy, what to ask any product, and how to prove a triage agent before it closes an alert.Read this when you are choosing or building AI for detection and response.

The other overviews: The framework · Run and measure · The tools.