Sigma rules Run community Sigma detections against digger's process and network telemetry.

What we support

Sigma is the de-facto open detection-rule format. digger ships a pragmatic, zero-dependency loader that supports a useful subset of the spec — enough to run the bulk of real-world process-creation and network-connection rules.

Where rules come from

The SigmaLoader walks two directories by default:

Pass --dirs path1,path2 to digger sigma to add others.

Sigma featureSupported
logsource.category: process_creationYes — matches against the processes collector
logsource.category: network_connectionYes — matches against the network collector
detection.<selection> with field mapYes
Modifiers: contains, startswith, endswith, reYes
Conditions: selection, sel1 and sel2, sel1 or sel2Yes
Top-level keyword listsYes (matches anywhere in record values)
Complex conditions with parentheses, count aggregation, near-by correlationNo — rule skipped silently
Other log sources (registry_event, dns, file_event, …)No

Rules that use unsupported features are silently skipped, not failed.

Field mappings

Sigma uses Sysmon-style field names. digger maps them to the equivalent fields on its process/network artifacts:

Sigma fielddigger artifact field
Image / exeprocesses.data.exe
CommandLine / cmdlineprocesses.data.cmdline (joined with space)
ParentImageResolved via processes.data.ppid → parent's exe
ParentCommandLineResolved via ppid → parent's cmdline
User / Usernameprocesses.data.username
DestinationIp / DestinationHostnamenetwork.data.raddr[0]
DestinationPortnetwork.data.raddr[1]

Running

# Run with default rule dirs (digger/rules/sigma/)
digger sigma --case-dir ./case-1

# Run with your own rule directories
digger sigma --case-dir ./case-1 --dirs ~/sigma-rules,/etc/digger/sigma

Or programmatically:

from digger.exchange.sigma import SigmaDetector
from pathlib import Path

n = SigmaDetector(dirs=[Path("~/sigma-rules").expanduser()]).run(store)
print(f"{n} sigma findings")

Example rule

title: Encoded PowerShell stager
id: 11111111-2222-3333-4444-555555555555
description: powershell.exe with the -EncodedCommand argument and a long base64 blob
level: high
tags:
  - attack.t1059.001
  - attack.execution
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    Image|endswith: '\powershell.exe'
    CommandLine|contains:
      - '-EncodedCommand'
      - '-enc'
  condition: selection

When this rule fires, digger emits a Finding tagged with severity high, MITRE technique T1059.001 (extracted from the attack.t1059.001 tag), and references to the matched process artifact.

Where to find rules

Drop them under digger/rules/sigma/ for them to be picked up without --dirs. Subdirectories are supported (the loader uses rglob).