pratikkhairnar160/ReconSuite
GitHub: pratikkhairnar160/ReconSuite
自动化 reconnaissance 工具,通过多阶段流水线完成子域名枚举、存活检测、内容抓取和漏洞信号识别,输出可用于漏洞赏金和渗透测试的结构化报告。
Stars: 0 | Forks: 0
# ReconSuite
**专业的攻击面映射框架,适用于授权的漏洞赏金和安全测试项目。**
## 架构
```
reconsuite.py CLI entry point
core/
config.py Config dataclass — all settings in one place
pipeline.py Stage orchestrator — chains all 5 stages
state.py Session persistence / checkpoint/resume
http_client.py Async HTTP with rate limiting, proxy, UA rotation
logger.py Colored, leveled logging
modules/
discovery/
passive_dns.py HackerTarget, RapidDNS, AlienVault OTX
crt_sh.py Certificate transparency logs
dns_brute.py Async DNS brute-force with wildcard filtering
asn_lookup.py ASN → IP range expansion (BGPView)
validation/
http_prober.py HTTP/S probing: status, title, tech, tags
enrichment/
crawler.py In-scope link/JS/form crawling
js_analyzer.py Static JS analysis: secrets, endpoints
wayback.py Wayback + CommonCrawl historical URLs
param_miner.py Parameter extraction and mapping
vuln_signals/ Detection only — no exploitation
cors.py CORS misconfiguration signals
headers.py Missing/weak security headers
takeover.py Subdomain takeover fingerprints
exposure.py Sensitive path/file exposure
redirect.py Open redirect parameter signals
intelligence/
prioritiser.py Asset ranking + finding severity sort
deduplicator.py Near-duplicate finding removal
output/
json_reporter.py Structured JSON output
html_reporter.py Self-contained HTML dashboard
```
### 流水线流程
```
Targets → [Discovery] → [Validation] → [Enrichment] → [VulnSignals] → [Intelligence] → Report
↓ ↓ ↓ ↓ ↓
Subdomains Live Assets JS/Params/URLs Findings Ranked Output
```
每个阶段从共享的 `StateManager`(磁盘上的 JSON)读取和写入,支持:
- 大范围目标的检查点/恢复
- 阶段级跳过
- 跨阶段数据访问
## 安装
```
git clone https://github.com/pratikkhairnar160/ReconSuite.git
cd ReconSuite
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
**可选工具**(如果在 PATH 中可用,会作为子进程调用):
- `subfinder` — 额外的被动子域名枚举
- `httpx` — 更快的实时探测替代方案
- `nuclei` — 基于模板的漏洞扫描
## 用法
### 快速扫描(被动发现 + 验证)
```
python3 reconsuite.py -d example.com
```
### 完整扫描(所有阶段、主动探测、JS 分析)
```
python3 reconsuite.py -d example.com --full --active-scan --output both
```
### 仅被动(OSINT,无主动探测)
```
python3 reconsuite.py -d example.com --passive-only --output json
```
### 范围文件(多目标)
```
python3 reconsuite.py --scope-file targets.txt --threads 100 --rate-limit 200
```
### 恢复中断的扫描
```
python3 reconsuite.py -d example.com --resume abc123def456
```
### 使用代理(Burp Suite / SOCKS)
```
python3 reconsuite.py -d example.com --proxy http://127.0.0.1:8080 --rotate-ua
```
### 控制运行哪些阶段
```
# 仅发现和验证
python3 reconsuite.py -d example.com --only-stages discovery validation
# 跳过 JS-heavy 枚举
python3 reconsuite.py -d example.com --skip-stages enrichment
```
## CLI 参考
| 标志 | 默认值 | 描述 |
|------|---------|-------------|
| `-d` / `--domain` | — | 单个目标域名 |
| `--scope-file` | — | 每行一个域名的文件 |
| `--passive-only` | 关闭 | 无主动探测 |
| `--active-scan` | 关闭 | 启用主动信号检查 |
| `--full` | 关闭 | 所有阶段 + JS 分析 |
| `--threads` | 50 | 并发限制 |
| `--rate-limit` | 100 | 最大请求数/秒 |
| `--timeout` | 10 | 请求超时(秒) |
| `--retries` | 2 | 重试次数 |
| `--proxy` | — | HTTP/SOCKS 代理 URL |
| `--rotate-ua` | 关闭 | 每个请求轮换 User-Agent |
| `--delay` | 0 | 每个请求的延迟(秒) |
| `--output` | both | `json` / `html` / `both` |
| `--output-dir` | ./reports | 报告输出目录 |
| `--resume` | — | 要恢复的会话 ID |
| `--skip-stages` | — | 要跳过的阶段 |
| `--only-stages` | — | 仅运行的阶段 |
| `-v` | 关闭 | 详细日志 |
| `-q` | 关闭 | 安静模式(仅警告) |
## 输出
报告默认写入 `./reports/`:
- `reconsuite__.json` — 完整结构化数据
- `reconsuite__.html` — 独立仪表板
JSON 输出包含:
```
{
"meta": { "session_id": "...", "targets": [...], "elapsed_seconds": 42 },
"summary": { "subdomains_found": 80, "live_assets": 35, ... },
"ranked_assets": [ { "url": "...", "priority_score": 9, "tech": [...] } ],
"findings": [ { "type": "cors", "severity": "high", "confidence": "high", ... } ],
"parameters": [ { "domain": "...", "parameters": { "redirect": [...] } } ],
"historical_urls": [...]
}
```
## 漏洞信号引擎
所有检查仅**限于检测和指纹识别** — 不发送任何 Payload,不进行利用。
| 检查 | 检测内容 |
|-------|-----------------|
| CORS | 通配符/反射源、null 源接受 |
| Headers | 缺失 CSP、HSTS、X-Frame-Options、信息泄露 |
| Takeover | 悬空 CNAME、服务指纹(GitHub、S3、Heroku…)|
| Exposure | .git、.env、phpinfo、actuator、调试端点 |
| Open Redirect | 重定向参数反射 |
| JS Secrets | 客户端 JS 中的 API 密钥、令牌、AWS 凭据 |
## 扩展 ReconSuite
### 添加发现源
在 `modules/discovery/my_source.py` 中创建:
```
class MySource:
def __init__(self, domain: str, config: Config): ...
async def enumerate(self) -> List[Dict]: ...
# Return: [{"hostname": "sub.example.com", "domain": "example.com", "source": "my_source"}]
```
然后在 `core/pipeline.py` 的 `_stage_discovery()` 中导入并调用它。
### 添加漏洞信号检查器
在 `modules/vuln_signals/my_check.py` 中创建:
```
class MyChecker:
async def check_all(self, assets: List[Dict]) -> List[Dict]: ...
# Return: [{"type": "...", "severity": "...", "confidence": "...", "url": "...", ...}]
```
将其添加到 `_stage_signals()` 的检查器列表中。
## 法律声明
此工具仅用于:
- 授权的渗透测试
- 漏洞赏金计划中定义范围内的目标
- 对您拥有或已获得测试权限的系统进行安全研究
未经授权的使用是非法的且不道德的。作者对滥用不承担任何责任。
标签:ASN查询, BugBounty, CEH认证, CORS配置, DNS枚举, GitHub, HTTP探测, JS分析, TShark, Wayback, Web安全, 侦察工具, 参数挖掘, 反取证, 大数据, 子域名接管, 子域名枚举, 安全头部, 安全报告, 安全评估, 实时处理, 密码管理, 开放重定向, 异步编程, 攻击面映射, 数据统计, 爬虫框架, 目录扫描, 端口扫描, 系统安全, 网络安全, 网络安全审计, 网络安全工具, 蓝队分析, 计算机取证, 证书透明, 运行时操纵, 逆向工具, 防御绕过, 隐私保护