Lesson 7 of 13 · 16m
Sigma Is a Data Structure, Not a Query
Sigma rule anatomy — logsource, selections, modifiers like windash and all — and where pySigma conversion to SPL, KQL, and EQL stops being portable.
Sigma is a data structure that compiles to a query, not a query you write. A rule is YAML: metadata on top, a logsource declaring what telemetry it expects, a detection block containing named selections and a condition combining them, and a level. The compiler — pySigma with a backend, driven by the sigma CLI — turns that data structure into Splunk SPL, Sentinel KQL, Elastic KQL/EQL/Lucene, or Chronicle YARA-L.
The anatomy that matters
title: LSASS Memory Access
id: 8d4f8e1e-...-uuid
status: test
author: you
date: 2026/11/18
references:
- https://attack.mitre.org/techniques/T1003/001/
logsource:
category: process_access
product: windows
detection:
selection_target:
TargetImage|endswith: '\lsass.exe'
selection_access:
GrantedAccess:
- '0x1010'
- '0x1410'
filter_known:
SourceImage|startswith: 'C:\Program Files\'
condition: selection_target and selection_access and not filter_known
falsepositives:
- Antivirus and backup agents reading LSASS
level: highThe condition is a boolean expression over named selections; each selection is a map of field|modifier: values. Lists are OR by default; |all turns a list into AND — CommandLine|contains|all requires every listed substring. The modifiers are where Sigma's power lives: |contains, |startswith, |endswith, |re (regex), |cased, |fieldref (compare two fields), |exists, |base64offset, |expand (fill %var% placeholders), and |windash — which expands - to / so -enc and /enc match with one pattern, because PowerShell accepts both and attackers know it.
logsource is not decorative. category: process_creation + product: windows tells the converter which index/table and which field mappings apply. A rule with no product compiles to a generic query that may not match your field names at all.
The metadata fields earn their keep: falsepositives documents the known-benign shapes an analyst should expect (attackers read this field — SigmaHQ rules are public), references carries the technique links, level orders triage: informational < low < medium < high < critical.
Conversion is where portability ends
pySigma is the current toolchain; the legacy sigmac is deprecated. sigma convert -t splunk -t kusto rules/ does the mechanical work. What it cannot do:
- Correlation rules don't fully port. Sigma correlations (
event_count,temporal) are a newer spec layer; not every backend compiles them, and the ones that do produce queries with different windowing semantics. - Regex flavors differ. Sigma
|resemantics, Splunkregex, KQLmatches regex— escaping and syntax disagree on edge cases. - Field names are a mapping file, not magic. The converter knows
Image→process.executableonly if the backend's pipeline config says so.
The check is mechanical and should run in CI: sigma convert every rule for every target backend; a rule that fails conversion is broken before it reaches the SIEM. SigmaHQ's public repository — thousands of rules named proc_creation_win_*.yml, proc_access_win_*, registry_set_* — is both the corpus to port and the corpus attackers read. Public rules are evaded precisely because they are public; treat them as a baseline to tune, not a finished deployment.
Status is a contract
status: experimental → test → stable → deprecated is the lifecycle baked into the format. Deploy at test on real telemetry, tune exclusions, promote to stable once the false-positive rate is measured. A rule that sits at experimental in production for six months is a rule nobody owns.
Selection mechanics worth internalizing
A condition like 1 of selection_* or all of them lets one rule express "any of these three shapes" without duplicating the rule — SigmaHQ uses 1 of them patterns constantly for technique-level coverage. And unnamed selections exist for single-map detections, but name every selection anyway: the day the rule needs a second selection or a filter, you'll rewrite the condition regardless — cheaper to write it named from the start. condition: selection_target and selection_access and not filter_known reads as the hypothesis it is; condition: selection and not filter reads as a wall.
A rule is also a review surface
Because a Sigma rule is data, reviewers can diff it: a tuning pass is a YAML diff of selections and filters, not a query rewrite, and the falsepositives list travels with the logic it modifies. Keep one rule per file, filename matching SigmaHQ convention — proc_access_win_lsass_dump.yml — so grep and Navigator exports both find it without an index.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Immich Had Fourteen Advisories and One Bug It Fixed Three Times
Immich's 2026 security record runs to fourteen advisories, and they cluster hard: the sharing features, the OAuth plumbing, and one login redirect parameter that took three separate fixes across eighty-three days. Plus the 3.0 migration traps still waiting for anyone who hasn't jumped yet.
Jellyfin's Threat Model Is Your Brother-in-Law
Four Jellyfin CVEs landed in 2026 and not one of them needs an admin account. One needs only the ability to name a file. Meanwhile Jellyfin 12 shipped in September, the version numbers stopped starting with 10, and every "am I patched" check you wrote is now wrong.
Node.js Fixed 16 Flaws in One Release. Most of Them Live in HTTP/2 and TLS.
The November 11 Node.js security releases fix 16 CVEs across the 26, 24 and 22 lines, seven of them rated high. Nearly all sit in HTTP/2 and TLS, where a remote client can crash a server, leak memory, or get past per-host client-certificate checks.
Next.js Shipped Seven Advisories and Six of Them Are the Cache
The November 2026 Next.js security release patches seven issues, and six live in the new Cache Components layer, the feature meant to make your app faster by remembering more. Three hit self-hosted next start specifically: the ones Vercel's own platform quietly absorbs.