1392081456/sigma-detection-rules
GitHub: 1392081456/sigma-detection-rules
基于本地漏洞复现环境编写的 Sigma 检测规则与 Suricata 特征码集合,覆盖 23 个已公开 CVE,支持多种 SIEM 平台的威胁狩猎查询。
Stars: 0 | Forks: 0
# Sigma 检测规则
[](https://github.com/1392081456/sigma-detection-rules/actions/workflows/ci.yml)
[](LICENSE)




## 这是什么
本仓库中的每一条规则都对应一个**已在独立的 vulhub Docker 容器中复现的已公开 CVE**。这些规则不是预期性的——它们是在观察针对已知存在漏洞的本地托管目标的实际利用流量时编写的,随后还在相同软件的修补版本上进行了验证,以检查是否存在误报。
本仓库包含:
| 路径 | 内容 |
|---|---|
| [`rules/`](rules/) | 30 个 Sigma YAML 规则,按 CVE 目录分组 |
| [`suricata/`](suricata/) | 24 个 Suricata 特征码(`.rules` 文件),按 CVE 目录分组 |
| [`hunting/`](hunting/) | 针对 6 个代表性 CVE 的**威胁狩猎查询**,支持 3 种 SIEM 方言(Splunk SPL / Sentinel KQL / Elastic ES\|QL),每个都带有狩猎后溯源 |
| [`scripts/extract_rules.py`](scripts/extract_rules.py) | 从上游 [`ctf-notes/labs/*/writeup_en.md`](https://github.com/1392081456/ctf-notes/tree/main/labs) 分析报告中提取规则,以便整个目录树可以重新生成 |
| [`scripts/lint_sigma.py`](scripts/lint_sigma.py) | 针对 Sigma YAML 的结构性 lint——检查必填字段、可解析性,以及是否包含 `detection.condition` |
| [`scripts/lint_suricata.py`](scripts/lint_suricata.py) | 针对 Suricata 的结构性 lint——检查 `sid` / `msg` / 括号匹配 / `classtype` |
| [`.github/workflows/ci.yml`](.github/workflows/ci.yml) | 在每次推送和 PR 时运行两个 linter;向作业摘要输出统计表 |
## 为什么是独立的仓库(而不是直接将规则放在 ctf-notes 中)
`ctf-notes` 是一个研究笔记本——每份分析报告都解释了检测规则*为何*呈现出当前的形式。而本仓库是这项研究的**可分发产出**:
- **CI 门禁。** 合并到这里的每一条规则都通过了结构性 lint;损坏或写了一半的草稿会保留在上游的分析报告章节中。
- **SID 范围规范。** `9_000_000`–`9_999_999` 之间的 Suricata SID 为本项目保留,因此部署时可以直接将整个 `suricata/` 目录树放入 `local.rules`,而不会与供应商规则集发生冲突。
- **可审计的来源。** 每个 `.yml` 和 `.rules` 文件都是 `scripts/extract_rules.py` 针对特定 `ctf-notes` 提交的确定性输出——没有任何隐藏的手动编辑。
## 快速开始
### 使用规则
```
git clone https://github.com/1392081456/sigma-detection-rules.git
# Sigma → 使用 sigma-cli 转换为你的后端
sigma convert -t splunk rules/log4j_2021_44228/*.yml
# Suricata → 合并到 local.rules
cat suricata/**/*.rules >> /etc/suricata/rules/local.rules
suricata -T -c /etc/suricata/suricata.yaml
```
### 重新生成目录树(面向贡献者)
```
git clone https://github.com/1392081456/ctf-notes.git ../ctf-notes
./scripts/extract_rules.py --source ../ctf-notes/labs
python scripts/lint_sigma.py
python scripts/lint_suricata.py
```
## CVE 覆盖范围
在 v0.1.0 版本发布时共有 23 个 CVE 目录。每一行都链接到了上游 `ctf-notes/labs` 的分析报告,其中解释了规则背后的*原因*。
| 年份 | CVE | 软件 | 分类 |
|---|---|---|---|
| 2016 | [CVE-2016-4437](https://github.com/1392081456/ctf-notes/tree/main/labs/shiro_550) | Apache Shiro 1.x | Java cookie 反序列化 |
| 2017 | [Fastjson 1.2.24](https://github.com/1392081456/ctf-notes/tree/main/labs/fastjson_1224_rce) | Fastjson | AutoType 反序列化 |
| 2019 | [CVE-2019-12725](https://github.com/1392081456/ctf-notes/tree/main/labs/zeroshell_2019_12725) | ZeroShell | URL 参数命令注入 |
| 2021 | [CVE-2021-44228](https://github.com/1392081456/ctf-notes/tree/main/labs/log4j_2021_44228) | Log4j 2.x | JNDI 查找 → 远程类加载 |
| 2022 | [CVE-2022-22965](https://github.com/1392081456/ctf-notes/tree/main/labs/spring_2022_22965) | Spring Framework | ClassLoader 绑定 (Spring4Shell) |
| 2023 | [CVE-2023-38646](https://github.com/1392081456/ctf-notes/tree/main/labs/metabase_2023_38646) | Metabase | JDBC URL `INIT` 注入 |
| 2023 | [CVE-2023-46604](https://github.com/1392081456/ctf-notes/tree/main/labs/activemq_2023_46604) | ActiveMQ OpenWire | 非 HTTP 反序列化 |
| 2023 | [CVE-2023-4450](https://github.com/1392081456/ctf-notes/tree/main/labs/jimureport_2023_4450) | JimuReport | FreeMarker SSTI |
| 2024 | [CVE-2024-23897](https://github.com/1392081456/ctf-notes/tree/main/labs/jenkins_2024_23897) | Jenkins CLI | `@filename` 任意文件读取 |
| 2024 | [CVE-2024-27198](https://github.com/1392081456/ctf-notes/tree/main/labs/teamcity_2024_27198) | TeamCity | 路径参数身份验证绕过 |
| 2024 | [CVE-2024-36401](https://github.com/1392081456/ctf-notes/tree/main/labs/geoserver_2024_36401) | GeoServer | XPath/EL 注入 |
| 2024 | [CVE-2024-4956](https://github.com/1392081456/ctf-notes/tree/main/labs/nexus_2024_4956) | Nexus Repository | Jetty 路径穿越 |
| 2024 | [CVE-2024-9264](https://github.com/1392081456/ctf-notes/tree/main/labs/grafana_2024_9264) | Grafana | DuckDB SQLi → shellfs |
| 2025 | [CVE-2025-29927](https://github.com/1392081456/ctf-notes/tree/main/labs/nextjs_2025_29927) | Next.js | Middleware 授权绕过 |
| 2025 | [CVE-2025-3248](https://github.com/1392081456/ctf-notes/tree/main/labs/langflow_2025_3248) | Langflow | 认证前 Python 装饰器执行 |
| 2025 | [CVE-2025-49001](https://github.com/1392081456/ctf-notes/tree/main/labs/dataease_2025_49001) | DataEase | JWT 签名绕过 |
| 2026 | [CVE-2026-22777](https://github.com/1392081456/ctf-notes/tree/main/labs/comfyui_2026_22777) | ComfyUI-Manager | CRLF → 配置降级 → RCE |
| 2026 | [CVE-2026-24061](https://github.com/1392081456/ctf-notes/tree/main/labs/inetutils_2026_24061) | GNU InetUtils telnetd | USER 参数注入 |
| 2026 | [CVE-2026-25253](https://github.com/1392081456/ctf-notes/tree/main/labs/openclaw_2026_25253) | OpenClaw | 跨站 WebSocket 劫持 |
| 2026 | [CVE-2026-25887](https://github.com/1392081456/ctf-notes/tree/main/labs/chartbrew_2026_25887) | Chartbrew | MongoDB `new Function()` RCE |
| 2026 | [CVE-2026-34197](https://github.com/1392081456/ctf-notes/tree/main/labs/activemq_2026_34197) | Apache ActiveMQ | Jolokia → Spring XML RCE |
| 2026 | [CVE-2026-34486](https://github.com/1392081456/ctf-notes/tree/main/labs/tomcat_2026_34486) | Tomcat Tribes | EncryptInterceptor 绕过 |
| — | [Redis 4.x unauth](https://github.com/1392081456/ctf-notes/tree/main/labs/redis_4_unacc) | Redis | 未授权 → crontab / SSH / webshell |
## 范围声明
本仓库中的每一条规则都是针对**本地托管、由供应商提供补丁镜像的 vulhub Docker 容器**或等效的隔离实验虚拟机编写的。**在编写或测试的任何阶段,均未触及任何生产系统、第三方服务或未经授权的网络。** 本仓库的初衷始终是防御性的——每一条规则的存在都以一份已公开的 CVE 作为依据,且在编写规则之前数年,供应商就已经提供了相应的补丁。
## 方法论
请参阅随附的博客文章:[30 分钟内将 CVE 公告转化为 Sigma 规则](https://1392081456.github.io/2026/05/26/cve-to-sigma-30min/)——其中描述了产生此处每一条规则的四步工作流(复现 → Sigma → Suricata → SIEM 狩猎)。
## 上游贡献
本仓库中的规则正逐步向上游贡献至 [SigmaHQ/sigma](https://github.com/SigmaHQ/sigma) 参考集:
| 日期 | 上游 PR | CVE | 状态 |
|---|---|---|---|
| 2026-05-27 | [SigmaHQ/sigma#6032](https://github.com/SigmaHQ/sigma/pull/6032) | CVE-2024-36401 — GeoServer OGC Filter evaluation | Open, awaiting maintainer review |
上游的 YAML 已根据 SigmaHQ 更严格的 schema 进行了优化(完整的 `references` 列表、强制要求的 `falsepositives`、`cve.*` / `detection.emerging-threats` 标签,以及 `experimental` 状态),在风格上可能与此处 [`rules/`](rules/) 下本地跟踪的版本有所不同。但检测逻辑保持不变。
## 作者
由 Colorful White ([@1392081456](https://github.com/1392081456)) 维护——广东工业大学独立防御性安全研究员。学术记录见 [DOI: 10.3778/j.issn.1002-8331.2311-0227](https://doi.org/10.3778/j.issn.1002-8331.2311-0227)。CTFtime: [@colorfulwhitez](https://ctftime.org/user/261101)(团队 APWN)。
## 许可证
[MIT](LICENSE)。
标签:Metaprompt, Sigma规则, Suricata, 安全检测规则, 现代安全运营, 目标导入, 请求拦截, 逆向工具