Nuclei Templates

Nuclei Templates

Nuclei Templates 是 ProjectDiscovery 社区维护的漏洞检测模板集合,为 Nuclei 扫描器提供检测规则。

简介

Nuclei Templates 是一个开源的漏洞检测模板库,包含数千个基于 YAML 的检测模板,覆盖多种漏洞类型和 CVE 漏洞。

模板分类

分类 描述
cves CVE 漏洞检测模板
default-logins 默认凭证检测
dns DNS 相关检测
exposures 信息泄露检测
file 文件检测
fuzzing 模糊测试模板
headless 无头浏览器检测
misconfiguration 配置错误检测
network 网络协议检测
takeovers 子域名接管检测
technologies 技术栈识别
vulnerabilities 漏洞检测
workflows 工作流程模板

安装方式

自动下载

# 首次运行 nuclei 会自动下载模板
nuclei -ut

手动下载

git clone https://github.com/projectdiscovery/nuclei-templates.git

使用模板目录

nuclei -u https://target.com -t nuclei-templates/cves/

模板结构

id: example-vulnerability

info:
  name: Example Vulnerability
  author: author-name
  severity: high
  description: Vulnerability description
  tags: cve,example

requests:
  - method: GET
    path:
      - "{{BaseURL}}/vulnerable-endpoint"
    matchers-condition: and
    matchers:
      - type: status
        status:
          - 200
      - type: word
        words:
          - "vulnerable"

使用示例

# 更新模板
nuclei -ut

# 使用特定分类模板
nuclei -u https://target.com -t cves/

# 使用特定严重级别
nuclei -u https://target.com -t cves/ -s critical

# 使用特定 CVE 模板
nuclei -u https://target.com -t cves/2023/CVE-2023-XXXX.yaml

# 自定义模板目录
nuclei -u https://target.com -t ~/my-templates/

模板贡献

可以通过 Pull Request 向模板库贡献新的检测规则:

  1. Fork 仓库
  2. 创建新的 YAML 模板
  3. 测试模板有效性
  4. 提交 PR

参考资源