Sigma rules are detection rules written in a generic, vendor-neutral YAML format that describe suspicious patterns in log events, such as a specific process launch, registry change or authentication sequence. A converter translates each rule into the native query language of a SIEM or log platform, so one rule can run in many products. In incident response, Sigma gives teams a shared way to write, share and deploy detections without rewriting them for every tool.
The Sigma project describes itself as doing for log events what YARA does for files and Snort does for network traffic. Within cybersecurity it has become a common exchange format between threat intelligence teams, security operations centers and detection engineers.
How a Sigma rule is structured
Every Sigma rule is a YAML document with a small set of required and optional fields. The logsource block states which kind of log the rule applies to, the detection block defines named selections of field values, and the condition combines those selections with Boolean logic such as selection and not filter.
Metadata fields make rules manageable at scale. A unique identifier tracks a rule across versions, the status field shows maturity, the level field expresses severity, and tags map the rule to MITRE ATT&CK techniques. The table below lists the most important fields.
| Field | Purpose | Example value |
|---|---|---|
| title | Short human-readable name | Suspicious encoded PowerShell command |
| id | Stable UUID for tracking | Random UUID version 4 |
| logsource | Product, category or service | product windows, category process_creation |
| detection | Selections and the condition | selection with Image ending in powershell.exe |
| falsepositives | Known benign causes | Administrative scripts |
| level | Severity of a match | informational, low, medium, high, critical |
| tags | ATT&CK and other mappings | attack.execution, attack.t1059.001 |
Converting Sigma rules into platform queries
A Sigma rule does nothing on its own; it must be converted by a backend into a query for a specific platform. The current toolchain, pySigma with the sigma-cli command line tool, replaced the older sigmac converter. Each backend knows the target query language, while processing pipelines map generic Sigma field names to the field names a given log source actually uses.
The field mapping step is where most conversion errors occur. A rule written for Sysmon fields may refer to Image and CommandLine, while an endpoint product or a normalized schema such as Elastic Common Schema uses different names. Without the correct pipeline the converted query is syntactically valid but silently matches nothing.
| Target type | Example query language | Pipeline concern |
|---|---|---|
| Splunk | SPL | Sourcetype and field naming |
| Elastic stack | Lucene, EQL or ES|QL | Elastic Common Schema mapping |
| Microsoft Sentinel | KQL | Table names such as SecurityEvent |
| Log search engines | Vendor-specific syntax | Normalization of Windows event fields |
Sigma rules in incident response
During an incident, Sigma rules serve three distinct purposes. In detection they provide continuously running alerts for known attacker behavior. In threat hunting analysts convert rules into one-off queries to search historical logs for activity that predates the alert. In scoping and eradication responders write new rules from observed attacker behavior to find every affected host.
Because a rule is a portable text file, it can travel with threat intelligence reports and incident write-ups. A partner organization that runs a different SIEM can convert and deploy the same detection within hours, which shortens the mean time to detect related intrusions across a community.
How Sigma compares with related detection formats
Sigma is one of several open detection formats, each tied to a different kind of evidence. Sigma works on structured log events, whereas YARA scans file and memory content and Snort or Suricata rules inspect network packets. Indicators of compromise are simple observable values, while Sigma expresses behavior and context.
| Format | Data inspected | Typical use | Robustness against change |
|---|---|---|---|
| Sigma | Log events from systems and applications | SIEM alerting and hunting | Medium to high when behavior-based |
| YARA | Files and memory content | Malware classification, memory forensics | Medium |
| Snort and Suricata | Network packets and flows | Network intrusion detection | Medium |
| IOC lists | Hashes, IP addresses, domains | Blocklists and quick sweeps | Low, trivially changed by attackers |
Writing and maintaining effective Sigma rules
Strong rules target attacker behavior rather than artifacts. A rule that matches a specific malware hash breaks as soon as the file changes, while a rule that matches an Office application spawning a command interpreter catches many variants. Good practice is to start from a specific ATT&CK technique, test against real attack telemetry and benign baseline data, and document known false positives.
Mature teams treat detections as code, an approach called detection as code: rules live in version control, pass syntax validation and conversion tests in a CI pipeline and are reviewed before deployment. The public SigmaHQ repository provides thousands of community rules that serve as a starting point, but each one still needs local tuning before it runs in production.
Limitations and common mistakes
Sigma abstracts query languages but cannot invent missing telemetry. A rule for process command lines is useless if command line logging is disabled. The following table lists frequent problems.
| Problem | Cause | Fix |
|---|---|---|
| Rule never fires | Wrong field mapping or missing log source | Use the correct pipeline and verify logging |
| Alert flood | Generic selection without filters | Add filters and tune against baseline data |
| Different results per platform | Backend handles wildcards or case differently | Test converted queries on each target |
| Stale rules | No ownership or review cycle | Track status and review rules periodically |
Complex correlation across many events, such as multi-stage sequences over time, has long been a weak point. Newer Sigma correlation rules address counting and temporal sequences, but backend support varies, so complex logic sometimes still needs native platform queries.
In plain words
Computers keep diaries called logs, recording what programs start, who logs in and what changes. Security teams search these diaries for signs of an attack, but every search tool speaks its own language.
Sigma rules are a shared recipe format for those searches. A defender writes the recipe once, for example “warn me when a Word document starts a command window”, and a translator turns it into the language of whatever tool a company uses. That way one good idea can protect many organizations.
A real-world example
A regional hospital detects ransomware precursor activity on one workstation: an attacker used a scheduled task to run an encoded PowerShell command. The incident response team writes a Sigma rule for that behavior, selecting scheduled task creation events whose command line contains an encoded PowerShell argument.
Using sigma-cli with the hospital’s KQL backend and field pipeline, the team converts the rule and runs it against 90 days of historical logs. The hunt reveals two additional infected hosts that had not triggered any alert, which the team isolates before encryption begins.
The team then shares the rule with a regional health-sector information sharing group. A partner using a different SIEM converts the same file to SPL and deploys the detection the same afternoon, finding no matches but gaining coverage against the same technique.