writing-sigma-detection-rules
Converts hunt findings into portable Sigma detection rules: choosing the right
v1.0.03 installs+3 in 7 days24 StarsApache-2.0synced 10 hours ago
Install
No NotHoly CLI yet? Install it first.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/writing-sigma-detection-rulesWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Packagefbe8ec0e…4714f248
fbe8ec0e9c7d…cc1f4714f2484 files · 3.0 KBScanMedium3 findings
- Executable script shipped with the skillscripts/analyst.py
- command.base64_execscripts/analyst.py:34
- Links to outside domains
Sourcegithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/writing-sigma-detection-rules@da7600a
On this page
When to Use
- A hunt produced reliable logic and you want a portable, SIEM-agnostic detection.
- You need to share or version a detection in a standard format and tag it to ATT&CK.
- You are translating a vendor query into Sigma for reuse across backends.
Do not use Sigma for stateful/correlation logic it cannot express well (complex sequence or statistical detections) — keep those in the SIEM's native correlation engine.
Prerequisites
- The
sigmaCLI /sigma-cli(pysigma) for validation and conversion. - Knowledge of the target log source's field names and the Sigma taxonomy.
Workflow
Step 1: Define the logsource
Pin category/product/service precisely (e.g., product: windows,
category: process_creation) so the rule maps to the right pipeline.
Step 2: Write robust selection logic
Express the detection on stable fields. Prefer multiple ANDed conditions over a single brittle
string; use contains/endswith modifiers thoughtfully to resist evasion.
python scripts/analyst.py scaffold --title "Encoded PowerShell" --category process_creation \
--technique T1059.001 --level highStep 3: Add filters to cut false positives
Use a filter block (negated in the condition) to exclude known-good processes/paths rather
than narrowing selection until it misses variants.
Step 4: Tag and document
Add tags (ATT&CK technique), level, status, references, and a falsepositives list so
consumers can tune.
Step 5: Validate and convert
Lint the rule, then convert to the target backend and test against true/false-positive data before deploying.
sigma convert -t splunk rules/encoded_powershell.ymlValidation
- The rule passes Sigma schema validation (
sigma check). - It fires on the hunt's true positives and not on the documented benign cases.
- Conversion to the target backend produces a sensible, runnable query.
Pitfalls
- Over-narrow selection that matches one sample and misses the technique.
- Wrong logsource, so the rule never sees the relevant events.
- No
falsepositives/filter, producing a noisy alert that gets ignored.
References
- See
references/api-reference.mdfor the Sigma scaffolder. - Sigma specification and rules repository (linked in frontmatter).
Files in this version
references/11.2 KB
- api-reference.md1.2 KB
scripts/12.0 KB
- analyst.py2.0 KB
- LICENSE340 B
- SKILL.md3.1 KB
Permissions
| Permission | Declared | Found by the scan |
|---|---|---|
| Reads files | No | No |
| Writes files | No | No |
| Runs shell commands | Yes | Yes |
| Uses the network | Yes | Yes |
| Uses connectors | No | No |
| Drives a browser | No | No |
Scan findings
Reviewed on Nov 13, 2026
- MediumFile · Executable script shipped with the skillscripts/analyst.py
- MediumCommand · command.base64_execscripts/analyst.py:34
- InfoLink · Links to outside domains
A clean scan lowers the risk but does not prove a package is safe. Read what you install.
| Version | Published | Commit | SHA-256 | Signature | Permission change |
|---|---|---|---|---|---|
| v1.0.0 | Nov 13, 2026 | da7600a | fbe8ec0e | Signed | – |
More from meltedinhex
All from this publisher- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-a-malware-analysis-reportmeltedinhex/writing-a-malware-analysis-report3
More in Malware and ransomware analysis
See the category- yara-sigsdariushoule/yara-sigs4
- monitoring-darkweb-sourcesmukul975/monitoring-darkweb-sources3
- deploying-ransomware-canary-filesmukul975/deploying-ransomware-canary-files3
- implementing-honeypot-for-ransomware-detectionmukul975/implementing-honeypot-for-ransomware-detection3
- yaraaeondave/yara3
- testing-ransomware-recovery-proceduresmukul975/testing-ransomware-recovery-procedures3
Ask anything your scope allows.
Create an account, add credits and ask the first question in the chat or the terminal.
- 1/3
Create the account
Individual or company. You can switch to a company later without losing balance or keys.
IndividualCompany - 2/3
Add credits
By card. Pay per token, no subscription.
$5.00minimum deposit - 3/3
Ask
In the chat, or install the CLI and run notholy login in your terminal.
$ notholy login