Skip to main content

Threshold, count and sequence rules on Axiom

Many attacks only show up across several events: ten failed sign-ins and then a success, or encoded PowerShell followed by a connection to the internet. A single-event rule can't see that. Correlation rules can. Huntbase runs them on your Axiom datasets, in APL, without copying events out of Axiom.

Correlation rules are written in Sigma's correlation format. Huntbase supports four kinds:

KindFires whenExample
Event countA group has at least N matching events within the window.One account fails to sign in 10 or more times in 10 minutes.
Value countA group has at least N different values of a field within the window.Four or more hosts look up the same domain within an hour.
TemporalEvery one of several rules matches for the same group within the window, in any order.Two different suspicious events on the same host within 10 minutes.
Ordered temporalSeveral rules match for the same group within the window, in order.Encoded PowerShell, then an outbound connection from the same host within 5 minutes.

A group is the user, host, IP or other field the rule groups on. A rule can build on another: Brute force followed by a successful sign-in starts from the event count rule Many failed sign-ins for one account.

Thresholds work one way: "at least" or "more than". A rule that fires on "fewer than" or "exactly" N events can't run on Axiom.

Rules that ship with Huntbase​

These watchers are in the catalog, off until you turn them on:

WatcherWhat it looks for
Many failed sign-ins for one accountOne account fails to sign in 10 or more times within 10 minutes (Windows event 4625).
Brute force followed by a successful sign-inThose failures, then a network or remote desktop sign-in for the same account within 30 minutes.
Encoded PowerShell followed by an outbound connectionPowerShell with an encoded command, then PowerShell on the same host connecting to a public address within 5 minutes.
One domain looked up by several hostsFour or more hosts look up the same uncommon domain within an hour.
Program dropped in a shared folder then set to run at sign-inA program written under C:\Users\Public or C:\ProgramData, then a Run key set on the same host within 10 minutes.

They read Windows Security and Sysmon events with their usual field names, such as EventID, TargetUserName, CommandLine and QueryName.

Run a correlation rule on Axiom​

  1. Open the watcher in Watchers and turn it on for your organisation (Shadow or On).
  2. On its Deploy tab, select Add a deployment.
  3. Under Where, choose your Axiom connection, and under Dataset, the dataset that holds the events.
  4. Read the Converted query preview, then select Add deployment.

Correlation rules run only on Axiom. Other places in Where say why they can't take the rule.

Huntbase then searches the dataset once an hour, within the connection's query budget. Each run looks back at least the rule's window plus an hour, so a sequence that started before the last run still counts.

Field names​

Huntbase translates the rule's field names through the connection's field mapping and the fields it found in the dataset. A connection with no mapping uses Sysmon on Axiom. If your shipper renamed a field, for example Computer to Hostname, set it in the mapping and the rule follows.

What a detection looks like​

Huntbase checks every group Axiom returns before raising anything: the events must really fall within the rule's window, in the right order for an ordered rule, and above the threshold. Groups that don't pass are dropped, so a burst of events that only looks close in an hourly summary doesn't fire.

Each group that passes raises one insight, named after the watcher. It names the user, host or IP the rule grouped on, how many events matched, which rules matched and when the first one happened, and lists the events that made it fire. Runs overlap, so Huntbase recognises a group it already raised and doesn't raise it again.

Hunt with the same patterns​

The Axiom connection's query templates include the same patterns as one-off APL queries: Brute force then a successful sign-in on Windows, Encoded PowerShell then an outbound connection and Domains looked up by several hosts. Find them in Content library › Queries and run them over any time range, for example in a hunt.

Next steps​