renansj/ryofuzz

GitHub: renansj/ryofuzz

ryofuzz 是一款攻击型 Web 漏洞模糊测试器,通过行为分析、覆盖引导变异和代理拦截等多种模式发现未知 Web 安全漏洞。

Stars: 0 | Forks: 0

# ryofuzz 攻击型 Web 漏洞模糊测试器。通过行为分析、覆盖引导的变异、意图映射和实时代理拦截来发现未知漏洞。 ``` ╔═══════════════════════════════════════════╗ ║ ryofuzz v1.0.15 ║ ║ Offensive Web Vulnerability Fuzzer ║ ║ github.com/renansj/ryofuzz ║ ╚═══════════════════════════════════════════╝ ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ## 独有特性 大多数扫描器只检查已知漏洞。ryofuzz 旨在发现未知漏洞。 - **行为模式**:映射服务器处理输入的方式,然后攻击其逻辑漏洞 - **引导模式**:用于 Web 的、AFL++ 风格的覆盖引导进化式模糊测试 - **智能模式**:类型感知的 payload 生成与误报过滤 - **实时代理模式**:Burp 风格的 MITM 拦截,在你浏览时对 endpoint 进行模糊测试 - **兼容 Nuclei**:原生运行 10,000+ 社区模板 此外,它还具备其他开源工具无法在一个 CLI 中结合的功能: - 用于检测存储型/二阶注入的 Canary 传播 - 差异化授权测试(自动检测 IDOR/提权) - 用于发现业务逻辑漏洞的有状态工作流模糊测试 - 单包 HTTP/2 竞争攻击 - Headless 浏览器 DOM XSS - 链检测,将发现结果关联为关键攻击路径 - 通过 HTTP 和 DNS 的 OOB callback - 可选的 LLM 辅助 payload 生成和分类筛选 ## v1.0.15 的新功能 | 功能 | 标志 | 描述 | |-----------|------|-------------| | 实时代理模糊测试 | `--proxy-mode` | MITM 代理:正常浏览,ryofuzz 在后台进行模糊测试并映射 endpoint | | Headless 浏览器 | `--browser` | 通过 chromedp 进行真实的 DOM XSS 检测 | | 单包竞争 | `--race-singlepacket N` | 针对 TOCTOU 漏洞的 HTTP/2 同步突发请求 | | 有状态工作流 | `--workflow file.yaml` | 多步骤逻辑漏洞模糊测试 | | DNS OOB | `--oob-dns 53` | 通过 DNS 解析捕获盲型 SSRF/XXE | | WAF 绕过 | `--waf-evade` | 遇到 403/406 拦截时的自适应编码链 | | LLM 辅助 | `--llm ollama:llama3` | Payload 生成 + 误报分类筛选 | | Canary 污染 | `--taint-scan` | 存储型/二阶注入检测 | | 差异化授权 | `--mode authz` | 自动检测 IDOR/失效的身份验证/提权 | | OpenAPI 导入 | `--openapi URL` | 根据 spec 自动发现 endpoint | | SARIF 输出 | `--format sarif` | GitHub Security 标签页集成 | ## 安装说明 ``` # go install go install github.com/renansj/ryofuzz@latest # 二进制下载 (Linux) curl -Lo ryofuzz https://github.com/renansj/ryofuzz/releases/latest/download/ryofuzz-linux-amd64 chmod +x ryofuzz && sudo mv ryofuzz /usr/local/bin/ # macOS Apple Silicon curl -Lo ryofuzz https://github.com/renansj/ryofuzz/releases/latest/download/ryofuzz-darwin-arm64 chmod +x ryofuzz && sudo mv ryofuzz /usr/local/bin/ # 从源码构建 git clone https://github.com/renansj/ryofuzz.git && cd ryofuzz go build -ldflags="-s -w" -o ryofuzz . && sudo mv ryofuzz /usr/local/bin/ ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 要求 Go 1.22+。Headless 浏览器模式需要安装 Chromium。 ## 模式 ### 行为模式(意图映射) 首先映射服务器行为,然后根据所学内容进行攻击。发送约 120 个结构化探测请求以了解: - 服务器期望的输入类型(URL、路径、ID、文本、JSON) - 服务器对其进行的处理(抓取、反射、执行、查询数据库) - 验证边界在哪里(哪些字符会改变行为) - 然后针对匹配的特定漏洞类别进行攻击 ``` ryofuzz -u "http://target/api?url=http://example.com" --mode behavioral ryofuzz -u "http://target/search?q=test" --mode behavioral ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 引导模式(用于 Web 的 AFL++) 覆盖引导的进化式模糊测试。保留能触发新服务器行为的输入,并对其进行进一步变异。随着时间推移变得越来越智能。 ``` ryofuzz -u "http://target/api?id=1" --mode guided -n 10000 -c 50 ryofuzz -u "http://target/api" -d '{"user":"test"}' --mode guided -n 50000 ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 智能模式(默认) 已知 payload + 类型感知的智能生成 + 行为差异分析。在速度和覆盖率之间取得了良好的平衡。 ``` ryofuzz -u "http://target/api?id=1&name=test" -t all -c 50 ryofuzz -u "http://target/api" -d '{"user":"admin","role":"viewer"}' -t sqli,ssti ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 自动模式(运行所有内容) 将其指向目标,它将启用完整的 pipeline:爬取、所有漏洞模块、canary/taint 传播、headless 浏览器 DOM XSS、自适应 WAF 绕过和链检测。默认情况下会应用请求预算以避免请求爆炸。 ``` ryofuzz -u "http://target" --auto ryofuzz -u "http://target/api?id=1" --auto --max-requests 10000 ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 相当于启用 `--crawl --taint-scan --browser --waf-evade -t all` 以及链检测,默认预算为 `--max-requests 5000`。 ### Payload / 变异模式 `payloads` = 仅使用已知 payload,不进行变异。`mutate` = 仅进行 radamsa 风格的随机变异。 ``` ryofuzz -u "http://target/search?q=test" --mode payloads -t xss ryofuzz -u "http://target/api" -d '{"data":"test"}' --mode mutate -n 10000 ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 实时代理(Burp 风格拦截) 启动一个 MITM 代理。将你的浏览器指向它并正常浏览。每个通过的请求都会在后台进行轻度模糊测试,并且每个响应都会运行被动检查。在你浏览时,发现结果会实时流转显示。 ``` # 启动 proxy (默认端口 8081) ryofuzz --proxy-mode # 自定义端口和 CA 导出路径 ryofuzz --proxy-mode --proxy-port 8888 --proxy-ca /tmp/ryofuzz-ca.pem ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 设置: 1. 运行上述命令。它会生成一个 CA 证书(`ryofuzz-ca.pem`)。 2. 将浏览器的 HTTP/HTTPS 代理设置为 `127.0.0.1:8081`。 3. 在浏览器或操作系统中将 `ryofuzz-ca.pem` 安装为受信任的 CA(HTTPS 拦截所必需)。 4. 正常浏览目标应用程序。 它对每个请求执行的操作: - 透明转发,以便页面正常加载 - 对每个注入点进行轻量级主动探测(用于 SQLi 的单引号、用于 XSS 的 canary、用于 SSTI 的 7*7、用于 LFI 的遍历) - 被动检查:缺失的安全标头(CSP、HSTS、X-Frame-Options)、不安全的 cookie 标志、泄露的机密(API 密钥、JWT、堆栈跟踪) - 按 endpoint+param 去重,因此不会重复模糊测试同一内容 按 Ctrl+C 停止。退出时会打印完整的发现结果摘要。 默认情况下,代理会主动探测你浏览的每个主机。为避免触及范围外的第三方(CDN、分析、支付提供商),请使用 `--proxy-scope` 限制主动模糊测试。被动 endpoint 映射仍会记录所有流量;只有主动探测受到限制。 ``` ryofuzz --proxy-mode --proxy-scope target.com --proxy-scope api.target.com ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) #### 被动 endpoint 映射(侦察) 在你浏览时,代理还会将每个 endpoint 记录到 OpenAPI 3.0 规范中。退出时,它会将规范写入 `ryofuzz-endpoints.json`(可通过 `--proxy-endpoints` 配置)。记录器会: - 自动模板化动态路径段:`/api/users/123` 和 `/api/users/456` 折叠为 `/api/users/{id}`(也处理 UUID 和哈希) - 捕获带有示例值和推断类型的查询参数 - 捕获自定义请求标头(过滤标准的浏览器噪声) - 从观察到的 body 中推断 JSON 和表单 body 字段类型 - 记录观察到的响应状态码和每个 endpoint 的命中次数 生成的规范可直接反馈用于定向模糊测试: ``` # 步骤 1:通过 proxy 浏览应用以进行映射 ryofuzz --proxy-mode --proxy-endpoints app-map.json # 步骤 2:对发现的所有内容进行 fuzzing ryofuzz --openapi app-map.json -t all ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 这将把随意的浏览转化为可重用的攻击面映射。`--openapi` 标志接受本地文件路径和 HTTP URL。 ## 漏洞模块 (48) | 模块 | 测试内容 | |--------|---------------| | `sqli` | SQL 注入(报错、时间、布尔、联合、堆叠、OOB) | | `xss` | 跨站脚本攻击(上下文感知:仅在 HTML 中可执行时确认) | | `ssti` | 服务端模板注入(Jinja2、Twig、Freemarker、Thymeleaf、Mako、Pebble、Velocity、EJS、Pug、Handlebars、Smarty) | | `ssrf` | 服务端请求伪造(AWS/GCP/Azure 元数据、IP 绕过、协议走私) | | `cmdi` | 操作系统命令注入(Linux/Windows、基于时间、绕过) | | `lfi` | 本地文件包含(遍历、PHP wrappers、空字节、日志中毒) | | `xxe` | XML 外部实体(文件读取、盲型 OOB、通过 XXE 的 SSRF) | | `nosqli` | NoSQL 注入(MongoDB 操作符、JS 注入) | | `idor` | 不安全的直接对象引用 | | `redirect` | 开放重定向 | | `crlf` | CRLF 注入 / 响应拆分 | | `prototype` | 原型污染(Node.js) | | `jwt` | JWT 算法混淆 / alg:none / JWK 注入 | | `mass-assign` | 批量赋值 / 参数污染 | | `race` | 竞争条件 | | `smuggling` | HTTP 请求走私 | | `cors` | CORS 配置错误 | | `csp` | 内容安全策略分析 | | `graphql` | GraphQL 自省 / 批处理 | | `deser` | 不安全的反序列化(PHP、Python、Java、Node、.NET) | | `ldapi` | LDAP 注入 | | `xpathi` | XPath 注入 | | `logic` | 业务逻辑漏洞(负值、零金额) | | `ratelimit` | 速率限制绕过 | | `verb` | HTTP 动词篡改 | | `hostheader` | Host 标头注入 | | `cache` | Web 缓存中毒 | | `ws` | WebSocket 安全 | | `prompt` | AI/LLM 提示词注入 | | `cve` | 感知 CVE 的定向模糊测试(从标头自动检测框架) | | `cache-deception` | Web 缓存欺骗(通过路径后缀技巧缓存经过身份验证的页面) | | `oauth` | OAuth/OIDC 流程攻击(redirect_uri 绕过、缺少 state、PKCE 降级) | | `upload` | 文件上传绕过(扩展名技巧、多语言、SVG XSS、空字节) | | `pwreset` | 密码重置中毒(重置电子邮件中的 Host 标头注入) | | `hpp` | HTTP 参数污染(重复参数、数组注入) | | `csv` | CSV/公式注入(DDE,通过 =、+、-、@ 进行公式注入) | | `email-inj` | 电子邮件标头注入(电子邮件字段中的 CRLF、BCC 注入) | | `xssi` | 跨站脚本包含(JSONP 数据泄露、callback 注入) | | `el` | 表达式语言注入(SpEL、OGNL、MVEL、JEXL、JSP EL) | | `infoleak` | 敏感文件/信息泄露(.git、.env、actuator、sourcemaps、备份) | | `csrf` | 跨站请求伪造(缺少防 CSRF token、缺少 SameSite) | | `takeover` | 子域接管(悬空 CNAME 指纹:S3、GitHub Pages、Heroku 等) | | `saml` | SAML XML 签名包装 / 身份验证绕过(XSW、注释注入、未签名断言) | | `clickjack` | 点击劫持(缺少 X-Frame-Options 和 CSP frame-ancestors) | | `redos` | 正则表达式拒绝服务(灾难性回溯、计时) | | `xslt` | XSLT 注入(文件读取、处理器泄露、php:function) | | `session` | 会话管理(不安全的 cookie 属性、低熵) | | `userenum` | 账户/用户名枚举(详细区分消息) | | `zipslip` | 归档提取路径遍历(通过 multipart 的恶意 zip) | 客户端模块(需要 `--browser`,headless Chromium): | 模块 | 测试内容 | |--------|---------------| | `dom` | 基于 DOM 的 XSS(挂钩 eval/alert/innerHTML/document.write) | | `csti` | 客户端模板注入(AngularJS/Vue,沙箱逃逸) | | `domclob` | DOM 劫持(id/name 属性劫持 JS 全局变量) | | `postmsg` | 没有 origin 验证的 postMessage 处理程序 | | `cspt` | 客户端路径遍历(挂钩客户端请求中针对 ../ 的 fetch/XHR) | 协议级检查(原始套接字 / 专用握手): | 检查 | 测试内容 | |-------|---------------| | `ws` (CSWSH) | 跨站 WebSocket 劫持(伪造的 Origin 握手) | | `smuggling` | HTTP 请求走私 CLE / TE.CL(基于原始套接字时间的去同步) | ## 功能 ### 自动检测注入点 自动查找所有可模糊测试的参数: - URL 查询参数 - 路径段(数字、UUID、十六进制) - JSON body(嵌套字段) - URL 编码的表单 body - HTTP 标头 - Cookies ### 智能 payload 生成 基于检测到的值类型的类型感知变异: - 整数:边界值、溢出、类型混淆 - 浮点数:IEEE 754 边界情况、精度 - 字符串:长度变化、unicode、格式化字符串 - URL:内部 IP、元数据、协议走私、绕过模式 - 电子邮件:标头注入、域技巧 - UUID:枚举、格式混淆 - JSON:嵌套、原型污染、重复键 ### 误报过滤 上下文感知的过滤可消除噪声: - 在声称存在 XSS 之前检查 Content-Type(仅 HTML 可执行) - 检测服务器何时仅在错误消息中回显 payload - 验证用于反射的 HTML 上下文(body 对比 属性 对比 脚本 对比 安全) - 过滤仅是 URL 解析失败的 CVE 探测错误 - 在超过 20% 的响应为错误时抑制 500 泛滥 ### 感知 CVE 的探测 通过响应标头对服务器进行指纹识别,然后生成定向模糊测试: - Apache:路径遍历绕过(CVE-2021-41773 风格) - Nginx:别名遍历、差一斜杠 - Express/Node.js:原型污染链 - Spring/Java:SpEL 注入、Spring4Shell 模式 - Next.js:中间件绕过(CVE-2025-29927) - Django/Flask:调试页面、SSTI - Laravel:Ignition RCE 模式 - ASP.NET:ViewState、填充预言机 - Tomcat:Ghostcat、manager 路径 ### OOB callback 服务器 用于确认盲型漏洞的内置带外监听器: ``` # 本地(你的 IP 可从目标访问) ryofuzz -u "http://target/api" -t ssrf --oob 10.10.14.5 --oob-listen 8888 --oob-mode private # 通过 ngrok ryofuzz -u "http://target/api" -t ssrf --oob auto --oob-mode ngrok # CTF(私有网络) ryofuzz -u "http://10.10.10.50/api?file=x" -t ssrf --oob 10.10.14.5:8888 --oob-mode private ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### Web 爬虫 在模糊测试之前发现 endpoint: ``` ryofuzz -u "http://target" --crawl --crawl-depth 3 -t all ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 提取:链接、表单、来自 JavaScript 的 API 路由、sitemap.xml、robots.txt。 ### 身份验证 ``` # Bearer token ryofuzz -u "http://target/api" -t all --auth bearer --auth-token "eyJ..." # Form 登录(自动提取 token) ryofuzz -u "http://target/admin" -t all \ --auth form --auth-url "http://target/login" \ --auth-body '{"email":"user@test.com","password":"pass"}' --auth-field "token" # Basic auth ryofuzz -u "http://target/api" -t all --auth basic --auth-user admin --auth-pass secret # API key ryofuzz -u "http://target/api" -t all --auth custom --auth-token "sk-xxx" --auth-header "X-API-Key" ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 会话过期时自动刷新(检测 401/403)。 ### 兼容 Nuclei 模板 使用扩展引擎原生运行 Nuclei 社区模板。 ``` # 设置(一次) git clone --depth 1 https://github.com/projectdiscovery/nuclei-templates.git ~/nuclei-templates # 同时运行 CVE templates 和 fuzzing ryofuzz -u "http://target" -t all --nuclei-templates ~/nuclei-templates/http/cves/ # 按 severity 过滤 ryofuzz -u "http://target" -t all --nuclei-templates ~/nuclei-templates/http/ --nuclei-severity critical,high # 按 tags 过滤 ryofuzz -u "http://target" -t all --nuclei-templates ~/nuclei-templates/http/ --nuclei-tags rce,ssrf,lfi # 列出因不支持的特性而跳过的 templates(宁可如实说明,也不虚假覆盖) ryofuzz -u "http://target" --nuclei-templates ~/nuclei-templates/http/ --nuclei-report-skipped ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 引擎功能: - 匹配器:word、regex、status、size、binary、dsl、xpath,支持不区分大小写、match-all、and/or 条件、negative、internal 以及 parts body/header/all/raw/status - 提取器:regex(带 group)、kval、json(gjson)、xpath、dsl,带有流入后续请求的内部动态变量 - DSL 引擎:由 expr-lang 支持,约 45 个辅助函数(contains、regex、md5/sha1/sha256、hmac、base64、hex、url encode/decode、rand_*、compare_versions、mmh3 等)以及响应变量(status_code、body、header、duration) - 插值:{{BaseURL}}、{{Hostname}}、{{Host}}、{{Port}}、{{Path}}、{{Scheme}},预处理程序({{randstr}}),模板变量块,以及 {{...}} 内部的 DSL - 具有字节保真度的原始 HTTP 请求,以及带有提取变量传播的多步请求 - 攻击模式:batteringram、pitchfork、clusterbomb payload 排列 - Interactsh:{{interactsh-url}} 连接到内置的 OOB 服务器(HTTP + DNS),具有 interactsh_protocol 匹配器关联 - 分类:cve-id、cwe-id、cvss-score 映射到发现结果中 诚实度 (G9):使用不受支持功能(code、javascript、flow、headless、dns/tcp/ssl/file 协议或未实现的 DSL 函数)的模板将被明显跳过,绝不会半评估为可能错误的匹配。使用 `--nuclei-report-skipped` 列出它们,或使用 `--nuclei-strict` 将它们显示为 info 发现。 已验证的兼容性(针对官方 nuclei-templates 语料库,13082 个模板):98.3% 解析无错误,约 90% 的 HTTP 模板完全受支持。自行运行测试工具: ``` # 解析率和支持的特性报告 RYOFUZZ_TEMPLATES=~/nuclei-templates go test ./internal/nuclei/ -run TestParseRate -v # 与真实的 nuclei binary 进行 differential(相同目标 + templates,对比判定结果) RYOFUZZ_DIFF_TARGET=http://target RYOFUZZ_DIFF_TEMPLATES=~/nuclei-templates/http/misconfiguration \ go test ./internal/nuclei/ -run TestDifferentialVsNuclei -v ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 插件系统 使用自定义 YAML 检查进行扩展: ``` # ~/.ryofuzz/plugins/custom-check.yaml name: custom-waf-bypass severity: critical module: sqli-custom owasp: "A03:2021 Injection" cwe: CWE-89 payloads: - value: "' /*!50000OR*/ 1=1-- -" variant: mysql-versioned-comment detection: method: contains patterns: - "syntax error" - "mysql" ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ``` ryofuzz -u "http://target" --plugins-dir ./my-plugins -t all ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 输出格式 ``` # 终端(彩色,默认) ryofuzz -u "http://target" -t all # JSON(用于 pipelines) ryofuzz -u "http://target" -t all --format json -o results.json # Markdown ryofuzz -u "http://target" -t all --format markdown -o report.md # HTML(自带 dark theme 和 SVG 图表) ryofuzz -u "http://target" -t all --format html -o report.html ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 代理支持 通过 Burp Suite 或 ZAP 路由流量: ``` ryofuzz -u "http://target/api?id=1" -t all --proxy http://127.0.0.1:8080 ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ## 完整 CLI 参考 ``` ryofuzz [flags] ryofuzz version Target: -u, --url string Target URL (required) -X, --method string HTTP method (auto-detected) -d, --data string Request body (JSON or URL-encoded) -H, --header strings Custom headers (repeatable) -b, --cookie string Cookies Fuzzing: -t, --tests string Modules: all, sqli, xss, ssti, ssrf, ... (default "all") --mode string Mode: smart, payloads, mutate, guided, behavioral, authz (default "smart") -n, --mutations int Payload count for guided/mutate mode (default auto) -c, --concurrency int Concurrent workers (default 20) --timeout int Request timeout in seconds (default 15) --delay int Delay between requests in ms --rate int Max requests/second (0=unlimited) --max-requests int Global cap on total payloads per target (0=unlimited) --auto Auto mode: crawl + all modules + taint + browser + waf-evade + chain --follow Follow redirects Output: -o, --output string Output file --format string text, json, markdown, html, sarif (default "text") -v, --verbose Verbose output Auth: --auth string Method: basic, bearer, form, cookie, custom --auth-user string Username --auth-pass string Password --auth-token string Token/API key --auth-url string Login URL (for form auth) --auth-body string Login body (for form auth) --auth-field string Token field in login response --auth-header string Header name for token (default "Authorization") --auth-prefix string Token prefix (default "Bearer") Discovery: --crawl Crawl before fuzzing --crawl-depth int Max depth (default 3) --ignore-robots Ignore robots.txt OOB: --oob string OOB domain/IP:port for callbacks (e.g., 10.10.14.5:8888) --oob-listen int Listener port (default 8888) --oob-mode string local, ngrok, private (default "local") --oob-wait int Seconds to wait for OOB callbacks (default 3) Nuclei: --nuclei-templates string Path to nuclei-templates directory --nuclei-tags string Filter by tags (comma-separated) --nuclei-severity string Filter by severity (default "critical,high") --nuclei-strict Surface skipped (unsupported) templates as info findings --nuclei-report-skipped List templates skipped for unsupported features Advanced: --openapi string URL to OpenAPI/Swagger spec for endpoint discovery --taint-scan Enable canary propagation for stored/second-order detection --authz-identities strings Identities for authz testing (name:header:value, repeatable) --log-file string Request/response JSONL log path (default ".ryofuzz-log.jsonl") --workflow string Path to workflow YAML for stateful fuzzing --race-singlepacket int Single-packet race attack parallel requests (0=disabled) --browser Enable headless browser DOM XSS scanning --waf-evade Adaptive WAF evasion: retry blocked payloads with encoding chains Live Proxy: --proxy-mode Start in live proxy fuzzing mode (MITM intercept + scan) --proxy-port int Proxy listen port (default 8081) --proxy-ca string Path to export CA cert for browser trust (default "ryofuzz-ca.pem") --proxy-endpoints string Path to export discovered endpoints as OpenAPI spec (default "ryofuzz-endpoints.json") --proxy-scope strings Restrict active fuzzing to these hosts (repeatable). Recon maps all traffic. DNS OOB: --oob-dns int UDP port for DNS OOB listener (0=disabled) LLM: --llm string LLM provider spec (e.g. ollama:llama3) --llm-payloads Use LLM to generate additional payloads --llm-triage Use LLM to triage findings (filter false positives) Plugins: --plugins-dir string Custom plugins directory Other: --proxy string HTTP proxy for outbound traffic (e.g., http://127.0.0.1:8080) ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ## 检测质量 ### 确认循环(减少误报) 基于时间的发现会自动重发两次: 1. 相同的 payload,以确认延迟可重现 2. 无休眠变体(sleep(0)),以排除网络延迟 如果延迟无法重现,该发现将被静默丢弃。 基于布尔的 SQLi 发现通过发送互补 payload(例如,在 `OR 1=1` 之后发送 `OR 1=2`)来确认。如果两个响应相同,则它不是真正的布尔预言机,该发现将被丢弃。 ### 覆盖引导的语料库持久化 在引导模式下,进化的语料库将在扫描完成时保存到 `.ryofuzz-corpus.json`,并在下次运行时自动重新加载。这支持跨会话的增量模糊测试。 ``` # 首次运行:从零开始探索 ryofuzz -u "http://target/api?id=1" --mode guided -n 10000 # 第二次运行:从之前的 corpus 恢复 ryofuzz -u "http://target/api?id=1" --mode guided -n 50000 ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 用于盲型检测的 OOB callback 内置带有 token 关联的 HTTP 监听器,用于盲型 SSRF、XXE 和 RFI: ``` ryofuzz -u "http://target/webhook" -d '{"url":"http://x.com"}' \ -t ssrf --oob 10.10.14.5:8888 --oob-listen 8888 --oob-mode private --oob-wait 10 ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 服务器为每个 payload 生成唯一的 token。当目标向监听器发出出站请求时,该 callback 将与触发它的准确 payload 相关联,从而生成已确认的关键发现。 ### 链检测 扫描后,ryofuzz 会将发现结果关联起来,以检测具有更高严重性的攻击链: - SSRF + 元数据访问 = 云凭证窃取(严重) - 开放重定向 + OAuth 流程 = 账户接管(严重) - XSS + CORS 配置错误 = 跨域数据窃取(严重) - SQL 注入 + IDOR = 大规模数据泄露(严重) - 原型污染 = 通过 template gadgets 实现的潜在 RCE(严重) 链发现会自动附加 `[CHAIN]` 前缀。 ### Canary 传播(存储型/二阶检测) 将唯一的 canary 字符串注入每个参数,然后扫描所有其他响应以查看它们是否存在。如果注入到 endpoint A 的 canary 出现在 endpoint B 的响应中,则表明存在存储型/二阶注入。 ``` ryofuzz -u "http://target/api" -t all --taint-scan --crawl ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 差异化授权测试 使用多个身份发送相同的请求,并比较结果以检测 IDOR、失效的身份验证和权限提升: ``` ryofuzz -u "http://target/api/users/1" --mode authz \ --authz-identities "anon:" \ --authz-identities "userA:Authorization:Bearer TOKEN_A" \ --authz-identities "admin:Authorization:Bearer TOKEN_ADMIN" ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### OpenAPI/Swagger 导入 从 OpenAPI spec 自动发现所有 endpoint 和参数: ``` ryofuzz --openapi https://target/swagger.json -t all ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### SARIF 输出(CI/CD 集成) ``` ryofuzz -u "http://target" -t all --format sarif -o results.sarif # 通过 github/codeql-action/upload-sarif 上传到 GitHub Security 标签页 ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### Headless 浏览器 DOM XSS 启动 headless Chromium,挂钩 `eval`、`alert`、`document.write` 和 `innerHTML`,然后将 canary payload 注入查询参数和 URL 片段中。确认客户端执行而不仅仅是反射。需要安装 Chromium。 ``` ryofuzz -u "http://target/page?q=test" --browser ryofuzz -u "http://target" --crawl --browser ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### 单包竞争攻击(HTTP/2) 以同步突发方式发出 N 个请求,以便它们同时到达服务器,从而消除网络抖动。检测普通并发遗漏的 TOCTOU 竞争条件:优惠券重用、余额绕过、双重消费。 ``` # 20 个并行请求对齐到同一瞬间 ryofuzz -u "http://target/api/redeem-coupon" -d '{"code":"SAVE10"}' --race-singlepacket 20 ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 如果本应只有一个请求成功的地方却有多个请求成功,则会标记竞争条件。 ### 有状态工作流模糊测试 对多步骤流程(登录、创建、读取、删除)进行建模,并对转换进行模糊测试:跳过步骤、重新排序、重放非幂等操作、在步骤之间操纵状态。捕获无状态模糊测试工具永远无法看到的业务逻辑漏洞。 ``` ryofuzz --workflow examples/workflow-checkout.yaml ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 工作流 YAML 格式: ``` workflow: checkout steps: - name: add_cart request: {method: POST, url: "http://target/cart", body: '{"item":1,"qty":1}'} extract: {cart_id: "cartId\":\"([^\"]+)"} - name: apply_coupon request: {method: POST, url: "http://target/coupon", body: '{"code":"SAVE10"}'} fuzz: [replay_n_times, reorder] - name: checkout request: {method: POST, url: "http://target/checkout", body: '{"cart":"{{cart_id}}"}'} fuzz: [negative_qty] assert_logic: [total_not_negative, qty_positive, status_ok] ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 状态通过 cookie jar 和来自 `extract` 的 `{{varname}}` 替换跨步骤传递。 ### DNS OOB 监听器 捕获触发 DNS 解析但不触发 HTTP callback 的盲型 SSRF/XXE。运行一个通过子域 token 关联查找的 DNS 服务器。 ``` ryofuzz -u "http://target/api" -t ssrf,xxe \ --oob 10.10.14.5:8888 --oob-dns 53 --oob-mode private ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) 需要一个其 NS 指向你的监听器的域,或者一个针对你解析 DNS 的目标。 ### 自适应 WAF 绕过 根据拦截行为检测 WAF(Cloudflare、AWS WAF、Akamai、ModSecurity、Imperva),然后通过编码链(双重 URL 编码、unicode、大小写随机化、内联注释、HTML 实体)重试被拦截的 payload,直到一个通过。 ``` ryofuzz -u "http://target/api?id=1" -t sqli,xss --waf-evade ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ### LLM 辅助(可选) 使用本地 Ollama 模型(或兼容的 API)进行上下文 payload 生成和误报分类筛选。如果模型不可用,则会优雅降级。 ``` # 生成特定于 stack 的 payloads ryofuzz -u "http://target/api?id=1" -t all --llm ollama:llama3 --llm-payloads # Triage 发现结果以减少 false positives ryofuzz -u "http://target/api?id=1" -t all --llm ollama:llama3 --llm-triage ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ## 架构 ``` ryofuzz/ ├── cmd/root.go # CLI orchestration ├── internal/ │ ├── behavioral/engine.go # Behavioral intent mapping (Phase 1-2-3) │ ├── fuzzer/guided.go # Coverage-guided evolutionary fuzzer (simhash coverage) │ ├── input/parser.go # Injection point auto-detection │ ├── engine/engine.go # Concurrent request engine (pooled client) │ ├── mutator/ # Radamsa-style + smart type-aware mutations │ ├── payloads/database.go # 740+ embedded payloads │ ├── vulns/ # 38 vulnerability modules + CVE probe │ ├── analyzer/ # Behavioral clustering + FP filter │ ├── confirm/blind.go # Statistical blind injection confirmation │ ├── chain/engine.go # Finding correlation into attack chains │ ├── taint/canary.go # Canary propagation (stored/second-order) │ ├── authz/diff.go # Differential authorization testing │ ├── workflow/engine.go # Stateful multi-step workflow fuzzing │ ├── race/singlepacket.go # HTTP/2 single-packet race attack │ ├── proxy/proxy.go # Live MITM proxy fuzzing + endpoint recon (OpenAPI export) │ ├── browser/dom.go # Headless browser DOM XSS (chromedp) │ ├── waf/evasion.go # WAF fingerprint + adaptive evasion │ ├── llm/client.go # LLM payload gen + triage (Ollama) │ ├── schema/openapi.go # OpenAPI/Swagger import │ ├── logger/logger.go # Full request/response JSONL logging │ ├── nuclei/runner.go # Nuclei template executor │ ├── reporter/ # text, json, markdown, html, sarif output │ ├── oob/ # OOB callback server (HTTP + DNS) │ ├── auth/ # Authentication manager │ ├── crawler/ # Web spider + JS parser │ └── plugins/ # YAML plugin loader ├── examples/ # Example workflow YAML └── plugins/ # Example custom checks ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ## 示例 ``` # 包含所有模块的全面扫描 ryofuzz -u "http://target/api?id=1&name=test" -t all -c 50 # 首先了解服务器行为(推荐用于研究) ryofuzz -u "http://target/endpoint?param=value" --mode behavioral # 用于 0-day 发现的深度 fuzzing ryofuzz -u "http://target/api?id=1" --mode guided -n 50000 -c 100 # 带 auth 的 JSON API ryofuzz -u "http://target/api/users" -d '{"search":"test"}' \ -t sqli,ssti,nosqli --auth bearer --auth-token "eyJ..." # Crawl + fuzz + nuclei + HTML 报告 ryofuzz -u "http://target" --crawl -t all \ --nuclei-templates ~/nuclei-templates/http/cves/ \ --format html -o report.html # 带 OOB callbacks 的 Blind SSRF ryofuzz -u "http://target/webhook" -d '{"url":"http://x.com"}' \ -t ssrf --oob 10.10.14.5:8888 --oob-mode private # 通过 Burp proxy ryofuzz -u "http://target/api?q=test" -t all --proxy http://127.0.0.1:8080 # OpenAPI/Swagger 自动发现 ryofuzz --openapi https://target/v2/swagger.json -t all # 通过 canary 传播进行 Stored/second-order 检测 ryofuzz -u "http://target/api/comments" -d '{"body":"test"}' -t all --taint-scan --crawl # Differential 授权(检测 IDOR/broken auth/privesc) ryofuzz -u "http://target/api/users/1" --mode authz \ --authz-identities "anon:" \ --authz-identities "user:Authorization:Bearer USER_TOKEN" \ --authz-identities "admin:Authorization:Bearer ADMIN_TOKEN" # 用于 GitHub Security 集成的 SARIF 输出 ryofuzz -u "http://target" -t all --format sarif -o results.sarif # 通过 stdin 的多目标 cat urls.txt | ryofuzz -t sqli,xss # 完整的 request/response 日志记录以便重现 ryofuzz -u "http://target/api?id=1" -t all --log-file scan.jsonl # 新模块:cache deception, OAuth, upload bypass ryofuzz -u "http://target/account/profile" -t cache-deception ryofuzz -u "http://target/oauth/authorize?redirect_uri=http://legit.com/cb" -t oauth ryofuzz -u "http://target/upload" -d @file.png -t upload # Live proxy:在 ryofuzz 于后台进行 fuzzing 时浏览 ryofuzz --proxy-mode --proxy-port 8081 # Recon 工作流:通过浏览映射 endpoints,然后对映射进行 fuzz ryofuzz --proxy-mode --proxy-endpoints app-map.json # browse, then Ctrl+C ryofuzz --openapi app-map.json -t all # fuzz everything discovered # Headless browser DOM XSS ryofuzz -u "http://target/page?q=test" --browser # Single-packet race condition(double-spend, coupon reuse) ryofuzz -u "http://target/api/redeem" -d '{"code":"SAVE10"}' --race-singlepacket 20 # Stateful 工作流逻辑缺陷 ryofuzz --workflow examples/workflow-checkout.yaml # 通过 DNS exfiltration 的 Blind SSRF ryofuzz -u "http://target/api" -t ssrf,xxe --oob 10.10.14.5:8888 --oob-dns 53 --oob-mode private # 自适应 WAF evasion ryofuzz -u "http://target/api?id=1" -t sqli,xss --waf-evade # LLM 辅助的 payloads + triage(本地 Ollama) ryofuzz -u "http://target/api?id=1" -t all --llm ollama:llama3 --llm-payloads --llm-triage ``` ![ryofuzz 演示](https://static.pigsec.cn/wp-content/uploads/repos/2026/06/18719464fe002415.gif) ## 免责声明 仅用于授权的安全测试和 CTF 挑战。请勿在未经明确许可的情况下对系统使用。 ## 作者 RyoSec - Renan Zapelini ## 许可证 MIT
标签:CISA项目, EVTX分析, Fuzzing, Web安全, 日志审计, 蓝队分析