AI in Detection Engineering

By Ambuj Kumar, CEO

Part of AI Detection Engineering: How AI Tunes and Writes Detection Rules, which gives a short answer to every question in the guide.

How do you make detection rule repos consumable by AI agents?

Detection rule repos become consumable by AI agents when each rule file carries its own context, meaning structured metadata and a stated reason for every change. An agent can't read what lives in a senior engineer's head or in a closed ticket.

That usually means one rule per file and one schema for all of them, whether a file holds Sigma YAML (YAML Ain't Markup Language) or a wrapped query for the SIEM (security information and event management) system. The metadata names the log source, the fields the rule depends on, an owner, a status, and the known false positives, plus the technique the rule maps to in MITRE ATT&CK, the public catalog of attacker techniques. Exclusions need a comment saying why. An unexplained exclusion looks to an agent like something safe to delete. A sample event that should match, stored next to the rule, lets the agent check its edit.

If people edit rules in the SIEM console, the repo stops describing production and an agent reading it works on stale logic. The AI Detection Engineering Agent avoids working on stale rules by syncing every rule your SIEM exposes between the SIEM and Simbian, two-way and periodically, and it keeps a version history for each rule from its first synced version.

For a Git repo with no such sync, diffing a scheduled export of the live rules against the repo shows where the two have drifted.

Should AI agents tune detections without human review?

No. In most environments AI agents should not tune detections without human review. A change that removes noise can also remove the alert the rule exists to raise, and nobody finds out until an incident shows the rule stayed quiet. The review doesn't have to be slow. Put the diff of the rule, the reason for the change, and the match counts before and after over the same window of past logs on one screen, and an engineer who knows the environment can tell quickly whether the excluded activity is a backup job or something an attacker could imitate.

The AI Detection Engineering Agent treats every tuning change and every new rule as a candidate until a human approves it. Once it is approved, the push to the SIEM (security information and event management) system is automated, so nobody copies queries between consoles by hand. The exception is a rule written because a pentest proved an attack that raised no alert. The customer chooses whether that rule deploys automatically or waits for approval.

Whatever the approval policy is, every change should be versioned so that it can be rolled back.

What are the signs that AI-assisted tuning is failing?

AI-assisted tuning is failing when alert volume keeps dropping and nobody can show that the true positives survived. A rule with enough exclusions goes silent, and on a dashboard a silent rule looks the same as a well-tuned one.

Watch the exclusion list first. A rule whose list gets longer with every tuning pass, especially with exclusions on a whole account, host, or process name, is often being fitted to last month's noise. Suggestions that arrive with no backtest are a warning too, as are backtests over a window too short to contain the weekly and monthly jobs behind most benign matches.

If the same rule keeps coming back for tuning, the cause may be upstream, such as a parser change that renamed a field an exclusion depends on. In SPL (Search Processing Language) and similar search languages that exclusion quietly stops applying and the noise returns. Another round of tuning only treats the symptom. Reviewers who approve every suggestion without opening the diff are a sign as well.

The direct test is a replay, which means re-running the tuned rules against captured logs from a known attack, such as a past pentest or red team exercise. A rule that caught the technique before tuning and misses it afterward has been tuned badly, whatever the noise numbers say. Reverting it depends on history: the version of the rule before the change and the stated reason for it.

What are the risks of using AI-generated detection rules in production?

The main risks of using AI-generated detection rules in production are rules that look correct but never fire, rules that flood the alert queue, and rules nobody on the team can explain later. A model can write a query that is valid SPL (Search Processing Language) and still references an index the environment doesn't populate, or a field that this environment's parser names differently. The query saves without an error. It matches nothing. The control is validation against real data: replay the rule over captured logs from a known instance of the behavior, such as a pentest run or a past incident, and confirm it fires.

A generated rule can also describe the technique faithfully and ignore what is normal in this environment, so it fires on routine administration every night. A backtest over ordinary production logs shows the match count before any analyst gets paged.

Some generated rules duplicate one the team already has, and a rule that arrives with no stated intent and no technique mapping tends to become one that people are afraid to edit. Holding each generated rule as a candidate until a named person has read the logic and the test results gives it an owner from the first day.

Where should AI help in detection engineering?

In detection engineering, AI should help with tuning noisy rules first and drafting new rules second, and that is the safer order for a team starting out with AI detection engineering. Tuning comes first because its evidence already exists: the alert history shows which rules analysts keep closing as benign, and a proposed change can be backtested over past logs before anyone approves it. It also means reading every closed alert for a rule and every exclusion already in place, which is slow work by hand.

Once the team trusts the tuning suggestions, drafting follows: AI can turn a threat report or an advisory into a draft query in the right language for the SIEM (security information and event management) system, after checking that the log source and fields the rule needs are being collected.

Deciding which gaps the business cares about, and how much noise a given rule is worth, should stay with people. AI does not replace the detection engineer, who still reviews each proposed change and writes the rules that need real knowledge of the environment.

How should security teams govern AI agents that write detections and hunt across tenants?

Security teams that run AI agents across tenants should govern them one tenant at a time: each tenant has its own rules, its own approver, and its own audit trail, and only aggregated results cross the boundary. In practice the teams doing this are MSSPs (managed security service providers) and MDR (managed detection and response) providers.

An agent hunting in one tenant should query that tenant's SIEM (security information and event management) system with credentials scoped to it, and what it learns there, such as host names and exclusions, should stay there. A rule tuned for one client is usually wrong for the next, since the service accounts and scheduled jobs that justified an exclusion don't exist there. Sharing a rule template across clients is fine. Sharing an exclusion list usually isn't.

The contract normally settles who approves in each tenant, the provider's analyst or the client's SOC (security operations center) lead, and the agent should have no way to deploy to a tenant outside what that approver has agreed. The audit trail then records, for each tenant, what prompted the rule, who approved it, and when it deployed.

The AI Detection Engineering Agent runs in a per-tenant sandbox. A rule it writes is a candidate until a human approves it, except a rule written because a pentest proved an attack that raised no alert, which deploys automatically or after approval, whichever the customer chooses.

How can you tell in system logs when an AI agent is trying to break rules, rather than a human hacker?

In system logs, an AI agent differs from a human attacker mainly in how the session authenticates and how it paces its requests. AI agent detection correlates both with what the account normally does.

An agent acting for an employee rarely types a password. It holds a token or an API (application programming interface) key, so its activity tends to show up as non-interactive sign-ins and API calls, often with a client or user-agent string from an SDK (software development kit) or automation tool where a browser would normally appear. It may also list mailboxes or files in bulk in one short burst. A human intruder working by hand is generally slower, though one using a stolen refresh token also shows up as non-interactive sign-ins.

No single one of these is proof. Legitimate scripts look the same, and a careful attacker can throttle a tool.

So the useful rule joins signals. One example is a Microsoft Sentinel correlation rule that joins Entra ID non-interactive sign-in logs with Microsoft Graph activity logs and fires only when both occur in the same one-hour window under anomalous sign-in conditions, such as a new location or a first-time user. The AI Detection Engineering Agent drafts a rule of this kind from a one-line request, after checking which sign-in and activity telemetry the environment collects. The rule is a candidate until a human approves it.

A match says the behavior fell outside the monitored AI agent's normal pattern, and whether the agent was hijacked or just misconfigured still takes an investigation.

What is automated detection engineering?

Automated detection engineering is the practice of having software, increasingly AI agents, carry out the repeatable steps of building and maintaining detection rules while a person keeps the approval decision.

The steps that automate well have a clear input and an output someone can check. Keeping a synced copy of the rules from the SIEM (security information and event management) system is one. So is proposing a tuning change for a noisy rule, with a backtest showing match counts before and after, and comparing the rule set against the logs being collected to find gaps. Drafting a new rule in the SIEM's query language can now be automated as well.

Older automation in this area was mostly CI/CD (continuous integration and continuous delivery) pipelines that linted and deployed rules a person had written. What hasn't changed is the human part: a person still approves each rule, decides which threats matter to the business, and decides which log sources to collect.

Sign up for Simbian's Newsletter

By submitting this form, you agree to our Privacy Policy.

Ask AI about Simbian