Guides writing SIGMA detection rules (YAML) for vendor-agnostic threat detection. Covers rule structure, log sources, field modifiers, and detection logic.
Ships in cti-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
SIGMA rules are vendor-agnostic detection rules written in YAML. They can be converted to platform-specific query languages (Splunk SPL, Elastic KQL, Microsoft Sentinel KQL, etc.).
title: Descriptive title of the detection
id: <UUID> # Generate a unique UUID
status: experimental|test|stable
description: >
Detailed description of what this rule detects and why.
references:
- https://reference-url.com # Source intelligence, blog posts, CVE
author: CTI Platform
date: YYYY/MM/DD
modified: YYYY/MM/DD
tags:
- attack.initial_access # ATT&CK tactic (lowercase, dots)
- attack.t1566.001 # ATT&CK technique
- cve.2024.12345 # CVE if applicable
logsource:
category: process_creation # Log category
product: windows # OS/product
service: # Optional: specific service
detection:
selection:
FieldName|modifier:
- 'value1'
- 'value2'
filter_known_good:
FieldName: 'legitimate_value'
condition: selection and not filter_known_good
falsepositives:
- Description of known false positive scenario
level: critical|high|medium|low|informational
| Category | Description | Common fields |
|---|---|---|
process_creation | New process started | Image, CommandLine, ParentImage, User |
network_connection | Network connection initiated | DestinationIp, DestinationPort, SourceIp |
file_event | File created/modified/deleted | TargetFilename, Image |
registry_event | Registry key/value change | TargetObject, Details |
dns_query | DNS resolution | QueryName, QueryType |
image_load | DLL/module loaded | ImageLoaded, Image |
pipe_created | Named pipe created | PipeName |
ps_script | PowerShell script execution | ScriptBlockText |
webserver | Web server access logs | cs-uri-query, c-ip |
firewall | Firewall logs | src-ip, dst-ip, dst-port, action |
| Modifier | Description | Example |
|---|---|---|
contains | Substring match | CommandLine|contains: '-enc' |
startswith | Starts with | Image|startswith: 'C:\Temp' |
endswith | Ends with | Image|endswith: '\powershell.exe' |
re | Regex match | CommandLine|re: '.*-e(nc)?.*' |
base64offset | Base64 encoded content | CommandLine|base64offset: 'IEX' |
all | All values must match | CommandLine|contains|all: |
cidr | CIDR range match | DestinationIp|cidr: '10.0.0.0/8' |
and — All conditions must matchor — Any condition must matchnot — Negate a condition1 of selection* — Any of the named selections matching selection*all of selection* — All named selections must matchProcess execution with specific arguments:
detection:
selection:
Image|endswith: '\cmd.exe'
CommandLine|contains:
- '/c whoami'
- '/c ipconfig'
- '/c net user'
condition: selection
Suspicious parent-child relationship:
detection:
selection:
ParentImage|endswith: '\outlook.exe'
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\wscript.exe'
condition: selection
Network connection to suspicious destination:
detection:
selection:
DestinationIp|cidr:
- '185.220.0.0/16'
filter_internal:
SourceIp|cidr: '10.0.0.0/8'
condition: selection and not filter_internal
tags:
- attack.tactic_name # e.g., attack.initial_access
- attack.tXXXX # e.g., attack.t1566
- attack.tXXXX.XXX # e.g., attack.t1566.001 (sub-technique)
Common tactic tags: attack.initial_access, attack.execution, attack.persistence, attack.privilege_escalation, attack.defense_evasion, attack.credential_access, attack.discovery, attack.lateral_movement, attack.collection, attack.command_and_control, attack.exfiltration, attack.impact
id fieldWrite SIGMA rules to: data/detection-rules/sigma/<technique-id>-<slug>.yml
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sigma-rules, detection-rules, security-detection, siem, yaml-rules
/cti-skills:sigma-writingfrom cti-skills
npx claudepluginhub liberty91ltd/cti-skills --plugin cti-skills78 skills in this plugin
/abuseipdb-apiAbuseIPDB API reference. IP reputation and abuse report lookups./achAnalysis of Competing Hypotheses — structured technique for evaluating multiple explanations against evidence. Use when facing ambiguous attribution or multiple plausible scenarios. Prefers graded evidence items from /quality-of-information-check and runs that skill first when handed raw URLs or text. Runs on ungraded evidence when asked, labelled as such, unweighted, and capped at Moderate confidence./campaign-trackingUse when documenting a named campaign across time and victims, the user asks to start or update a campaign record, or another skill identified a multi-incident cluster that warrants formal tracking. Provides the template (timeline, attribution, victimology, attack chain, Diamond Model mapping, IOC clusters) and the lifecycle from active to historical./carding-financial-fraudUse when the user asks about carding, BIN attacks, payment-card breach markets, fullz/CVV2 trade, autoshops (BidenCash, Brian's Club, Russianmarket, B1ack's Stash), or financial-fraud TTPs. Self-updating knowledge cell./censys-apiCensys API v2 reference. Host reconnaissance and certificate data./china-cyber-espionageUse when the user asks about Chinese state-sponsored cyber operations or specific PRC-aligned actors (APT41, Volt Typhoon, Mustang Panda, APT10, APT31, Salt Typhoon, etc.), MSS/PLA-attributed campaigns, or PRC sector targeting. Self-updating knowledge cell.Other plugins' skills for the same job