[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C31VP3Y82MQ7R67QZWCKSC":3,"skill-same:01M6C31VP3Y82MQ7R67QZWCKSC":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":58,"commitSha":59,"skillDirectory":60,"forksCount":61,"repositoryHtmlUrl":62,"repositoryHomepageUrl":63,"ownerHtmlUrl":64,"ownerBlogUrl":65,"ownerDescription":66,"updatedAt":67,"install":68,"resources":81},"01M6C31VP3Y82MQ7R67QZWCKSC","sigma-hunting","Sigma 规则威胁狩猎","Apply Sigma rules against log sources for threat hunting; convert rules to Elasticsearch, Splunk, and grep queries","将 Sigma 规则应用于日志源进行威胁狩猎；将规则转换为 Elasticsearch、Splunk 和 grep 查询。","jmagly\u002Faiwg","jmagly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1159087?v=4","01M6C10AK8N2WCSQN11FYGTJWN","Joseph Magly","01M6C10AQ8A2RMED1Y1BSVY7NF",229,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fsigma-hunting\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BR4MYFKGCC4WCWVJ50KJ2C","安全工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTHYSJPJ500X64JJ5CH06D","安全事件响应与威胁狩猎","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"sigma","hunting","sigma hunting","write","apply","for","sources","queries","log","threat","threat hunting","read","grep","Rules","convert","Bash","elasticsearch","splunk","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nname: sigma-hunting\ndescription: \"Apply Sigma rules against log sources for threat hunting; convert rules to Elasticsearch, Splunk, and grep queries\"\ntools: Bash, Read, Write, Glob, Grep\nplatforms: [all]\n\n---\n\n# sigma-hunting\n\nApplies 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.\n\n## Triggers\n\n\nAlternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):\n\n- \"ATT&CK [technique]\" \u002F \"MITRE [TID]\" → technique-specific threat hunt\n- \"T1059\" \u002F \"T1053\" (etc.) → ATT&CK technique ID lookups\n- \"Sigma rules\" → rule-based threat hunting\n\n## Purpose\n\nSigma 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.\n\n## Behavior\n\nWhen triggered, this skill:\n\n1. **Identify available rule sources**:\n   - Bundled rules: `agentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fsigma\u002F`\n   - Custom rules: `.aiwg\u002Fforensics\u002Fsigma\u002Fcustom\u002F`\n   - Check for sigma-cli or pySigma installation: `sigma --version 2>\u002Fdev\u002Fnull`\n   - If sigma-cli is unavailable, use built-in grep-based conversion for simple rules\n\n2. **Identify target log sources and backends**:\n   - Detect available log sources: journald, flat files, Elasticsearch index, Splunk index\n   - Match Sigma `logsource` categories to available sources:\n     - `category: process_creation` → syslog, auditd logs, or EDR telemetry\n     - `category: network_connection` → firewall logs, VPC flow logs, Zeek conn.log\n     - `category: webserver` → nginx\u002FApache access logs\n     - `product: linux` → auth.log, syslog, journal\n     - `product: windows` → Windows Event Log exports (.evtx or JSON)\n\n3. **Select applicable rules**:\n   - Filter rule library by `logsource` compatibility with available sources\n   - If a specific MITRE technique is requested (e.g., \"hunt for T1059\"), filter by `tags: attack.t1059*`\n   - Apply severity filter: default to `medium`, `high`, `critical` rules only\n   - List selected rules and their ATT&CK technique mappings before execution\n\n4. **Convert rules to grep (offline log files)**:\n   - Parse Sigma YAML detection field\n   - Convert `selection` keywords to extended grep patterns:\n     ```bash\n     grep -Ei 'pattern1|pattern2' \u002Fvar\u002Flog\u002Fauth.log\n     ```\n   - Handle `condition: selection and not filter` by piping through a second grep with `-v`\n   - Note: grep conversion handles keyword-only rules; complex field-mapped rules require sigma-cli\n\n5. **Convert rules via sigma-cli (when available)**:\n   - Elasticsearch backend:\n     ```bash\n     sigma convert -t elasticsearch -f lucene rules\u002Fsigma\u002Flinux\u002F > hunt-queries.txt\n     ```\n   - Splunk backend:\n     ```bash\n     sigma convert -t splunk rules\u002Fsigma\u002Flinux\u002F > hunt-spl.txt\n     ```\n   - Execute converted queries against the target index or log source\n\n6. **Execute hunts and collect matches**:\n   - Run each rule against the target log source\n   - Record: rule name, ATT&CK technique, match count, first and last match timestamp, sample matching lines\n   - Group results by ATT&CK tactic for reporting\n\n7. **Triage matches**:\n   - Flag rules with zero matches (coverage gap) vs rules with matches (hits)\n   - For each hit: extract relevant fields (source IP, username, process name, command line)\n   - Cross-reference extracted values with IOC list from `ioc-extraction` skill\n\n8. **Apply custom rules**:\n   - Load any `.yml` files from `.aiwg\u002Fforensics\u002Fsigma\u002Fcustom\u002F`\n   - Validate YAML structure and required Sigma fields before execution\n   - Report custom rule coverage alongside bundled rule results\n\n9. **Write hunt report**:\n   - Save to `.aiwg\u002Fforensics\u002Ffindings\u002F\u003Chostname>-sigma-hunt.md`\n   - Include: rules applied, hits per rule, ATT&CK tactic coverage map, sample evidence per hit, coverage gaps\n\n## Usage Examples\n\n### Example 1 — Full hunt against local logs\n```\nsigma hunt\n```\n\n### Example 2 — Hunt for specific technique\n```\nhunt for T1078\n```\n\n### Example 3 — Convert rules for Elasticsearch\n```\nsigma rules --backend elasticsearch --output hunt-queries.txt\n```\n\n## Output Locations\n\n- Hunt report: `.aiwg\u002Fforensics\u002Ffindings\u002F\u003Chostname>-sigma-hunt.md`\n- Converted queries: `.aiwg\u002Fforensics\u002Fsigma\u002Fconverted\u002F`\n- Rule hit evidence: `.aiwg\u002Fforensics\u002Fevidence\u002Fsigma-hits.txt`\n\n## Configuration\n\n```yaml\nsigma_hunting:\n  bundled_rules_path: agentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fsigma\u002F\n  custom_rules_path: .aiwg\u002Fforensics\u002Fsigma\u002Fcustom\u002F\n  default_severity_filter:\n    - medium\n    - high\n    - critical\n  default_backend: grep\n  available_backends:\n    - grep\n    - elasticsearch\n    - splunk\n  sigma_cli_path: sigma\n```\n\n## References\n\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Frules\u002Fresearch-before-decision.md — Identify available log sources and rule libraries before executing hunts; check tool availability\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Frules\u002Fevidence-integrity.md — Hunting must not modify log sources; run rules against read-only copies\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Frules\u002Fred-flag-escalation.md — Escalate to human when Sigma hits indicate active compromise or critical severity findings\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fioc-extraction\u002FSKILL.md — Cross-reference Sigma rule hits against extracted IOCs for confirmation\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Flog-analysis\u002FSKILL.md — Log analysis skill provides the correlated timeline that Sigma hunting adds detection coverage to\n","# sigma-hunting\n\nApplies 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.\n\n## Triggers\n\n\nAlternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description):\n\n- \"ATT&CK [technique]\" \u002F \"MITRE [TID]\" → technique-specific threat hunt\n- \"T1059\" \u002F \"T1053\" (etc.) → ATT&CK technique ID lookups\n- \"Sigma rules\" → rule-based threat hunting\n\n## Purpose\n\nSigma 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.\n\n## Behavior\n\nWhen triggered, this skill:\n\n1. **Identify available rule sources**:\n   - Bundled rules: `agentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fsigma\u002F`\n   - Custom rules: `.aiwg\u002Fforensics\u002Fsigma\u002Fcustom\u002F`\n   - Check for sigma-cli or pySigma installation: `sigma --version 2>\u002Fdev\u002Fnull`\n   - If sigma-cli is unavailable, use built-in grep-based conversion for simple rules\n\n2. **Identify target log sources and backends**:\n   - Detect available log sources: journald, flat files, Elasticsearch index, Splunk index\n   - Match Sigma `logsource` categories to available sources:\n     - `category: process_creation` → syslog, auditd logs, or EDR telemetry\n     - `category: network_connection` → firewall logs, VPC flow logs, Zeek conn.log\n     - `category: webserver` → nginx\u002FApache access logs\n     - `product: linux` → auth.log, syslog, journal\n     - `product: windows` → Windows Event Log exports (.evtx or JSON)\n\n3. **Select applicable rules**:\n   - Filter rule library by `logsource` compatibility with available sources\n   - If a specific MITRE technique is requested (e.g., \"hunt for T1059\"), filter by `tags: attack.t1059*`\n   - Apply severity filter: default to `medium`, `high`, `critical` rules only\n   - List selected rules and their ATT&CK technique mappings before execution\n\n4. **Convert rules to grep (offline log files)**:\n   - Parse Sigma YAML detection field\n   - Convert `selection` keywords to extended grep patterns:\n     ```bash\n     grep -Ei 'pattern1|pattern2' \u002Fvar\u002Flog\u002Fauth.log\n     ```\n   - Handle `condition: selection and not filter` by piping through a second grep with `-v`\n   - Note: grep conversion handles keyword-only rules; complex field-mapped rules require sigma-cli\n\n5. **Convert rules via sigma-cli (when available)**:\n   - Elasticsearch backend:\n     ```bash\n     sigma convert -t elasticsearch -f lucene rules\u002Fsigma\u002Flinux\u002F > hunt-queries.txt\n     ```\n   - Splunk backend:\n     ```bash\n     sigma convert -t splunk rules\u002Fsigma\u002Flinux\u002F > hunt-spl.txt\n     ```\n   - Execute converted queries against the target index or log source\n\n6. **Execute hunts and collect matches**:\n   - Run each rule against the target log source\n   - Record: rule name, ATT&CK technique, match count, first and last match timestamp, sample matching lines\n   - Group results by ATT&CK tactic for reporting\n\n7. **Triage matches**:\n   - Flag rules with zero matches (coverage gap) vs rules with matches (hits)\n   - For each hit: extract relevant fields (source IP, username, process name, command line)\n   - Cross-reference extracted values with IOC list from `ioc-extraction` skill\n\n8. **Apply custom rules**:\n   - Load any `.yml` files from `.aiwg\u002Fforensics\u002Fsigma\u002Fcustom\u002F`\n   - Validate YAML structure and required Sigma fields before execution\n   - Report custom rule coverage alongside bundled rule results\n\n9. **Write hunt report**:\n   - Save to `.aiwg\u002Fforensics\u002Ffindings\u002F\u003Chostname>-sigma-hunt.md`\n   - Include: rules applied, hits per rule, ATT&CK tactic coverage map, sample evidence per hit, coverage gaps\n\n## Usage Examples\n\n### Example 1 — Full hunt against local logs\n```\nsigma hunt\n```\n\n### Example 2 — Hunt for specific technique\n```\nhunt for T1078\n```\n\n### Example 3 — Convert rules for Elasticsearch\n```\nsigma rules --backend elasticsearch --output hunt-queries.txt\n```\n\n## Output Locations\n\n- Hunt report: `.aiwg\u002Fforensics\u002Ffindings\u002F\u003Chostname>-sigma-hunt.md`\n- Converted queries: `.aiwg\u002Fforensics\u002Fsigma\u002Fconverted\u002F`\n- Rule hit evidence: `.aiwg\u002Fforensics\u002Fevidence\u002Fsigma-hits.txt`\n\n## Configuration\n\n```yaml\nsigma_hunting:\n  bundled_rules_path: agentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fsigma\u002F\n  custom_rules_path: .aiwg\u002Fforensics\u002Fsigma\u002Fcustom\u002F\n  default_severity_filter:\n    - medium\n    - high\n    - critical\n  default_backend: grep\n  available_backends:\n    - grep\n    - elasticsearch\n    - splunk\n  sigma_cli_path: sigma\n```\n\n## References\n\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Frules\u002Fresearch-before-decision.md — Identify available log sources and rule libraries before executing hunts; check tool availability\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Frules\u002Fevidence-integrity.md — Hunting must not modify log sources; run rules against read-only copies\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Frules\u002Fred-flag-escalation.md — Escalate to human when Sigma hits indicate active compromise or critical severity findings\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fioc-extraction\u002FSKILL.md — Cross-reference Sigma rule hits against extracted IOCs for confirmation\n- @$AIWG_ROOT\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Flog-analysis\u002FSKILL.md — Log analysis skill provides the correlated timeline that Sigma hunting adds detection coverage to\n",{"name":5,"tools":54,"namespace":55,"platforms":56,"description":7},"Bash, Read, Write, Glob, Grep","aiwg",[57],"all","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fsigma-hunting",36,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg","https:\u002F\u002Faiwg.io","https:\u002F\u002Fgithub.com\u002Fjmagly","https:\u002F\u002Fintegrolabs.io","ml\u002Fai, industrial automation, safety\u002Fsecurity, ssi\r\n\r\nmagly.net\r\nintegrolabs.io\r\naiwg.io\r\nfortemi.com\r\npagenary.com\r\nbytecask.com","2026-11-14 10:46:34",{"source":9,"skillName":5,"commands":69,"prompt":79,"zipAvailable":80},[70,73,76],{"tool":71,"command":72},"npx","npx skills add jmagly\u002Faiwg --skill sigma-hunting",{"tool":74,"command":75},"bunx","bunx skills add jmagly\u002Faiwg --skill sigma-hunting",{"tool":77,"command":78},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill sigma-hunting","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fsigma-hunting\u002FSKILL.md",true,[],[83,91,96,121,140,145],{"skillNo":84,"name":85,"nameZh":17,"description":86,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":90},"01M78KW7PZJ9YQZQMW84SN2YD4","plugin-search","Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Futils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":92,"name":85,"nameZh":17,"description":86,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":90},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":17,"description":99,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":49},"01M70QA0BSYJ49EES9V4RE8QH1","host-hardening","Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[103,104,105,106,107,42,108,109,110,111,112,113,114,46,115,116,117,118,119,120],"hardening","host","host hardening","verification","secrets","request","remediation","recommendations","audit","plan","port","bind","access","only","retention","re","never","firewall",{"skillNo":122,"name":123,"nameZh":17,"description":124,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":49},"01M70PNT2Z4HMZPRBTAF6073NN","exposure-analysis","Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[128,129,130,131,132,34,42,133,113,119,46,134,104,135,116,136,137,120,138,139],"analysis","exposure analysis","collection","reconstruction","operator","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":141,"name":98,"nameZh":17,"description":99,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":49},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[103,104,105,118,119,120,114,117,110,107,42,108,109,111,112,113,106,46,115,116],{"skillNo":146,"name":123,"nameZh":17,"description":124,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":49},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[128,129,139,138,132,137,136,116,131,34,42,133,113,130,46,134,104,120,119,135]]