Sigma rule structure
Portable detection intent
Sigma expresses log detection intent in YAML. A title names the behavior; logsource identifies the data family; detection contains named selections and a condition that combines them. Metadata such as level, status and falsepositives aids review. It is not a SIEM engine or a guarantee of matching across backends.
A harmless classroom rule
The example selects fictional classroom review events, not real identity logs. Both field comparisons in the selection must match.
title: Classroom Review Markerstatus: experimentallogsource: product: classroom service: reviewdetection: selection: action: review marker: BM_REVIEW condition: selectionlevel: lowfalsepositives: - Scheduled classroom exerciseA matching marker requests review; it is not evidence of malicious activity.
Conversion and mapping
A backend converts rule intent into a query language; a processing pipeline maps field and source names. For instance, a classroom action field might map to event.action in one index. Verify source filters, case behavior, null handling and output using fixtures in the destination engine. A valid YAML document does not establish a correct conversion.
Other rule families
YARA classifies file or memory content using string and condition expressions. In this course use only inert text: rule Classroom { strings: $m = "BM_REVIEW" condition: $m }. Suricata evaluates network traffic signatures with a header and options; use only synthetic offline captures, never unrelated traffic. A benign marker in a file or packet is a classification signal, not malware evidence. The engines and data contracts differ.
Practice
Inspect the included classroom YAML. Predict which rows match its selection, which have a different source, and which are malformed. Explain why the local Python comparison is only a restricted model and why a destination-specific regression test remains necessary. Compare Sigma log records, YARA text and Suricata capture inputs.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Sigma rule structure — knowledge check
Apply detection hypotheses, rule structure, regression and lifecycle principles to fictional scenarios.
What does logsource describe?
When does the example selection match?
Why check destination queries?
What does the YARA example classify?
What is the safe input for Suricata study here?