🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵🥵
关于文章
🐟 简介
工作流程 😁
1. 编写 YAML 模板
2. 指定 Target ip 选择模板运行程序进行测试
安装 🥺
😖 使用方式
参数详解 🫡
☺️ 模板
YAML 😲
• YAML 不允许使用制表符
• 元素部分之间必须有空间
• YAML 区分大小写
• 以
.yaml
或.yml
扩展名结束您的 YAML 文件• YAML 是 JSON 的超集
模板结构 😛
• 模板的唯一ID
每个模板都有一个唯一的ID,在输出写入期间使用该ID指定输出行的模板名称。
模板文件以YAML扩展名结尾。模板文件可以创建您选择的任何文本编辑器。
ID不能包含空格。这样做是为了允许更容易的输出解析。
id: git-config
• 与模板相关的基本信息和元数据
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
• 指定的协议,如HTTP、DNS、File等。
• 特定于所选协议的详细信息,如在HTTP协议中发出的请求
• 一系列的匹配器,以确定是否存在发现
• 从结果中检索数据所需的提取器
模板协议 🫣
HTTP 😭
Method 👩🦱
• 请求方法可以是GET、POST、PUT、POST等。
Path 路径 🧌
• 模板示例
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
• 变量是用 {{ variable }}定义的
Variable | Value |
{{BaseURL}} | https://example.com/foo/bar.php |
{{RootURL}} | https://example.com/ |
{{Hostname}} | example.com:443 |
{{Host}} | example.com |
{{Port}} | 443 |
{{Path}} | /foo |
{{File}} | bar.php |
{{Scheme}} | https |
Headers 🦟
• 也可以指定头随请求一起沿着发送。标头以 key/value 对的形式放置。一个示例头配置看起来像这样:
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
Body 🧖♀️
• Body指定与请求沿着发送的正文。例如:
# Body is a string sent along with the request
body: "{"some random JSON"}"
# Body is a string sent along with the request
body: "admin=test"
Session 🦞
• 为了在多个请求之间维护基于cookie的类似浏览器的会话,默认情况下会重用cookie。当您想要在一系列请求之间维护会话以完成漏洞利用链或执行身份验证扫描时,这是非常有用的。
• 如果您需要禁用此行为,可以使用disable-cookie字段。
# disable-cookie accepts boolean input and false as default
disable-cookie: true
Request Condition 请求条件 🎾
如果DSL匹配器/提取器包含数字作为具有相应属性的后缀,则该功能将自动启用。
例如,属性 status_code
将指向细化中当前请求/响应对的有效状态代码。以前的响应状态代码可以通过在属性名称后面加上 _n
来访问,其中n是基于1的第n个有序请求。因此,如果模板有四个请求,我们目前处于第3位:
•
status_code
:将引用请求号3的响应代码•
status_code_1
和status_code_2
将指顺序响应编号1和2的响应代码
matchers:
- type: dsl
dsl:
- "status_code_1 == 404 && status_code_2 == 200 && contains((body_2), 'secret_string')"
Raw HTTP 原始HTTP 🥰
http:
- raw:
- |
POST /path2/ HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
a=test&b=pd
• 可以对请求进行微调,以根据需要执行确切的任务。Nuclei请求是完全可配置的,这意味着您可以配置和定义有关将发送到目标服务器的请求的每一件事。
• RAW请求格式还支持各种帮助函数,允许我们对输入进行运行时操作。在头文件中使用helper函数的示例。
- raw:
- |
GET /manager/html HTTP/1.1
Host: {{Hostname}}
Authorization: Basic {{base64('username:password')}} # Helper function to encode input at run time.
• 要对指定为输入的URL进行请求而不进行任何额外的篡改,可以使用以下指定的空白请求URI,这将对用户指定的输入进行请求。
- raw:
- |
GET HTTP/1.1
Host: {{Hostname}}
• 此模板以RAW格式向
/
路径发出GET请求,并检查响应是否匹配字符串。
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
0
• Multiple RAW request 多个RAW请求
• 此模板以RAW格式顺序生成GET和POST请求,并检查响应是否匹配字符串。
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
1
Fuzzing 模糊测试 😌
• Part 指定模糊的某个部分,如url
• 支持将添加为
path
,header
,body
,cookie
等部件很快。• query(
default
)-模糊URL查询参数
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
2
• Type 类型
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
3
• Mode 模式
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
4
• Filters 过滤
• 这些过滤器可以组合使用,以基于参数输入运行高度针对性的模糊。下面提供了这种过滤的几个示例。
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
5
• Fuzz 模糊
• Fuzz指定要替换为参数
type
的值。它支持有效载荷,DSL功能等,并允许用户充分利用现有的核功能集模糊的目的。
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
6
Matchers 匹配器 😝
匹配器类型 | Part Matched |
status 状态吗 | Integer Comparisons of Part |
size 大小 | Content Length of Part |
word 字段词语 | Part for a protocol |
regex 正则 | Part for a protocol |
binary 二进制 | Part for a protocol |
dsl 高级条件 | Part for a protocol |
xpath | Part for a protocol |
• 状态码匹配
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
7
• 若要为十六进制响应匹配二进制,可以使用以下语法
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
8
• 匹配器还支持十六进制编码的数据,这些数据将被解码和匹配
**信息块===========================================================================
关于模板的下一个重要信息是信息块。信息块提供 name, author, severity, description, reference, tags and metadata 。它还包含严重性字段,指示模板的严重性,信息块也支持动态字段,因此可以定义N个 key: value 块来提供有关模板的更多有用信息。reference 是另一个常用的标签,用于定义模板的外部引用链接。
另一个要经常添加到 info 块中的有用标记是 tags。这允许您根据目的为模板设置一些自定义标签,如 cve , rce 等。这允许Nucleus使用您的输入标签识别模板并仅运行它们。
实际的请求和对应的匹配器被放置在信息块下面,它们执行向目标服务器发出请求并查找模板请求是否成功的任务。
每个模板文件可以包含多个请求。模板被迭代,并一个接一个地向目标站点发出所需的请求。
info:
name: Git Config File Detection Template
author: Ice3man
severity: medium
description: Searches for the pattern /.git/config on passed URLs.
reference: https://www.acunetix.com/vulnerabilities/web/git-repository-found/
tags: git,config
Metadata 元数据==================================================================
可以添加元数据节点,例如,与[uncover](https://github.com/projectdiscovery/uncover)集成(参见Uncover Integration)。
元数据节点是这样构建的: <engine>-query: '<query>' 其中:
<engine> 是搜索引擎,相当于nucleus的 -ue 选项或uncover的 -e 选项的值
<query> 是搜索查询,相当于nucleus的 -uq 选项或uncover的 -q 选项的值
info:
metadata:
shodan-query: 'vuln:CVE-2021-26855'**
9
• XML匹配器使用XML查询来匹配XML和HTML响应。如果查询返回任何结果,则将其视为匹配。
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
0
• dsl,复杂的匹配器类型允许使用辅助函数构建更精细的表达式。这些功能允许访问包含基于每个协议的各种数据的协议响应。请参阅方案特定文档,了解不同的返回结果。
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
1
• 协议响应的每个部分都可以与DSL匹配器匹配。一些例子-
Response Part | Description 说明 | Example 示例 |
content_length | Content-Length Header | content_length >= 1024 |
status_code | Response Status Code | status_code==200 |
all_headers | Unique string containing all headers | len(all_headers) |
body | Body as string | len(body) |
header_name | Lowercase header name with - converted to _ | len(user_agent) |
raw | Headers + Response | len(raw) |
• Conditions 条件设置
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
2
Matched Parts 匹配部分,默认Body 😆
• 响应的多个部分也可以为请求匹配,如果没有定义,默认匹配部分为
body
。• 类似地,可以编写匹配器来匹配您希望在响应体中找到的任何内容,从而允许无限的创造性和可扩展性。可以 header 等等
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
3
Negative Matchers 负匹配器 ❤️
• 所有类型的匹配器都支持否定条件,这在您查找带有排除项的匹配时非常有用。这可以通过在matchers块中添加
negative: true
来使用。• 下面是一个使用
negative
条件的示例语法,这将返回响应头部中没有PHPSESSID
的所有URL。
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
4
Multiple Matchers 多个匹配器 🖐️
• 可以在单个模板中使用多个匹配器,以通过单个请求对多个条件进行指纹识别。
• 下面是一个多个匹配器的语法示例。
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
5
Matchers Condition 匹配条件 😶
• 当使用多个匹配器时,默认条件是在所有匹配器之间进行OR操作,如果所有匹配器都返回true,则可以使用AND操作来确保返回结果。
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
6
Extractors 提取器 😫
• 提取器可用于从模块返回的响应中提取并在结果中显示匹配项。
• Types 类别
• 可以在一个请求中指定多个提取器。到目前为止,我们支持五种类型的提取器。
• regex -基于正则表达式从响应中提取数据。
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
7
• kval -从响应报头/Cookie中提取 key: value / key=value 格式的数据
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
8
• json -以类似JQ的语法从基于JSON的响应中提取数据。
http:
- method: GET
path:
- "{{BaseURL}}/login.php"
redirects: true #是否开启重定向
max-redirects: 3 #重定向次数
9
• xpath -从HTML响应中提取基于xpath的数据
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
0
• 基于DSL表达式从响应中提取数据。
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
1
• Dynamic Extractor 动态提取器
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
2
Variables 变量 😘
• 变量可以用来声明一些在整个模板中保持不变的值。变量的值一旦计算出来就不会改变。变量可以是简单的字符串,也可以是DSL帮助函数。
• 如果变量是一个辅助函数,则它被括在双花括号
{{<expression>}}
中。变量在模板级别声明。• 目前,
dns
、http
、headless
和network
协议支持变量。
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
3
可用辅助函数列表 🦑
• 示例
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
4
Preprocessors 预处理 😥
• 在每次核运行时为模板生成随机ID。它可以在模板中的任何地方使用,并且总是包含相同的值。
randstr
可以以数字作为后缀,并且也将为这些名称创建新的随机ID。Ex.{{randstr_1}}
在整个模板中保持不变。•
randstr
在matchers中也受支持,可用于匹配输入。
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
5
模板签名 😶🌫️
• 模板签名是保证模板完整性、真实性和安全性的关键。该机制涉及使用非对称加密,特别是ECDSA算法,以创建安全和可验证的签名。
• 在其工作环境中运行核心的个人/组织可以使用
nuclei
生成自己的密钥对,并使用其私钥签署其自定义模板,从而确保仅在其环境中使用授权模板。• 未签名的代码模板被禁用,无法使用Nucleus执行。
• 只有作者(您自己)或ProjectDiscovery签名的代码模板才能执行。
• 允许代码文件引用(例如:
source: protocols/code/pyfile.py
),这些文件的内容包含在模板摘要中。• 有效载荷文件参考(例如:
payloads: protocols/http/params.txt
)不包括在模板摘要中,因为它被视为有效负载/帮助器,而不是正在执行的实际代码。• 在对模板进行签名和验证时,模板签名是确定性的,即,如果在模板目录外部使用
-lfa
标记的模板中引用代码文件,则如果使用相同的模板而不使用-lfa
标记,则验证将失败。(Note这仅适用于-lfa
,即仅本地文件访问标志)
Signing Custom Template 签名自定义模板 😅
• 生成密钥对和签名/验证模板的最简单和推荐的方法是使用
nuclei
本身。• 当签名模板时,如果密钥对不存在,则Nucleus将提示用户生成具有选项的新密钥对。
•
nuclei -t templates.yaml -sign 进行模板签名
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
6
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
7
• 当一个模板被签名时,一个摘要被生成并添加到模板中。此摘要是模板内容的散列,用于验证模板的完整性。
• 如果在签名后修改模板,摘要将发生变化,并且在模板加载期间签名验证将失败。下例:
• 摘要格式为
signature:fragment
,签名为模板的数字签名,用于验证其完整性,片段为MD5哈希公钥生成的元数据,禁止非您编写的代码模板重新签名。
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
8
• Nuclei生成的密钥对存储在
$CONFIG/nuclei/keys directory
中的两个文件中,其中$CONFIG
是系统特定的配置目录。私钥存储在nuclei-user-private-key.pem中,如果提供密码,则使用密码进行加密。• 要使用公钥进行验证,您可以将其复制到另一个用户计算机上的
$CONFIG/nuclei/keys
目录,或者将NUCLEI_USER_CERTIFICATE
环境变量设置为公钥的路径或内容。• 要使用私钥,您可以将其复制到另一个用户计算机上的
$CONFIG/nuclei/keys
目录,或者将NUCLEI_USER_PRIVATE_KEY
环境变量设置为私钥的路径或内容。
# headers contain the headers for the request
headers:
# Custom user-agent header
User-Agent: Some-Random-User-Agent
# Custom request origin
Origin: https://google.com
9
• 默认情况下,Nuclei从上面提到的默认位置加载用户证书(公钥),并使用它来验证模板。当运行Nuclei时,它将执行签名的模板,并警告执行未签名的自定义模板和阻止未签名的代码模板。
• 您可以通过将
HIDE_TEMPLATE_SIG_WARNING
环境变量设置为true
来禁用此警告。• 如果提示无法重新签名模板,可以选择编辑模板文件删除原有签名,重新签署。
OOB测试 (带外测试)🧐
•
{{interactsh-url}}
占位符在http和网络请求中支持。• 下面提供了具有
{{interactsh-url}}
占位符的核请求的示例。这些在运行时被替换为唯一的interact.sh URL。
# Body is a string sent along with the request
body: "{"some random JSON"}"
# Body is a string sent along with the request
body: "admin=test"
0
• Interactsh Matchers Interactsh匹配器
part 部分
interactsh_protocol interactsh 协议
值可以是dns、http或smtp。这是每一个基于模板的标准匹配器,DNS通常作为公共值,因为它本质上是非常非侵入性的。
interactsh_request interactsh 请求
interact.sh服务器收到的请求。
interactsh_response interactsh 响应
interact.sh服务器发送给客户端的响应。
• Interactsh DNS交互匹配器示例:
# Body is a string sent along with the request
body: "{"some random JSON"}"
# Body is a string sent along with the request
body: "admin=test"
1
• HTTP Interaction matcher + word matcher在Interaction内容上的示例
# Body is a string sent along with the request
body: "{"some random JSON"}"
# Body is a string sent along with the request
body: "admin=test"
2
HTTP 请求模板示例 🤐
• 基本模板
# Body is a string sent along with the request
body: "{"some random JSON"}"
# Body is a string sent along with the request
body: "admin=test"
3
• 多个匹配器
# Body is a string sent along with the request
body: "{"some random JSON"}"
# Body is a string sent along with the request
body: "admin=test"
4
官方模板 😒
模板仓库 🤣
• **https://github.com/projectdiscovery/nuclei-templates(https://github.com/projectdiscovery/nuclei-templates) 官方模板仓库**
• **https://github.com/projectdiscovery/fuzzing-templates(https://github.com/projectdiscovery/fuzzing-templates) 官方社区为 nucle 引擎策划的模糊测试模板列表,用于查找未知的安全漏洞。**
• **https://github.com/ExpLangcn/NucleiTP(https://github.com/ExpLangcn/NucleiTP) 集合全网Nuclei的Templates,实时更新!**
• **https://github.com/topscoder/nuclei-wordfence-cve(https://github.com/topscoder/nuclei-wordfence-cve) 此存储库包含大量(9,000+)WordPress 相关的 Nuclei 模板。 每日更新!**
• **https://github.com/ayadim/Nuclei-bug-hunter(https://github.com/ayadim/Nuclei-bug-hunter) 有助于漏洞赏金猎人的 nuclei 模板。**
• **https://github.com/edoardottt/missing-cve-nuclei-templates(https://github.com/edoardottt/missing-cve-nuclei-templates) 每周更新 nuclei 模板官方存储库中缺失的 CVE 列表。 主要是为了bug赏金而构建的,但对于渗透测试和漏洞评估也很有用。**
• **https://github.com/SirBugs/Priv8-Nuclei-Templates(https://github.com/SirBugs/Priv8-Nuclei-Templates) Priv8 Nuclei 模板**
• **https://github.com/cipher387/juicyinfo-nuclei-templates(https://github.com/cipher387/juicyinfo-nuclei-templates) 模板用于从网页中提取有用的信息,使用 Nuclei 进行 OSINT。**
• **https://github.com/UnaPibaGeek/honeypots-detection(https://github.com/UnaPibaGeek/honeypots-detection) 用于检测蜜罐的模板**
• **https://github.com/adampielak/nuclei-templates(https://github.com/adampielak/nuclei-templates) 所有 nuclei 模板**
• **https://github.com/optiv/mobile-nuclei-templates(https://github.com/optiv/mobile-nuclei-templates) 移动安全评估模板**
• **https://github.com/iamHuFei/HVVault(https://github.com/iamHuFei/HVVault) 护网高利用率POC**
• **https://github.com/Str1am/my-nuclei-templates(https://github.com/Str1am/my-nuclei-templates) 护网 poc 模板**
• **https://github.com/Akokonunes/Private-Nuclei-Templates(https://github.com/Akokonunes/Private-Nuclei-Templates) 私有 nuclei 模板**
• **https://github.com/UltimateSec/ultimaste-nuclei-templates(https://github.com/UltimateSec/ultimaste-nuclei-templates) nuclei 检测 POC模板**
• **https://github.com/OWASP/www-project-asvs-security-evaluation-templates-with-nuclei(https://github.com/OWASP/www-project-asvs-security-evaluation-templates-with-nuclei) OWASP ASVS 安全评估模板**
• **https://github.com/h0tak88r/nuclei_templates(https://github.com/h0tak88r/nuclei_templates) 从各种资源收集模板,集合**
• **https://github.com/emadshanab/Nuclei-Templates-Collection(https://github.com/emadshanab/Nuclei-Templates-Collection) 模板仓库集合**
😂 插件集成
• **https://github.com/0xKayala/NucleiFuzzer(https://github.com/0xKayala/NucleiFuzzer)
NucleiFuzzer
是一个自动化工具,结合了ParamSpider
和Nuclei
加强Web应用程序安全测试**• **https://github.com/projectdiscovery/nuclei-burp-plugin(https://github.com/projectdiscovery/nuclei-burp-plugin) 一个
Burp Suite
插件旨在帮助[nuclei](https://github.com/projectdiscovery/nuclei)
模板生成。**• **https://github.com/ffffffff0x/burp_nu_te_gen(https://github.com/ffffffff0x/burp_nu_te_gen) nuclei模版生成插件 ,使用burp suite**
• **https://github.com/dbrwsky/Nuclei-BurpExtension(https://github.com/dbrwsky/Nuclei-BurpExtension) 简单的扩展,允许直接从 burp 运行 nuclei 扫描仪并将 json 结果转换为问题。**
• **https://github.com/projectdiscovery/nuclei-ai-extension(https://github.com/projectdiscovery/nuclei-ai-extension) Nuclei AI - 用于快速生成 Nuclei 模板的浏览器扩展**
• **https://github.com/sf197/nuclei_gpt(https://github.com/sf197/nuclei_gpt) 对接GPT-3.5编写Nuclei的Yaml文件,安全人员只需要提交相关的Request和Response以及漏洞的描述,就能生成Nuclei的Poc。**
• **https://github.com/xm1k3/cent(https://github.com/xm1k3/cent) 社区版 Nuclei 模板 是一个简单的工具,可让您将社区提供的所有 Nuclei 模板组织在一个地方。**
• **https://nuclei-templates.netlify.app/(https://nuclei-templates.netlify.app/) 在线搜索模板**
• **https://github.com/projectdiscovery/openrisk(https://github.com/projectdiscovery/openrisk) openrisk 是一种根据 Nuclei 扫描结果生成风险评分的工具。(官方)**
• **https://github.com/DevSecOpsDocs/nuclearpond(https://github.com/DevSecOpsDocs/nuclearpond) Nuclear Pond 是一个利用 Nuclei 进行互联网广泛扫描的实用程序。**
• **https://github.com/ricardomaia/nuclei-template-generator-for-wordpress-plugins(https://github.com/ricardomaia/nuclei-template-generator-for-wordpress-plugins) 用于从 WordPress 网站抓取插件,然后用于生成 Nuclei 模板。**
🤪 参考链接
🥵 Over 。。 。
🥵 Over 。。 。
🥵 Over 。。 。
推荐站内搜索:最好用的开发软件、免费开源系统、渗透测试工具云盘下载、最新渗透测试资料、最新黑客工具下载……
还没有评论,来说两句吧...