YARA
Synopsis
Scans an event field with YARA rules. A match annotates the event with the rule's name, tags, and resolved MITRE ATT&CK enrichment.
The engine is built for log payloads — many small buffers scanned at a high rate against tens to low hundreds of rules — rather than for scanning files on disk.
Schema
- yara:
library: <string[]>
rules: <string[]>
rule_files: <string[]>
rule_dirs: <string[]>
field: <ident>
mode: <enum>
mark_field: <ident>
namespace: <string>
mitre_enrich: <boolean>
include_strings: <boolean>
description: <text>
if: <script>
tag: <string>
disabled: <boolean>
ignore_missing: <boolean>
ignore_failure: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
Configuration
At least one rule source is required. With none, the processor fails.
| Field | Required | Default | Description |
|---|---|---|---|
library | Y* | Names of YARA rule packs assigned through the Library. | |
rules | Y* | Rules given inline, as YARA rule text. | |
rule_files | Y* | Paths to rule files (.yar, .yara). | |
rule_dirs | Y* | Directories searched recursively for rule files. | |
field | N | The field to scan. Left unset, _raw is scanned when present, and otherwise the whole event. | |
mode | N | annotate | annotate marks matches and forwards every event. filter drops every event that matches no rule. |
mark_field | N | _yara | Root field the match markers are written under. |
namespace | N | default | Namespace the rules are compiled into. |
mitre_enrich | N | true | Resolve MITRE ATT&CK tactics and techniques onto each match, from the rule's tags and meta. |
include_strings | N | false | Include the matched strings, each with its identifier, offset, and length. |
description | N | Explanatory note. | |
if | N | Condition that must be true for the processor to run. | |
tag | N | Identifier for this processor instance. | |
disabled | N | false | When true, the processor is skipped. |
ignore_missing | N | false | Continue quietly when the field to scan is absent. |
ignore_failure | N | false | Continue pipeline processing if the processor fails. This does not mean "keep filtering and ignore errors" — see the warning below. |
on_failure | N | See Handling Failures. | |
on_success | N | See Handling Success. |
* = At least one of library, rules, rule_files, or rule_dirs is required. Sources are combined, in that order.
ignore_failure: true silently turns this processor off. The drop is signalled to the pipeline as an error value, and the ignore_failure check runs before that value is inspected — so a matched event is kept instead of dropped, no error is logged, and the pipeline reports success. The processor appears to run normally while filtering nothing.
Use it only if you genuinely want a pass-through. To tolerate real errors without losing the filtering, leave ignore_failure unset and handle the failure with on_failure instead.
There is no select on this processor. YARA rules refer to one another and use private rules, so removing individual rules from a pack could break the ones that depend on them. Narrow the rule set with library instead.
Rule Packs
Rules are supplied as packs assigned through the platform Library, one file per pack:
| Rule type | Library path |
|---|---|
| Sigma | library/sigma/<name>.yml |
| Sentinel | library/sentinel/<name>.yml |
| YARA | library/yara/<name>.yar |
A pack's name is its filename without the extension, and that name is what library refers to.
Globs are accepted, so "*" selects every assigned pack of that type and "win_*" selects those whose names begin with win_. A glob that matches nothing contributes no rules and raises no error. A name given exactly, however, must be assigned — if it is not, the processor fails with an error naming it.
The Sentinel and Smart Engine processors read the same Sentinel rule packs, so a pack assigned once can be used by both.