EnCrYpTeD05/XSS-HUNTER

GitHub: EnCrYpTeD05/XSS-HUNTER

一款整合 Subfinder、ParamSpider 和 Dalfox 的端到端自动化反射型 XSS 漏洞扫描器,专为漏洞赏金猎人设计,一条命令完成从子域名枚举到 POC 提取的完整流程。

Stars: 4 | Forks: 0

# 🎯 XSS Hunter v1.0 ### 专为漏洞赏金猎人设计的自动化反射型 XSS 扫描器 ![Python](https://img.shields.io/badge/Python-3.x-blue?style=for-the-badge&logo=python) ![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge) ![Platform](https://img.shields.io/badge/Platform-Linux-orange?style=for-the-badge&logo=linux) ![Bug Bounty](https://img.shields.io/badge/Bug%20Bounty-Authorized%20Testing-red?style=for-the-badge) ![Version](https://img.shields.io/badge/Version-1.0-purple?style=for-the-badge) **由 [EnCrYpTeD05](https://github.com/EnCrYpTeD05) 创建** *"Hack Smart. Hunt Hard."* 🎯
## 📌 概述 **XSS Hunter v1.0** 是一款全自动、端到端的**反射型 XSS 漏洞扫描器**,专为漏洞赏金猎人设计。它将行业标准的开源工具链接成一个无缝的 pipeline——从子域名枚举一直到确认的漏洞证明(POC)。 无需再手动串联各种工具。不再遗漏任何参数。只需一条命令。 ``` python3 xsshunter.py -d target.com ``` ## ⚙️ 工作流程 ``` Target Domain │ ▼ ┌─────────────────────────┐ │ 1. Subfinder │ → Subdomain Enumeration └──────────┬──────────────┘ │ ▼ ┌─────────────────────────┐ │ 2. Active Check │ → Filter Live Subdomains (20 Threads) └──────────┬──────────────┘ │ ▼ ┌─────────────────────────┐ │ 3. ParamSpider │ → Parameter Discovery (No Timeout) └──────────┬──────────────┘ │ ▼ ┌─────────────────────────┐ │ 4. Smart Filter │ → Single Params + Remove login/account URLs └──────────┬──────────────┘ │ ▼ ┌─────────────────────────┐ │ 5. Deduplication │ → Remove Duplicate URLs └──────────┬──────────────┘ │ ▼ ┌─────────────────────────┐ │ 6. FUZZ → 123 │ → Dalfox Compatibility Fix └──────────┬──────────────┘ │ ▼ ┌─────────────────────────┐ │ 7. Dalfox Scan │ → Reflected XSS + WAF Evasion └──────────┬──────────────┘ │ ▼ ┌─────────────────────────┐ │ 8. Extract POCs │ → vulnerableurl.txt 🎯 └─────────────────────────┘ ``` ## 🚀 功能 ### 核心功能 | 功能 | 描述 | |---|---| | 🔍 子域名枚举 | 使用 Subfinder 自动发现子域名 | | ✅ 存活子域名检测 | 使用 20 个并行线程仅过滤出存活的子域名 | | 🕷️ 参数发现 | 使用 ParamSpider 收集所有 URL 和参数——无超时,支持处理 10 万+ 参数 | | 🎯 智能 URL 过滤 | 自动移除登录/账户 URL,过滤单参数 URL | | 🔄 去重 | 扫描前移除重复的 URL | | 💉 反射型 XSS 扫描 | 使用带有 `--mining-dom=false` 参数的 Dalfox——仅专注于反射型 XSS | | 🛡️ WAF 绕过 | 内置 `--waf-evasion`——适用于受 WAF 保护的站点 | | 📋 清晰的输出 | 过滤 WAF 刷屏日志——屏幕上仅显示重要输出 | | 🎯 POC 提取 | 将确认存在漏洞的 URL 保存到单独的文件中 | ### 稳定性功能 | 功能 | 描述 | |---|---| | 🌐 网络自动恢复 | 断开连接时等待,重新连接后自动恢复 | | ⚡ 速率限制检测 | 检测到 429 时自动增加延迟 + 等待 30 秒 | | 📝 错误日志 | 所有错误均保存到带有时间戳的日志文件中 | | 🛑 优雅退出 | 即使按下 Ctrl+C 也会保存进度 | | 🔄 自动恢复 | 中断的扫描会从上次中断的地方继续 | ### 易用性功能 | 功能 | 描述 | |---|---| | 📊 实时进度条 | 每个步骤的实时状态显示 | | 🔢 ParamSpider 实时计数器 | 收集时显示实时参数数量 | | ⚙️ 默认 + 自定义模式 | 使用 Dalfox 默认设置或指定自定义 flag | | 💻 单一命令 | 一条命令完成整个工作流程 | ## 📋 环境要求 | 工具 | 类型 | |---|---| | Python 3 | Kali Linux 上预装 | | Subfinder | Go 工具 | | ParamSpider | Python package | | Dalfox | Go 工具 | ## 🛠️ 安装说明 ### 自动安装(推荐) 克隆此仓库并运行安装程序——它会自动安装所有内容: ``` git clone https://github.com/EnCrYpTeD05/XSS-HUNTER.git cd XSS-HUNTER chmod +x install.sh && ./install.sh ``` ### 手动安装 ``` # Python 依赖 pip install requests paramspider # Go 工具 go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest go install github.com/hahwul/dalfox/v2@latest ``` ## 📖 用法 ### 基本用法(推荐) ``` python3 xsshunter.py -d target.com ``` ### 自定义 Dalfox 设置 ``` python3 xsshunter.py -d target.com --dalfox-mode custom --workers 5 --delay 500 --timeout 30 ``` ### 所有选项 ``` -d, --domain Target domain (required) --threads Threads for active subdomain check (default: 20) --dalfox-mode 'default' or 'custom' (default: default) --workers Dalfox workers in custom mode (default: 5) --delay Dalfox delay in ms (default: 500) --timeout Dalfox timeout in seconds (default: 30) ``` ## 📂 输出文件 | 文件 | 描述 | |---|---| | `subdomains.txt` | 所有发现的子域名 | | `activesubdomains.txt` | 仅存活/活跃的子域名 | | `parameters.txt` | 所有发现的参数(已合并) | | `singleparam.txt` | 过滤后的单参数 URL | | `withoutfuzz.txt` | 已去重且准备好扫描的 URL | | `scan` | 完整的 Dalfox 扫描输出 | | `vulnerableurl.txt` | 已确认存在漏洞的 URL 🎯 | | `xss_hunter_errors_*.log` | 错误日志文件 | ## 🧹 新扫描前的清理 在扫描新的目标域名之前,请务必进行清理: ``` rm -rf results/ parameters.txt singleparam.txt withoutfuzz.txt subdomains.txt activesubdomains.txt scan vulnerableurl.txt scanned_urls.txt pending_urls.txt ``` ## 📸 示例输出 ``` [*] Starting scan [SID:4][4/64][6.25%] / URL: http://target.com/page.php?id=1 [*] Valid target [ code:200 / size:100 ] [W] Reflected Payload in HTML: id=> [POC][R][GET][inHTML-URL] http://target.com/page.php?id=1%3E%3Cscript%3Ealert%281%29%3C%2Fscript%3E [V] Triggered XSS Payload (found DOM Object): id="> [POC][V][GET][inHTML-URL] http://target.com/page.php?id=1%22%3E%3CIMG+SRC%3Dx... [*] [duration: 31m][issues: 5] Finish Scan! ``` ## ⚠️ 法律免责声明 此工具**严格仅用于授权的安全测试:** - ✅ 授权的漏洞赏金项目 - ✅ CTF 竞赛 - ✅ 明确授权的渗透测试服务 - ✅ 您自己的系统/应用程序 **在测试之前,请务必验证目标是否在范围内。始终遵守项目的规则和服务条款。** 作者**不对**因滥用此工具造成的任何误用或损害**负责**。未经授权对您无权测试的系统使用此工具是非法且不道德的。 ## 📄 许可证 该项目基于 **MIT License** 授权——详情请参阅 [LICENSE](LICENSE) 文件。 版权所有 (c) 2026 EnCrYpTeD05 ## 👤 作者 **EnCrYpTeD05** | GitHub: [@EnCrYpTeD05](https://github.com/EnCrYpTeD05) **🌐 网站:** https://encrypted05.github.io/ *"Hack Smart. Hunt Hard."* 🎯 ⭐ **如果此工具帮助您发现了 bug,请在仓库点个 star!**
标签:Python, Web安全, XSS检测, 主机安全, 无后门, 日志审计, 自动化扫描器, 蓝队分析