Book Appointment

How to Build a First DetectionOps Rule in Nine Steps

Healthcare IT

You do not need a security operations centre to try DetectionOps. You need one rule that matters, a folder under version control and an afternoon. This guide is for the IT coordinator in a hospital or clinic network who has been told to “improve monitoring” and wants a repeatable method rather than a shopping list. It is purely about systems administration and process. No clinical content appears anywhere in it, and it is not advice on patient care.

The route below follows the order used by teams that treat alert logic as software: decide what you fear, write it down, test it, review it, trial it quietly, release it and then check how it behaves. Each step has a small deliverable, so you can stop at any point and still have something useful.

Step 1: pick one behaviour worth catching

Choose something specific. “Suspicious activity” is too vague; “an unexpected timed job appearing on the machine that stores scanned documents” is concrete. The Ops Atlas, in its entry describing DetectionOps as detection engineering run like software delivery, uses scheduled-task creation as its worked example, tied to a public catalogue of attacker techniques. Borrow that example if you have nothing better, because it is easy to simulate and easy to explain to non-specialists.

Write the choice as one sentence in a plain text file called requirement.md. Name the system, name the behaviour, and add one line on why you care. That sentence is your requirement, and everything else will be checked against it.

Step 2: write the strategy before the query

This is the step most people skip. A widely copied template from a security consultancy asks for a goal, a category, a short strategy, the technical context, blind spots, expected false positives, how you will validate, a priority and a response plan. You do not need to fill in nine headings for a first rule. Fill in four: what you detect, what normal looks like, what the rule will miss, and what the person on call should do.

The blind-spot line deserves honesty. The Atlas gives a concrete one: the Windows event that logs a freshly registered timed job is emitted only when one particular audit category has been enabled, and direct changes to the registry made with system-level rights can slip past that logging entirely. A rule built on that event simply does not see those routes. Write that down now, not after an incident.

Step 3: write the tests first

Make a folder named tests. Put in at least two sample records, a record that must raise the alarm and a harmless lookalike that must stay quiet. Practitioners at one detection-platform vendor recommend exactly that pair as a minimum, and the Atlas adds a third kind of test, a known-gap case, for any weakness you have chosen to live with.

Derive these examples from your requirement, not from the finished query. If you write them from the rule, they will pass no matter what, which proves nothing. If you can, capture a genuine harmless record from your own environment, such as the scheduled task your backup software creates every night, and use that as the “should not fire” case.

Step 4: write the rule

Now the query. If your team runs a single monitoring product, write it in that product’s native language and store it as a file. If you expect to switch products or share rules, consider the open Sigma format, where a rule has a title, a log-source section and a condition. The Atlas says plainly that neither route is wrong, and that the native approach is often the more sensible one for a single-platform team with platform-neutral requirements and tests kept alongside.

Keep it narrow. A rule that fires on every scheduled task is useless, while one that fires on tasks created by a non-administrative account outside a maintenance window is far more usable. Add a status label such as “experimental” so that colleagues know it is new.

Step 5: automate the checks

Add a script that does three things whenever the rule changes: checks the syntax, runs your sample records through the rule, and confirms that the expected records fire and the harmless ones stay silent. Run it from any job runner you already have. For a team new to this, the surprising part is how little code that is; thirty lines of shell are enough to start.

Pin the versions of whatever tools the script calls. The Atlas highlights that in October 2026 a conversion library jumped a major version while the two tools that wrap it were still locked to the old line, which left any pipeline that chased the newest release in a broken state.

Step 6: get a second person to read it

Peer review is cheap and catches more than you would expect. Ask a colleague three questions: could you explain what this rule is for without asking me, do the tests match the requirement, and what harmless activity might trip it? Capture the answers in the review comments. If you are working alone, wait a day and review your own work against the requirement file, pretending someone else wrote it.

Our sister post on collaboration practices that teams build around GitHub covers the mechanics of pull requests in more detail, and it is a good companion if your hospital IT group is new to that workflow.

Step 7: run it quietly first

Release the rule in shadow mode and leave it for roughly seven days. It evaluates real events and records hits, but pages nobody. At the end, count what it found and sort the hits into three piles: genuinely suspicious, harmless but legitimate, and wrong. The Atlas defines rule precision as true positives divided by everything the rule flagged, and its worked example shows a rule that raised forty alerts, of which six were genuine, with the remainder split between harmless activity and outright mistakes, landing at fifteen percent. A number like that, once you have it, is the start of a useful conversation about whether to narrow the rule or add a documented exception.

Whenever you add an exception, attach the staff’s supporting notes and a lapse date. Otherwise the filter outlives the reason for it.

Step 8: release and measure

When the trial results are acceptable, merge the change and let the pipeline deploy it. Then keep a tiny scoreboard: how many alerts the rule raised, how many were real, and how many minutes the staff spent on each real one. The Atlas treats analyst minutes per true positive as a handy unit, because it translates directly into staffing cost. In its example, the noisy rule cost roughly forty minutes for every genuine hit.

Run an emulation once in the first quarter. Perform the harmless version of your chosen behaviour in a lab and confirm the alert appears. This is how you earn the word “validated” rather than just “tagged”.

Step 9: schedule the retirement

Every rule needs an end condition. Add a review date to the metadata and, when it arrives, decide whether to keep, tune or retire. Rules that nobody owns are the ones that bury the on-call person at three in the morning. For background on how institutions think about quality and accountability more generally, see our piece on why external accreditation matters when assessing hospitals abroad. The parallel is administrative: standards only help when someone checks them on a schedule.

What you have at the end

After a single pass you hold a requirement, a strategy note, tests, a reviewed rule, a trial record, a deployment and a metric. That small bundle is more than many monitoring estates have for their oldest and noisiest rules. Repeat the loop for the next behaviour, then retrofit the same treatment onto the ten rules that annoy your staff most. Within a quarter you will have a rhythm, and DetectionOps will have stopped being a slogan and become something your team simply does.