1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
| [19:36:03 shaoxinSEC@APT]# nuclei -h Nuclei 是一款基于模板的快速漏洞扫描器,专注于高度的可配置性、强大的扩展性和易用性。
使用方法: nuclei [标志位]
标志位 (Flags):
目标 (TARGET): -u, -target string[] 要扫描的目标 URL/主机 -l, -list string 包含待扫描目标 URL/主机列表的文件路径(每行一个) -eh, -exclude-hosts string[] 要从输入列表中排除的主机(IP, CIDR, 主机名) -resume string 从指定文件恢复扫描并保存到该文件(此模式下将禁用集群功能) -sa, -scan-all-ips 扫描与 DNS 记录关联的所有 IP -iv, -ip-version string[] 要扫描的主机名的 IP 版本 (4, 6) - (默认 4)
目标格式 (TARGET-FORMAT): -im, -input-mode string 输入文件的模式 (list, burp, jsonl, yaml, openapi, swagger) (默认 "list") -ro, -required-only 在使用输入格式生成请求时,仅使用必填字段 -sfv, -skip-format-validation 解析输入文件时跳过格式验证(如缺少变量) -vtt, -vars-text-templating 为输入文件中的变量启用文本模板功能(仅适用于 yaml 输入模式) -vfp, -var-file-paths string[] 包含要注入到 yaml 输入中的变量的 yaml 文件路径列表
模板 (TEMPLATES): -nt, -new-templates 仅运行最新 nuclei-templates 版本中添加的新模板 -ntv, -new-templates-version string[] 运行在特定版本中添加的新模板 -as, -automatic-scan 使用 wappalyzer 技术检测自动映射到标签进行 Web 扫描 -t, -templates string[] 要运行的模板或模板目录列表(逗号分隔,或文件路径) -turl, -template-url string[] 要运行的模板 URL 或包含模板 URL 的列表(逗号分隔,或文件路径) -ai, -prompt string 使用 AI 提示词生成并运行模板 -w, -workflows string[] 要运行的工作流或工作流目录列表(逗号分隔,或文件路径) -wurl, -workflow-url string[] 要运行的工作流 URL 或包含工作流 URL 的列表(逗号分隔,或文件路径) -validate 验证传递给 nuclei 的模板是否有效 -nss, -no-strict-syntax 禁用对模板的严格语法检查 -td, -template-display 显示模板的内容 -tl 列出所有符合当前过滤条件的模板 -tgl 列出所有可用的标签 -sign 使用 NUCLEI_SIGNATURE_PRIVATE_KEY 环境变量中定义的私钥为模板签名 -code 启用加载基于 code 协议的模板 -dut, -disable-unsigned-templates 禁用运行未签名或签名不匹配的模板 -esc, -enable-self-contained 启用加载自包含的模板 -egm, -enable-global-matchers 启用加载全局匹配器模板 -file 启用加载文件模板
过滤 (FILTERING): -a, -author string[] 根据作者过滤要运行的模板(逗号分隔,或文件路径) -tags string[] 根据标签过滤要运行的模板(逗号分隔,或文件路径) -etags, -exclude-tags string[] 根据标签排除要运行的模板(逗号分隔,或文件路径) -itags, -include-tags string[] 即使默认或配置中已排除,也要执行的标签 -id, -template-id string[] 根据模板 ID 过滤要运行的模板(逗号分隔,或文件路径,允许通配符) -eid, -exclude-id string[] 根据模板 ID 排除要运行的模板(逗号分隔,或文件路径) -it, -include-templates string[] 要执行的模板文件或目录路径,即使默认或配置中已排除 -et, -exclude-templates string[] 要排除的模板文件或目录路径(逗号分隔,或文件路径) -em, -exclude-matchers string[] 要在结果中排除的模板匹配器 -s, -severity value[] 根据严重等级过滤要运行的模板。可选值: info, low, medium, high, critical, unknown -es, -exclude-severity value[] 根据严重等级排除要运行的模板。可选值: info, low, medium, high, critical, unknown -pt, -type value[] 根据协议类型过滤要运行的模板。可选值: dns, file, http, headless, tcp, workflow, ssl, websocket, whois, code, javascript -ept, -exclude-type value[] 根据协议类型排除要运行的模板。可选值同上 -tc, -template-condition string[] 根据表达式条件过滤要运行的模板
输出 (OUTPUT): -o, -output string 将发现的问题/漏洞写入输出文件 -sresp, -store-resp 将所有经过 nuclei 的请求/响应对存储到输出目录 -srd, -store-resp-dir string 将所有经过 nuclei 的请求/响应对存储到自定义目录 (默认 "output") -silent 仅显示发现的结果 -nc, -no-color 禁用输出内容的颜色高亮 (ANSI 转义码) -j, -jsonl 以 JSONL(ines) 格式写入输出 -irr, -include-rr -omit-raw 在 JSON、JSONL 和 Markdown 输出中包含请求/响应对(仅针对发现结果)[已弃用,请使用 -omit-raw] (默认开启) -or, -omit-raw 在 JSON、JSONL 和 Markdown 输出中省略请求/响应对(仅针对发现结果) -ot, -omit-template 在 JSON、JSONL 输出中省略编码后的模板 -nm, -no-meta 禁用在 CLI 输出中打印结果元数据 -ts, -timestamp 在 CLI 输出中启用时间戳显示 -rdb, -report-db string Nuclei 报告数据库(始终使用此选项以持久化报告数据) -ms, -matcher-status 显示匹配失败的状态 -me, -markdown-export string 以 Markdown 格式导出结果的目录 -se, -sarif-export string 以 SARIF 格式导出结果的文件 -je, -json-export string 以 JSON 格式导出结果的文件 -jle, -jsonl-export string 以 JSONL(ine) 格式导出结果的文件 -rd, -redact string[] 从查询参数、请求头和请求体中编辑(遮蔽)给定的键列表
配置 (CONFIGURATIONS): -config string nuclei 配置文件的路径 -tp, -profile string 要运行的模板配置文件 -tpl, -profile-list 列出社区模板配置文件 -fr, -follow-redirects 为 HTTP 模板启用重定向跟随 -fhr, -follow-host-redirects 在同一主机上跟随重定向 -mr, -max-redirects int HTTP 模板要跟随的最大重定向次数 (默认 10) -dr, -disable-redirects 为 HTTP 模板禁用重定向 -rc, -report-config string nuclei 报告模块配置文件 -H, -header string[] 在所有 HTTP 请求中包含的自定义头/Cookie,格式为 header:value (CLI, 文件) -V, -var value 自定义变量,格式为 key=value -r, -resolvers string 包含 nuclei 所用解析器列表的文件 -sr, -system-resolvers 使用系统 DNS 解析作为错误回退方案 -dc, -disable-clustering 禁用请求的集群(合并)功能 -passive 启用被动 HTTP 响应处理模式 -fh2, -force-http2 在请求上强制使用 HTTP/2 连接 -ev, -env-vars 允许在模板中使用环境变量 -cc, -client-cert string 用于对被扫描主机进行身份验证的客户端证书文件 (PEM 编码) -ck, -client-key string 用于对被扫描主机进行身份验证的客户端密钥文件 (PEM 编码) -ca, -client-ca string 用于对被扫描主机进行身份验证的客户端证书颁发机构文件 (PEM 编码) -sml, -show-match-line 为文件模板显示匹配行,仅与提取器配合使用 -ztls 使用 ztls 库,并自动回退到标准库以支持 TLS 1.3 [已弃用] 默认已启用自动回退到 ztls -sni string TLS SNI 主机名 to use (默认: 输入域名) -dka, -dialer-keep-alive value 网络请求的 Keep-Alive 持续时间。 -lfa, -allow-local-file-access 允许在任何地方访问文件(载荷) -lna, -restrict-local-network-access 阻止与本地/私有网络的连接 -i, -interface string 用于网络扫描的网络接口 -at, -attack-type string 要执行的载荷组合类型 (batteringram, pitchfork, clusterbomb) -sip, -source-ip string 用于网络扫描的源 IP 地址 -rsr, -response-size-read int 读取的最大响应大小(字节) -rss, -response-size-save int 保存的最大响应大小(字节)(默认 1048576) -reset 重置将移除所有 nuclei 配置和数据文件(包括 nuclei-templates) -tlsi, -tls-impersonate 启用实验性的 Client Hello (JA3) TLS 随机化 -hae, -http-api-endpoint string 实验性的 HTTP API 端点
InteractSH (OAST 交互): -iserver, -interactsh-server string 用于自建实例的 Interactsh 服务器 URL (默认: oast.pro, oast.live, oast.site, oast.online, oast.fun, oast.me) -itoken, -interactsh-token string 用于自建 Interactsh 服务器的认证令牌 -interactions-cache-size int 交互缓存中保留的请求数量 (默认 5000) -interactions-eviction int 从缓存中驱逐请求前的等待秒数 (默认 60) -interactions-poll-duration int 每次轮询交互请求前的等待秒数 (默认 5) -interactions-cooldown-period int 退出前为交互轮询增加的额外时间 (默认 5) -ni, -no-interactsh 为 OAST 测试禁用 Interactsh 服务器,排除基于 OAST 的模板
模糊测试 (FUZZING): -ft, -fuzzing-type string 覆盖模板中设置的模糊测试类型 (replace, prefix, postfix, infix) -fm, -fuzzing-mode string 覆盖模板中设置的模糊测试模式 (multiple, single) -fuzz 启用加载模糊测试模板 (已弃用: 请使用 -dast) -dast 启用/运行 DAST(动态应用安全测试,即模糊测试)nuclei 模板 -dts, -dast-server 启用 DAST 服务器模式(实时模糊测试) -dtr, -dast-report 将 DAST 扫描报告写入文件 -dtst, -dast-server-token string DAST 服务器令牌 (可选) -dtsa, -dast-server-address string DAST 服务器地址 (默认 "localhost:9055") -dfp, -display-fuzz-points 在输出中显示模糊测试点以供调试 -fuzz-param-frequency int 在跳过前,对无趣参数进行模糊测试的频率 (默认 10) -fa, -fuzz-aggression string 模糊测试攻击级别,控制模糊测试的载荷数量 (low, medium, high) (默认 "low") -cs, -fuzz-scope string[] 模糊测试器要遵循的在范围内的 URL 正则表达式 -cos, -fuzz-out-scope string[] 模糊测试器要排除的超出范围的 URL 正则表达式
Uncover (资产搜索引擎集成): -uc, -uncover 启用 Uncover 引擎 -uq, -uncover-query string[] Uncover 搜索查询语句 -ue, -uncover-engine string[] Uncover 搜索引擎 (shodan, censys, fofa, shodan-idb, quake, hunter, zoomeye, netlas, criminalip, publicwww, hunterhow, google, odin, binaryedge, onyphe, driftnet, greynoise) (默认 shodan) -uf, -uncover-field string Uncover 要返回的字段 (ip, port, host) (默认 "ip:port") -ul, -uncover-limit int Uncover 要返回的结果数量 (默认 100) -ur, -uncover-ratelimit int 覆盖未知速率限制的引擎的速率限制 (默认 60 请求/分钟)
速率限制 (RATE-LIMIT): -rl, -rate-limit int 每秒发送的最大请求数 (默认 150) -rld, -rate-limit-duration value 每秒发送的最大请求数 (默认 1s) -rlm, -rate-limit-minute int 每分钟发送的最大请求数 (已弃用) -bs, -bulk-size int 每个模板并行分析的最大主机数 (默认 25) -c, -concurrency int 并行执行的最大模板数 (默认 25) -hbs, -headless-bulk-size int 每个模板并行分析的无头浏览器主机最大数量 (默认 10) -headc, -headless-concurrency int 并行执行的最大无头浏览器模板数 (默认 10) -jsc, -js-concurrency int 并行执行的 JavaScript 运行时最大数量 (默认 120) -pc, -payload-concurrency int 每个模板的最大载荷并发数 (默认 25) -prc, -probe-concurrency int 与 httpx 一起使用的 HTTP 探测并发数 (默认 50) -tlc, -template-loading-concurrency int 最大的并发模板加载操作数 (默认 50)
优化 (OPTIMIZATIONS): -timeout int 超时时间(秒)(默认 10) -retries int 失败请求的重试次数 (默认 1) -ldp, -leave-default-ports 保留默认的 HTTP/HTTPS 端口 (例如 host:80, host:443) -mhe, -max-host-error int 在跳过扫描某个主机前,该主机允许的最大错误数 (默认 30) -te, -track-error string[] 将给定的错误添加到 max-host-error 监视列表 (standard, file) -nmhe, -no-mhe 禁用基于错误跳过主机扫描 -project 使用一个项目文件夹来避免重复发送相同的请求 -project-path string 设置特定的项目路径 (默认 "C:\Users\...\AppData\Local\Temp") -spm, -stop-at-first-match 在第一个匹配项处理后停止处理 HTTP 请求 (可能会破坏模板/工作流逻辑) -stream 流模式 - 开始处理而不对输入进行排序 -ss, -scan-strategy value 扫描时使用的策略 (auto/host-spray/template-spray) (默认 auto) -irt, -input-read-timeout value 输入读取的超时时间 (默认 3m0s) -nh, -no-httpx 为非 URL 输入禁用 httpx 探测 -no-stdin 禁用标准输入处理
无头浏览器 (HEADLESS): -headless 启用需要无头浏览器支持的模板(Linux 上的 root 用户将禁用沙箱) -page-timeout int 无头模式下每个页面的等待秒数 (默认 20) -sb, -show-browser 在无头模式运行模板时在屏幕上显示浏览器 -ho, -headless-options string[] 使用附加选项启动无头 Chrome -sc, -system-chrome 使用本地安装的 Chrome 浏览器,而不是 nuclei 内置的 -lha, -list-headless-action 列出所有可用的无头操作
调试 (DEBUG): -debug 显示所有请求和响应 -dreq, -debug-req 显示所有已发送的请求 -dresp, -debug-resp 显示所有收到的响应 -p, -proxy string[] 要使用的 http/socks5 代理列表(逗号分隔或文件输入) -pi, -proxy-internal 代理所有内部请求 -ldf, -list-dsl-function 列出所有受支持的 DSL 函数签名 -tlog, -trace-log string 写入已发送请求跟踪日志的文件 -elog, -error-log string 写入已发送请求错误日志的文件 -version 显示 nuclei 版本 -hm, -hang-monitor 启用 nuclei 挂起监控 -v, -verbose 显示详细输出 -profile-mem string 生成内存(堆)分析和追踪文件 -vv 显示扫描加载的模板 -svd, -show-var-dump 显示变量转储以供调试 -vdl, -var-dump-limit int 限制变量转储中显示的字符数 (默认 255) -ep, -enable-pprof 启用 pprof 调试服务器 -tv, -templates-version 显示已安装的 nuclei-templates 的版本 -hc, -health-check 运行诊断检查
更新 (UPDATE): -up, -update 将 nuclei 引擎更新到最新发布版本 -ut, -update-templates 将 nuclei-templates 更新到最新发布版本 -ud, -update-template-dir string 自定义安装/更新 nuclei-templates 的目录 -duc, -disable-update-check 禁用自动的 nuclei/模板 更新检查
统计 (STATISTICS): -stats 显示正在运行的扫描的统计信息 -sj, -stats-json 以 JSONL(ines) 格式显示统计信息 -si, -stats-interval int 显示统计信息更新之间的等待秒数 (默认 5) -mp, -metrics-port int 暴露 nuclei 指标的端口 (默认 9092) -hps, -http-stats 启用 HTTP 状态码捕获(实验性)
云端 (CLOUD): -auth 配置 ProjectDiscovery Cloud (PDCP) API 密钥 (默认 true) -tid, -team-id string 将扫描结果上传到指定的团队 ID (可选) (默认 "none") -cup, -cloud-upload 将扫描结果上传到 PDCP 仪表板 [已弃用,请使用 -dashboard] -sid, -scan-id string 将扫描结果上传到现有的扫描 ID (可选) -sname, -scan-name string 要设置的扫描名称 (可选) -pd, -dashboard 在 ProjectDiscovery Cloud (PDCP) UI 仪表板中上传/查看 nuclei 结果 -pdu, -dashboard-upload string 在 ProjectDiscovery Cloud (PDCP) UI 仪表板中上传/查看 nuclei 结果文件 (jsonl)
认证 (AUTHENTICATION): -sf, -secret-file string[] 包含 nuclei 认证扫描所需密钥的配置文件路径 -ps, -prefetch-secrets 从密钥文件中预取密钥
示例 (EXAMPLES) 对单个主机运行 nuclei $ nuclei -target example.com
使用特定模板目录运行 nuclei $ nuclei -target example.com -t http/cves/ -t ssl
对主机列表运行 nuclei $ nuclei -list hosts.txt
使用 JSON 输出运行 nuclei $ nuclei -target example.com -json-export output.json
使用排序的 Markdown 输出运行 nuclei(配合环境变量) $ MARKDOWN_EXPORT_SORT_MODE=template nuclei -target example.com -markdown-export nuclei_report/ 使用代理、nginx所有模板扫描,并将结果上传至云端Project Discovery Dashboard $ nuclei -u www.example.com -p "socks5://127.0.0.1:7890" -tags "nginx" -dashboard 使用代理、自动识别指纹并筛选模板进行扫描、将结果上传至Dashboard $ nuclei -u www.example.com -as -p "socks5://127.0.0.1:7890" -dashboard
更多文档请访问: https://docs.nuclei.sh/getting-started/running
|