CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

Dalfox

$ dalfox 官方出品 高风险
hahwul · 安全扫描与密钥管理 · MIT · macos / linux / windows

Dalfox(dalfox)是一款基于 Go 的参数分析与 XSS 漏洞扫描器,支持单 URL(dalfox url)、URL 列表(dalfox file)和标准输入管道(dalfox pipe)。内置 --format json、--silence、--no-color 及 --only-discovery,适合在安全流水线中无头执行。

FCRS-1.0 综合评分
78 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install dalfox
CLI vs MCP 选型建议 仅 CLI 可用

dalfox 直接在本地向已授权 Web 目标发起主动 HTTP 参数模糊测试与 XSS 验证,属于纯 CLI 场景。

Agent 友好度体检单

✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
✓ 支持 NO_COLOR
✓ 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 21 / 25

支持 --format json、--silence、--no-color 以及管道输入,无任何交互阻塞。

  • Native --format json and --silence flags
  • Supports stdin dalfox pipe workflows
安全与权限边界 16 / 25

属于主动 DAST 扫描器,会向远端接口注入 XSS 载荷(存储型 XSS 可能持久化),不过 --only-discovery 可限制为仅检测反射。

  • Sends active XSS payloads to target URLs
  • Provides --only-discovery to limit to reflection checks
安装与运行摩擦 14 / 15

单一静态 Go 二进制,可通过 brew、go install、Docker 和 GitHub Releases 获取。

  • Cross-platform Go binary for macOS, Linux, and Windows
能力覆盖与边际价值 12 / 15

专注且快速的 XSS 与参数分析器,可替代手工编写 curl 模糊测试脚本。

  • Automated reflection, DOM, and blind XSS testing
维护与来源背书 8 / 10

由 hahwul(hahwul/dalfox)以 MIT 协议维护。

  • Established open-source repository under MIT
文档与可验证性 7 / 10

官方文档站与子命令 --help 示例清晰。

  • Docs site at dalfox.hahwul.com/docs/home/

安全边界、鉴权与放权指南

鉴权方式
无需鉴权
凭证存储位置

无本地凭据存储;如需携带目标会话 Cookie 或认证头,可通过 -C 或 -H 参数传入。

潜在副作用
只读查询 远端写入
费用与配额提示

MIT 开源 CLI,本地运行免费。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Dalfox (dalfox) Agent Rules
- Only run against staging or explicitly authorized targets.
- Use `--only-discovery --silence --format json` first before running active XSS payload testing.

Agent 高频安全命令配方

只读查询(安全推荐)

仅执行参数反射探测
dalfox url "https://staging.example.com/search?q=test" --only-discovery --silence --format json

在预发 URL 上使用 --only-discovery 检查参数回显,并通过 --silence --format json 输出 JSON,不发送利用载荷。

受控写入与预演

扫描 URL 列表并输出 JSON 报告
dalfox file urls.txt --silence --no-color --format json -o xss-findings.json

对 urls.txt 中的目标发送 XSS 检测载荷,并将结构化 JSON 结果写入 xss-findings.json。

核心优势

  • + 具备规范的 --format json --silence --no-color 流水线输出能力。
  • + --only-discovery 允许 Agent 在发送主动攻击载荷前先验证参数是否存在反射。

注意事项与踩坑点

  • ! 主动 XSS 探测可能触发 WAF 拦截,或在有状态接口留下持久化测试脚本。
  • ! 使用 --blind 时需谨慎核对回调地址,避免指向不受信任的外部监听端。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI