Skip to main content

Rule types: Match, Query, Sequence, New terms and Indicator

Every Detection Rule has one type, chosen when the rule is created and fixed afterwards. This page compares the five types. To build one, see Create and edit a Detection Rule.

At a glance​

TypeDetectsRunsEntity is named by
MatchAn event that meets the conditions.On every event as it arrivesEntity field
QueryEach row a ThreatVIS PPL search returns, thresholds included.On a scheduleEntity column
SequenceAn entity's events or other rules' detections, in order or before an event, within a span.On every event as it arrivesEntity field
New termsA value, or a combination of up to three, that the history window before the search has not seen.On a scheduleEntity field, one of the chosen fields
IndicatorAn event field that matches a threat-intelligence set.On every event as it arrivesNot set in the editor

The entity is the user, device or other value an alert is about. It decides which Case an alert joins.

Match​

A Match rule checks each event against a set of conditions, or against one expression. When an event meets them, the rule raises an alert for the event's entity.

Use it for single-event detections, such as a process that starts with a known-bad argument, or a logon by an account on a Reference List.

A condition can compare a field with a value, test a list of values, look the value up in a Reference List, or look it up in a column of a lookup file.

Query​

A Query rule runs a PPL search on a schedule. Every row the search returns is an alert, and one column of the result names the entity. Other columns become the alert's evidence.

Use it for anything that needs counting, grouping or joining across events. A threshold is a Query rule that counts with stats and then filters on the count with where, for example more than 20 failed logons from one address. The editor reads the query back under the box and tells you when it is a threshold.

A Query rule can start from a saved Filter Query with $filter(. See Filter queries.

Sequence​

A Sequence rule alerts when things happen to the same entity in order. It has two kinds.

KindMeaning
Detections, then an eventEarlier steps name rules, or Reference Lists, whose detections must already hold for the entity. A final event then completes the sequence. The steps may have happened in any order. Up to 10 steps.
Ordered eventsSteps are met by events in order, all with the same values in one to three Join on fields, within a span of up to 30 days. A step with Runs of N needs N events. An optional Until condition drops partial sequences. From 2 to 10 steps.

A step of a detections-then-event sequence can follow a building-block rule.

New terms​

A New terms rule alerts the first time it sees a value it has not seen before. A PPL search selects the events to look at. You choose one to three Fields, and a History window of up to 365 days. For each value of those fields in the current search, or each combination if you chose several, the rule checks whether it appeared in the history window. If not, it raises one alert.

Use it for "first time this user signs in from this country", or "first time this host runs this program".

The search may only select and reshape events. Commands that aggregate or cut them, such as stats, dedup, head, sort, join and lookup, are refused.

Indicator​

An Indicator rule matches an event field against a set of threat-intelligence indicators. It has no conditions of its own and cannot be created in the rule editor. Its set is filled by its threat-intelligence source. See Threat intelligence feeds.

An Indicator rule cannot be made a building-block rule.

What every type shares​

SettingApplies to
Name, description, category, severity, risk score, tagsAll
Suppress alerts byAll except Indicator. Scheduled types may suppress per rule execution or per time period. Match and Sequence rules suppress per time period only.
Open CaseAll except building-block rules
ExceptionsMatch and Sequence rules always. Other types unless they are building blocks.
Building blockAll except Indicator
MITRE ATT&CK threatsAll