khaledxbenali92/SubHunterX
GitHub: khaledxbenali92/SubHunterX
一款集成47+数据源的子域名侦察工具,支持被动枚举、DNS暴力破解、存活探测、截图、接管检测和云端资产发现,一站式完成攻击面梳理。
Stars: 1 | Forks: 0
```
____ _ _ _ _ __ __
/ ___| _ _| |__ | | | |_ _ _ __ | |_ ___ _ _\ \/ /
\___ \| | | | '_ \| |_| | | | | '_ \| __/ _ \ '__\ /
___) | |_| | |_) | _ | |_| | | | | || __/ | / \
|____/ \__,_|_.__/|_| |_|\__,_|_| |_|\__\___|_| /_/\_\
```
# 🔍 SubHunterX
### 终极子域名枚举与侦察工具
[](https://python.org)
[](LICENSE)
[](https://github.com/khaledxbenali92/SubHunterX/releases)
[](https://github.com/khaledxbenali92/SubHunterX)
[](https://github.com/khaledxbenali92/SubHunterX/stargazers)
**市面上最强大的子域名枚举工具。**
聚合 47+ 个来源、DNS 暴力破解、存活探测、截图、接管检测、云端资产发现以及丰富的 HTML 报告 —— 尽在这一工具之中。
[功能特性](#-features) · [安装](#-installation) · [用法](#-usage) · [来源](#-sources-47) · [配置](#-configuration) · [路线图](#-roadmap)
## ✨ 功能特性
### 🎯 核心引擎
| 功能 | 描述 |
|---|---|
| **47+ 被动来源** | crt.sh, Shodan, VirusTotal, AlienVault, Censys, SecurityTrails, BinaryEdge 等 |
| **DNS 暴力破解** | 具有可自定义字典的多线程 DNS 解析(200+ 线程) |
| **递归枚举** | 自动枚举子域名的子域名 |
| **通配符检测** | 检测并过滤通配符 DNS 以消除误报 |
| **去重** | 跨所有来源自动去重 |
### 🌐 HTTP 探测
| 功能 | 描述 |
|---|---|
| **存活/失效分离** | 将存活与失效的子域名分开,并附带详细状态 |
| **HTTP 状态码** | 完整的状态码 — 200, 301, 302, 403, 404, 500... |
| **失效详情文件** | 每个无法访问的子域名的详细错误信息 |
| **标题提取** | 从每个存活页面提取 `
` |
| **服务器检测** | 识别 Web 服务器技术 (nginx, Apache, IIS...) |
### 🔐 安全分析
| 功能 | 描述 |
|---|---|
| **接管检测** | 识别子域名接管漏洞(20+ 提供商) |
| **WAF 检测** | 检测 Cloudflare, AWS WAF, Akamai, Sucuri, Imperva, F5 |
| **云端资产检测** | 识别 AWS S3, Azure Blob, GCP, Netlify, Vercel, Heroku... |
| **CNAME 链分析** | 分析 CNAME 链以查找悬空记录 |
| **历史 DNS** | 通过 SecurityTrails 获取历史 DNS 记录 |
### 📊 输出与报告
| 功能 | 描述 |
|---|---|
| **HTML 报告** | 精美的深色主题报告,包含图表、截图和完整统计 |
| **JSON 导出** | 用于 pipeline 集成的机器可读 JSON |
| **CSV 导出** | 兼容电子表格的 CSV,包含存活和失效结果 |
| **截图** | 每个存活子域名的整页截图 |
| **有序输出** | 按域名划分的时间戳文件夹 |
### ⚙️ 运维功能
| 功能 | 描述 |
|---|---|
| **恢复/检查点** | 保存进度并恢复中断的扫描 |
| **代理支持** | 完整的 HTTP/SOCKS5 代理支持 |
| **TOR 路由** | 通过 TOR 进行匿名扫描 |
| **速率限制** | 可配置的请求速率以避免封禁 |
| **Slack / Discord** | 扫描完成时的实时通知 |
| **配置文件** | 用于 API 密钥和偏好的 YAML 配置 |
| **富文本 CLI** | 彩色进度条、微调器和结果表格 |
## 📦 安装
### 系统要求
- Python 3.8+
- Chrome 或 Chromium (用于截图)
- TOR (可选,用于匿名扫描)
### 快速安装
```
# 克隆仓库
git clone https://github.com/khaledxbenali92/SubHunterX.git
cd SubHunterX
# 运行安装程序
chmod +x install.sh
./install.sh
```
### 手动安装
```
git clone https://github.com/khaledxbenali92/SubHunterX.git
cd SubHunterX
pip3 install -r requirements.txt
```
### 安装 Chrome (用于截图)
```
# Debian / Ubuntu / Kali
sudo apt update && sudo apt install -y chromium-browser
# Fedora / RHEL
sudo dnf install chromium
# macOS
brew install --cask google-chrome
# Arch Linux
sudo pacman -S chromium
```
### 安装 TOR (可选)
```
# Debian / Ubuntu / Kali
sudo apt install tor && sudo service tor start
# macOS
brew install tor && brew services start tor
```
## 🚀 用法
### 基本用法
```
# 单个域名
python3 subhunterx.py -d example.com
# 从文件批量扫描域名
python3 subhunterx.py -l domains.txt
```
### 高级用法
```
# 递归枚举(子域名的子域名)
python3 subhunterx.py -d example.com --recursive
# 使用自定义字典进行暴力破解
python3 subhunterx.py -d example.com --wordlist /path/to/wordlist.txt
# 通过 TOR 路由(匿名)
python3 subhunterx.py -d example.com --tor
# 使用代理(Burp Suite, ZAP 等)
python3 subhunterx.py -d example.com --proxy http://127.0.0.1:8080
# 禁用截图(更快)
python3 subhunterx.py -d example.com --no-screenshot
# 禁用暴力破解(仅被动)
python3 subhunterx.py -d example.com --no-brute
# 自定义线程数和超时
python3 subhunterx.py -d example.com --threads 200 --timeout 15
# 自定义配置文件
python3 subhunterx.py -d example.com -c /path/to/config.yaml
```
### 所有选项
```
usage: subhunterx.py [-h] [-d DOMAIN] [-l LIST] [-c CONFIG]
[--recursive] [--proxy PROXY] [--tor]
[--no-screenshot] [--no-brute]
[--wordlist WORDLIST] [--threads THREADS]
[--timeout TIMEOUT] [-v]
options:
-h, --help Show this help message and exit
-d, --domain Single target domain
-l, --list File containing list of domains (one per line)
-c, --config Config file path (default: config/config.yaml)
--recursive Enable recursive subdomain enumeration
--proxy Proxy URL (e.g. http://127.0.0.1:8080)
--tor Route all traffic through TOR
--no-screenshot Disable live subdomain screenshots
--no-brute Disable DNS brute force
--wordlist Custom wordlist path for brute force
--threads Thread count for DNS resolution (default: 100)
--timeout HTTP request timeout in seconds (default: 10)
-v, --version Show version and exit
```
## 📁 输出结构
```
output/
└── example.com_20260101_120000/
├── all-subdomains.txt ← All unique subdomains found
├── live-subdomains.txt ← Only live/reachable subdomains
├── dead-subdomains.txt ← Only dead/unreachable subdomains
├── dead-subdomains-details.txt ← Dead subdomains with error details
├── live-subdomains.csv ← Live results in CSV format
├── dead-subdomains.csv ← Dead results in CSV format
├── results.json ← Full results in JSON format
├── report.html ← Beautiful HTML report
└── live-subdomains-screenshots/
├── www.example.com.png
├── api.example.com.png
└── ...
```
## 📡 来源 (47+)
### 证书透明度
| 来源 | 类型 | API Key |
|---|---|---|
| crt.sh | 证书透明度 | 免费 |
| Certspotter | 证书透明度 | 免费 |
### 威胁情报 & OSINT
| 来源 | 类型 | API Key |
|---|---|---|
| Shodan | 互联网扫描器 | 必需 |
| Censys | 互联网扫描器 | 必需 |
| VirusTotal | 威胁情报 | 必需 |
| AlienVault OTX | 威胁情报 | 免费 |
| SecurityTrails | DNS 历史 | 必需 |
| BinaryEdge | 威胁情报 | 必需 |
| ThreatCrowd | 威胁情报 | 免费 |
| ThreatMiner | 威胁情报 | 免费 |
| FullHunt | 资产发现 | 必需 |
| LeakIX | 威胁情报 | 免费 |
| GreyNoise | 互联网噪声 | 免费 |
### 互联网扫描器
| 来源 | 类型 | API Key |
|---|---|---|
| ZoomEye | 互联网扫描器 | 必需 |
| FOFA | 互联网扫描器 | 必需 |
### DNS & 被动 DNS
| 来源 | 类型 | API Key |
|---|---|---|
| HackerTarget | DNS 查询 | 免费 |
| DNSDumpster | DNS 侦察 | 免费 |
| BufferOver | DNS 数据集 | 免费 |
| Robtex | DNS 图谱 | 免费 |
| CIRCL PassiveDNS | 被动 DNS | 免费 |
| RapidDNS | 被动 DNS | 免费 |
| Anubis DB | DNS 数据集 | 免费 |
| Columbus | DNS 数据集 | 免费 |
| PassiveTotal | 被动 DNS | 免费 |
| Riddler.io | DNS 数据集 | 免费 |
| DNSrepo | DNS 数据集 | 免费 |
### 公共 API & 数据库
| 来源 | 类型 | API Key |
|---|---|---|
| C99.nl | 子域名 API | 必需 |
| WhoisXMLAPI | WHOIS 数据 | 必需 |
| Chaos (ProjectDiscovery) | 漏洞赏金 DB | 必需 |
| Subdomain.center | 子域名 API | 免费 |
| Omnisint / Ceres | DNS 数据集 | 免费 |
| Recon.dev | 侦察 API | 免费 |
| ShrewdEye | 侦察 API | 免费 |
| Synapsint | OSINT | 免费 |
| Phonebook.cz | OSINT | 免费 |
| ViewDNS | DNS 工具 | 免费 |
| Netcraft | 站点报告 | 免费 |
### Web 档案 & 爬取
| 来源 | 类型 | API Key |
|---|---|---|
| Wayback Machine | Web 档案 | 免费 |
| CommonCrawl | Web 爬取 | 免费 |
| URLScan.io | URL 扫描器 | 免费 |
| WebArchive CDX | Web 档案 | 免费 |
| PublicWWW | 源码搜索 | 免费 |
### 代码搜索
| 来源 | 类型 | API Key |
|---|---|---|
| GitHub | 代码搜索 | 必需 |
### 搜索引擎 Dork
| 来源 | 类型 | API Key |
|---|---|---|
| Google | Dork | 免费 |
| Bing | Dork | 免费 |
| Baidu | Dork | 免费 |
### DNS 暴力破解
| 来源 | 类型 |
|---|---|
| 自定义字典 | DNS 暴力破解 |
| 排列引擎 | DNS 变异 |
## ⚙️ 配置
编辑 `config/config.yaml` 以设置您的 API 密钥和偏好:
```
api_keys:
shodan: "YOUR_SHODAN_KEY"
censys_id: "YOUR_CENSYS_ID"
censys_secret: "YOUR_CENSYS_SECRET"
securitytrails: "YOUR_ST_KEY"
virustotal: "YOUR_VT_KEY"
binaryedge: "YOUR_BE_KEY"
c99: "YOUR_C99_KEY"
github: "YOUR_GITHUB_TOKEN"
fofa_email: "your@email.com"
fofa_key: "YOUR_FOFA_KEY"
zoomeye: "YOUR_ZOOMEYE_KEY"
chaos: "YOUR_CHAOS_KEY"
fullhunt: "YOUR_FULLHUNT_KEY"
whoisxml: "YOUR_WHOISXML_KEY"
settings:
threads: 100
timeout: 10
brute_force: true
recursive: false
screenshot: true
use_tor: false
proxy: ""
notifications:
slack_webhook: "https://hooks.slack.com/..."
discord_webhook: "https://discord.com/api/webhooks/..."
```
### 免费 API Keys (快速入门)
| 服务 | URL |
|---|---|
| VirusTotal | https://virustotal.com/gui/join-us |
| Shodan | https://account.shodan.io/register |
| SecurityTrails | https://securitytrails.com/app/signup |
| Censys | https://accounts.censys.io/register |
| BinaryEdge | https://app.binaryedge.io/sign-up |
| GitHub Token | https://github.com/settings/tokens |
| Chaos | https://chaos.projectdiscovery.io |
| FullHunt | https://fullhunt.io/register |
## 🗺️ 路线图
### v1.0.0 — 当前版本 ✅
- [x] 47+ 被动枚举来源
- [x] 多线程 DNS 暴力破解
- [x] 通配符 DNS 检测
- [x] HTTP 探测与存活/失效分离
- [x] 存活子域名的完整截图
- [x] 子域名接管检测 (20+ 提供商)
- [x] WAF 检测
- [x] 云端资产发现 (AWS, Azure, GCP, Netlify...)
- [x] CNAME 链分析
- [x] HTML/JSON/CSV 报告
- [x] 恢复/检查点系统
- [x] 代理 & TOR 支持
- [x] Slack / Discord 通知
- [x] YAML 配置文件
- [x] 递归枚举
### v1.1.0 — 计划中 🔄
- [ ] 端口扫描集成(每个存活子域名 top 1000 端口)
- [ ] 技术指纹识别(Wappalyzer 风格)
- [ ] 在存活子域名上自动运行 Nuclei 模板
- [ ] Diff 模式(对比新扫描与旧扫描)
- [ ] 每个子域名的 ASN & 地理位置映射
- [ ] 用于查看结果的 Web 仪表板
### v1.2.0 — 未来 🔮
- [ ] 用于集成的 GraphQL API
- [ ] Docker 容器
- [ ] Kubernetes 部署
- [ ] CI/CD 流水线集成
- [ ] 机器学习误报过滤
- [ ] 自动生成的漏洞报告模板
- [ ] 与 Burp Suite 扩展集成
## 📋 系统要求
| 工具 | 必要性 | 用途 |
|---|---|---|
| Python 3.8+ | ✅ 必需 | 核心运行时 |
| pip packages | ✅ 必需 | 见 requirements.txt |
| Chrome/Chromium | ⚠️ 可选 | 截图 |
| TOR | ⚠️ 可选 | 匿名扫描 |
| Go + httprobe | ⚠️ 可选 | 替代 HTTP 探测器 |
## ⚠️ 法律免责声明
## 📄 许可证
本项目采用 **MIT License** 授权 —— 详情请见 [LICENSE](LICENSE) 文件。
**由 [Khaled Ben Ali](https://github.com/khaledxbenali92) 用 ❤️ 制作**
[](https://github.com/khaledxbenali92)
*如果 SubHunterX 对您的漏洞赏金 (Bug Bounty) 狩猎有所帮助,请考虑给它一个 ⭐*
标签:DNS爆破, ESC4, GitHub, HTML报告, OSINT, Python, WAF识别, 云资产识别, 侦察工具, 域名枚举, 子域名挖掘, 子域名接管, 密码管理, 无后门, 网络安全, 逆向工具, 隐私保护