Skip to content

Execute Sigma rules

Tenzir supports executing Sigma rules using the sigma operator. This allows you to run your Sigma rules in the pipeline. The operator transpiles the provided rules into an expression, and wraps matching events into a sighting record along with the matched rule.

Semantically, you can think of executing Sigma rules as applying the where operator to the input. At a high level, the translation process looks as follows:

Sigma Ruletranspileto TQLexecutein pipeline...wheredetection: foo: a: 42 b: "evil" bar: c: 1.2.3.4 condition: foo or not barYAMLwhere (a == 42 and b == /evil/i) or not (c == 1.2.3.4)TQLTenzir ProgramTenzir Pipeline

Run a Sigma rule on an EVTX file

You can run a Sigma rule on any pipeline input. For example, to apply a Sigma rule to an EVTX file, we can use the utility evtx_dump to convert the binary EVTX format into JSON and then pipe it to sigma on the command line:

Terminal window
evtx_dump -o jsonl file.evtx | tenzir 'read_json | sigma "rule.yaml"'