y0no/nuclei-custom-templates
GitHub: y0no/nuclei-custom-templates
一套基于授权安全评估实践积累的 Nuclei 自定义扫描模板合集,补充官方模板库未覆盖的产品漏洞与暴露检测。
Stars: 0 | Forks: 0
# nuclei-custom-templates
在授权安全评估期间构建的[自定义 nuclei](https://github.com/projectdiscovery/nuclei) 模板个人合集——包含完整的漏洞利用 PoC、基于版本的公告筛选,以及暴露/错误配置检查——主要针对官方模板库尚未完善覆盖的产品。
目录结构与官方 `projectdiscovery/nuclei-templates` 仓库保持一致,因此可以与 `nuclei -t` 及标准的标签/严重程度过滤无缝结合使用。
## 目录结构
```
http/
├── cves//CVE-*.yaml # complete, verified exploit PoCs (upstream-quality)
├── technologies/ # product + version fingerprinting
├── exposures/ # exposed endpoints / misconfigurations
└── version-triage// # version-based advisory mapping (see note below)
workflows/ # ordered, tag-based orchestration per product
```
### 刻意采用的两种理念
| 类型 | 需要认证 | 证明可利用性 | 误报风险 | 官方可接受 |
|------|------|-----------------------|---------|---------------------|
| `http/cves/` 完整 PoC | 通常需要 | **是** | 极低 | ✅ 是 |
| `http/version-triage/` | 否 | 否(仅检测暴露) | 中等 | ❌ 否(PD 要求完整的 PoC) |
| `http/exposures/`, `http/technologies/` | 否 | 不适用(仅检测) | 低 | ✅ 通常可以 |
## 用法
```
# 针对特定产品的所有内容,按 tag 分类
nuclei -t http/ -tags dolibarr -u https://target
# 仅 exposure + fingerprint 扫描(unauthenticated)
nuclei -t http/technologies/ -t http/exposures/ -u https://target
# 基于 version 的 advisory 分流(unauthenticated),仅限 high/critical
nuclei -t http/version-triage/ -severity critical,high -u https://target
# 完整的 exploit PoC(authenticated — 传入 creds)
nuclei -t http/cves/2026/CVE-2026-34036.yaml -u https://target \
-var username=USER -var password=PASS
# ordered workflow
nuclei -w workflows/dolibarr-workflow.yaml -t http/ -u https://target
```
## 覆盖范围
### Dolibarr (基于 20.0.4 版本构建/验证)
- `http/cves/2026/CVE-2026-34036.yaml` — `selectobject.php` 中的**认证后 LFI**(完整 PoC,已验证)
- `http/technologies/dolibarr-version-fingerprint.yaml` — 精确版本提取
- `http/exposures/` — 安装程序接管暴露、公共端点枚举、cron-by-url 端点
- `http/version-triage/dolibarr/` — 6 个影响 20.x 的安全公告,每一个都标注了真实的严重程度/CVSS 评分
(严重的 `MAIN_ODT_AS_PDF` RCE,3 个高危 RCE,中危 LFI,低危注入)
## 认证选项(用于需要认证的模板)
需要认证的模板提供两种模式,以适配任何认证后端:
| 模式 | 如何提供认证 | 请求数 | 适用场景 |
|---------|----------------------|----------|----------|
| **表单登录** (`CVE-*.yaml`) | `-var username=` / `-var password=` — 模板会自动获取 CSRF token 并提交登录表单 | 3 | Dolibarr 原生认证、LDAP — 任何接受用户名/密码的登录表单环境 |
| **Session cookie / SSO** (`CVE-*-cookie.yaml`) | `-var cookie='DOLSESSID_='` — 由你直接提供已认证的 session | 1 | **SSO (SAML/OIDC/CAS/OAuth)、2FA,或任何登录表单无法通过脚本自动化的后端** |
```
# form login(native auth)
nuclei -t http/cves/2026/CVE-2026-34036.yaml -u https://target \
-var username=USER -var password=PASS
# session cookie(支持 SSO)— 从已 authenticated 的浏览器中获取 DOLSESSID
# session(DevTools > Application > Cookies,或你的 intercepting proxy)
nuclei -t http/cves/2026/CVE-2026-34036-cookie.yaml -u https://target \
-var cookie='DOLSESSID_9a96...=abcdef0123456789'
```
关于新增认证模板的指南:请提供用于上游提交的**表单登录**版本(PD 的惯例是使用 `{{username}}`/`{{password}}`),并在此处为 SSO/2FA 目标添加一个 **`-cookie`** 配套版本。Cookie 变体是单次请求,仅在 session 有效时才会匹配成功,因此虚假/过期的 Cookie 不会产生误报。
## 新模板规范
- 遵循官方的[模板创建指南](https://github.com/projectdiscovery/nuclei-templates/blob/main/TEMPLATE-CREATION-GUIDE.md)。
- 将真实的漏洞利用 PoC 放在 `http/cves//` 下,并包含 `id: CVE-XXXX-YYYY`、完整的 `classification`、`verified: true`,以及至少 2 个实质性匹配器(matchers)——这样它们就可以直接原样提交给官方仓库。
- 将仅检测版本的检查放在 `http/version-triage//` 下,并在描述中予以说明。
- 务必添加 `` 标签,以便 `-tags` 批量扫描能正常工作。
- 提交前进行验证:`nuclei -validate -t .`
## 仅限授权使用
仅限用于对你拥有或获得明确授权测试的系统进行防御性评估。
标签:CISA项目, Google, Nuclei, PoC, 插件系统, 暴力破解