Documentation Index
Fetch the complete documentation index at: https://projectdiscovery.sec-lab.cn/llms.txt
Use this file to discover all available pages before exploring further.
基础网络请求
此模板连接到网络服务,发送一些数据并从响应中读取4字节。运行匹配器来识别有效响应,在本例中为 PONG。
id: basic-network-request
info:
name: Basic Network Request # 基础网络请求
author: pdteam
severity: info # 信息级别
tcp:
- host:
- "{{Hostname}}"
inputs:
- data: "PING\r\n"
read-size: 4
matchers:
- type: word
part: data
words:
- "PONG"
TLS 网络请求
与上述模板类似,但到服务的连接启用了 TLS。
id: basic-tls-network-request
info:
name: Basic TLS Network Request # 基础 TLS 网络请求
author: pdteam
severity: info # 信息级别
tcp:
- host:
- "tls://{{Hostname}}"
inputs:
- data: "PING\r\n"
read-size: 4
matchers:
- type: word
part: data
words:
- "PONG"
十六进制输入请求
此模板连接到网络服务,向服务器发送以十六进制编码的数据,并从响应中读取4字节。运行匹配器来识别有效响应,在本例中为 PONG。这里的匹配词是使用匹配器的 encoding: hex 选项以十六进制编码的。
id: hex-network-request
info:
name: Hex Input Network Request # 十六进制输入网络请求
author: pdteam
severity: info # 信息级别
tcp:
- host:
- "{{Hostname}}"
inputs:
- data: "50494e47"
type: hex
- data: "\r\n"
read-size: 4
matchers:
- type: word
part: data
encoding: hex
words:
- "504f4e47"
输入表达式
网络中指定的输入也支持 DSL 辅助表达式,因此您可以使用各种 nuclei 辅助函数创建自己的复杂输入。以下模板是使用 hex_decode 函数通过网络发送解码输入的示例。
id: input-expressions-mongodb-detect
info:
name: Input Expression MongoDB Detection # 输入表达式 MongoDB 检测
author: pd-team
severity: info # 信息级别
reference: https://github.com/orleven/Tentacle
tcp:
- inputs:
- data: "{{hex_decode('3a000000a741000000000000d40700000000000061646d696e2e24636d640000000000ffffffff130000001069736d6173746572000100000000')}}"
host:
- "{{Hostname}}"
read-size: 2048
matchers:
- type: word
words:
- "logicalSessionTimeout"
- "localTime"
多步骤请求
最后一个示例是 proFTPd 中的 RCE,如果存在漏洞,允许在服务器上的任何目录中放置任意文件。检测过程涉及每次运行 nuclei 时使用 {{randstr}} 生成随机字符串,并向易受攻击的服务器发送多行 FTP 输入。最后,通过响应中存在 Copy successful 来检测成功匹配。
id: CVE-2015-3306
info:
name: ProFTPd RCE # ProFTPd 远程代码执行
author: pd-team
severity: high # 高危级别
reference: https://github.com/t0kx/exploit-CVE-2015-3306
tags: cve,cve2015,ftp,rce
tcp:
- inputs:
- data: "site cpfr /proc/self/cmdline\r\n"
read: 1024
- data: "site cpto /tmp/.{{randstr}}\r\n"
read: 1024
- data: "site cpfr /tmp/.{{randstr}}\r\n"
read: 1024
- data: "site cpto /var/www/html/{{randstr}}\r\n"
host:
- "{{Hostname}}"
read-size: 1024
matchers:
- type: word
words:
- "Copy successful"