HariXploit/darkrecon
GitHub: HariXploit/darkrecon
DarkRecon 是一款 bug bounty 侦察自动化 pipeline,对给定域名自动完成子域名发现、存活探测、安全头审计、截图与报告生成的完整侦察流程。
Stars: 6 | Forks: 0
# DarkRecon 🔍
## 一个自动化 bug bounty 搜集全流程的 Python/Bash pipeline。
接收一个目标 domain 并自动运行完整的侦察生命周期 —— subdomain → 存活 host → security headers → 截图 → HTML 报告。
## 功能
| 阶段 | 作用 | 使用的工具 |
|---|---|---|
| Subdomain 枚举 | 通过被动 + 暴力破解查找所有 subdomain | subfinder, amass, 内置 DNS |
| Host 探测 | 检查哪些 subdomain 在 HTTP/HTTPS 上存活 | httpx, 内置 fallback |
| Header 审计 | 检查 7 个 security headers + cookie 标志 + 技术栈泄露 | 纯 Python |
| 截图 | 每个存活 host 的可视化快照 | gowitness |
| 报告 | 带有评级和发现的简洁 HTML + JSON 报告 | 内置 |
## 安装说明
```
git clone https://github.com/HariXploit/darkrecon
cd darkrecon
chmod +x install.sh && ./install.sh
```
或者手动安装:
```
pip3 install -r requirements.txt --break-system-packages
# 安装 Go 工具(可选但推荐)
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
go install github.com/sensepost/gowitness@latest
go install -v github.com/owasp-amass/amass/v4/...@master
```
## 使用方法
```
# 基本运行
python3 recon.py -d example.com
# 跳过截图(更快)
python3 recon.py -d example.com --skip-screenshots
# 自定义 output 目录和 threads
python3 recon.py -d example.com --output /tmp/recon --threads 20
# 跳过 amass(快得多,仅使用 subfinder + 内置功能)
python3 recon.py -d example.com --skip-amass
# 仅运行特定阶段
python3 recon.py -d example.com --only subdomains
python3 recon.py -d example.com --only headers
# 静默模式(无 banner/进度)
python3 recon.py -d example.com --silent
```
## 输出结构
## output/
└── example.com_20240101_120000/
├── report.html ← 主 HTML 报告(在浏览器中打开)
├── recon_results.json ← 完整的 JSON 数据
├── subdomains.txt ← 所有发现的 subdomain
├── live_hosts.txt ← 存活的 HTTP/HTTPS host
├── header_audit.json ← 详细的 header 发现
├── httpx_full.txt ← 完整的 httpx 输出
└── screenshots/ ← gowitness PNG 截图
## 检查的 Security Headers
| Header | 严重程度 | 防护内容 |
|---|---|---|
| Strict-Transport-Security | 高 | SSL stripping, MITM |
| Content-Security-Policy | 高 | XSS, 数据注入 |
| X-Frame-Options | 中 | Clickjacking |
| X-Content-Type-Options | 中 | MIME sniffing XSS |
| Referrer-Policy | 低 | 信息泄露 |
| Permissions-Policy | 低 | 功能滥用 |
| X-XSS-Protection | 信息 | 旧版 XSS 过滤器 |
此外还检查:
- 通过 `Server`, `X-Powered-By`, `X-AspNet-Version` 等造成的**技术栈泄露**
- **Cookie 标志问题** — 缺失 `HttpOnly`, `Secure`, `SameSite`
- **脆弱的 header 值** — CSP 中的 `unsafe-inline`,X-Frame-Options 中的 `ALLOW-FROM *`
## 法律声明
此工具仅供**授权的安全测试**使用。
仅对您拥有明确测试权限的目标使用。
Bug bounty 项目:在运行侦察之前,请务必阅读项目的范围。
## 作者
由 [HariXploit](https://github.com/HariXploit) 开发,用于 bug bounty 侦察自动化。
标签:Bash, GitHub, Python, 实时处理, 密码管理, 应用安全, 文件查看, 无后门, 网络调试, 自动化, 资产测绘, 运行时操纵, 逆向工具