Sigma hunting

From jmagly/aiwg · View interactive version

Sigma hunting is an AI agent skill from the GitHub repository jmagly/aiwg. Apply Sigma rules against log sources for threat hunting; convert rules to Elasticsearch, Splunk, and grep queries

How to use this skill

Skill file

sigma-hunting

Applies Sigma detection rules against collected log sources to identify threat activity. Supports the bundled forensics-complete Sigma rule library and custom rules. Converts Sigma rules to backend-specific queries for Elasticsearch, Splunk, and grep, enabling hunting across both real-time platforms and offline log files.

Triggers

Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):

Purpose

Sigma provides a vendor-neutral rule format for expressing detection logic. Writing backend-specific queries for every log source and SIEM is time-consuming and error-prone. This skill translates Sigma rules to the appropriate query format for the available tooling, applies them against collected logs, and reports matches with ATT&CK technique context.

Behavior

When triggered, this skill:

  1. Identify available rule sources:
  1. Identify target log sources and backends:
  1. Select applicable rules:
  1. Convert rules to grep (offline log files):

```bash

grep -Ei 'pattern1|pattern2' /var/log/auth.log

```

  1. Convert rules via sigma-cli (when available):

```bash

sigma convert -t elasticsearch -f lucene rules/sigma/linux/ > hunt-queries.txt

```

```bash

sigma convert -t splunk rules/sigma/linux/ > hunt-spl.txt

```

  1. Execute hunts and collect matches:
  1. Triage matches:
  1. Apply custom rules:
  1. Write hunt report:

Usage Examples

Example 1 — Full hunt against local logs

sigma hunt

Example 2 — Hunt for specific technique

hunt for T1078

Example 3 — Convert rules for Elasticsearch

sigma rules --backend elasticsearch --output hunt-queries.txt

Output Locations

Configuration

sigma_hunting:
  bundled_rules_path: agentic/code/frameworks/forensics-complete/sigma/
  custom_rules_path: .aiwg/forensics/sigma/custom/
  default_severity_filter:
    - medium
    - high
    - critical
  default_backend: grep
  available_backends:
    - grep
    - elasticsearch
    - splunk
  sigma_cli_path: sigma

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.