ranilojohn/claude-blue/defensive-sigma
Claude Code and agent skill by ranilojohn/claude-blue
- community
Checking that the SKILL.md file is still in the repository.
Sigma detection rule engineering. Use when writing, reviewing, converting, or tuning Sigma rules; choosing logsource product/category/service; using modifiers (contains, startswith, endswith, all, re, cidr, windash, base64offset, fieldref, exists, gt/lt); writing Sigma correlation rules (event_count, value_count, temporal, temporal_ordered) and Sigma filters; converting with pySigma/sigma-cli to Splunk SPL, Microsoft Sentinel/Defender KQL (kusto backend, microsoft_xdr / sentinel_asim pipelines)…
Install
npx vskill@latest install ranilojohn/claude-blue/defensive-sigmaSKILL.md
The same SKILL.md was published earlier as ranilojohn/claude-blue/defensive-sigma.
Sigma Rules
Sigma is the vendor-neutral detection language. Write logic once, convert per backend, version in Git. A Sigma rule is only as good as the field mapping that converts it.
Quick Workflow
- Define the behavior and required telemetry
- Choose
logsourceprecisely - Write
detectionwith selections + filters - Add FP, level, ATT&CK tags, references
sigma check→ convert → test against TP/FP samples- Deploy in log-only, tune, promote
1. Rule Anatomy
Tags use lowercase hyphenated tactic names (attack.credential-access) and technique IDs (attack.t1003.001).
2. Logsource
| Field | Examples | |
|---|---|---|
product | windows, linux, macos, aws, azure, gcp, m365, okta, github, kubernetes, zeek | |
category | process_creation, network_connection, file_event, registry_set, image_load, process_access, dns_query, ps_script, pipe_created, create_remote_thread | |
service | security, system, sysmon, powershell, cloudtrail, signinlogs, auditlogs, auditd, sshd |
Use category for generic Sysmon/EDR-style events (portable). Use service for specific channels (e.g. service: security for 4769).
3. Modifiers
| Modifier | Meaning | |
|---|---|---|
contains / startswith / endswith | Substring/anchor match (case-insensitive by default) | |
all | All list values must match (default for lists is OR) | |
re | Regex (backend-dependent flavor; keep simple) | |
cased | Case-sensitive | |
windash | Expands - to /, –, —, ― variants for CLI flags | |
base64 / base64offset | Match Base64-encoded forms (offset handles alignment) | |
utf16le / wide | Encode before base64 (PowerShell -enc) | |
cidr | IP in network range | |
exists | Field present/absent | |
fieldref | Compare field to another field | |
gt gte lt lte | Numeric comparisons | |
expand | Placeholder expansion (%DomainControllers%) via pipeline |
Example — encoded PowerShell catching both flag styles:
4. Conditions
Naming convention: selection_* for positives, filter_main_* for always-applicable exclusions, filter_optional_* for environment-specific ones.
5. Correlation Rules (Sigma v2)
Backend support for correlation varies (Splunk, Elastic ES|QL/EQL, Kusto supported in recent pySigma backends) — verify with sigma convert output.
Sigma Filters
Separate environment exclusions from the shared rule:
6. Conversion (pySigma / sigma-cli)
Kusto backend (formerly microsoft365defender) ships microsoft_xdr, sentinel_asim, and azure_monitor pipelines. Stack custom pipelines with multiple -p flags for local field names.
7. Run Sigma Directly on EVTX
8. Quality Checklist
Engagement Cheatsheet
Key References
- Sigma specification v2 — https://github.com/SigmaHQ/sigma-specification
- SigmaHQ rules — https://github.com/SigmaHQ/sigma
- pySigma / sigma-cli — https://github.com/SigmaHQ/pySigma
- pySigma-backend-kusto — https://github.com/AttackIQ/pySigma-backend-kusto
- Hayabusa (Yamato Security), Chainsaw (WithSecure)
- Related:
defensive-query-languages,defensive-detection-as-code
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSkills/detection/defensive-sigma/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ranilojohn/claude-blue/defensive-sigma)