ferasbusiness666/ReconForge
GitHub: ferasbusiness666/ReconForge
面向 Bug Bounty 猎人与安全研究人员的 AI 辅助侦察工具包,整合子域名发现、端口扫描、技术栈检测、范围验证与报告生成于一体。
Stars: 29 | Forks: 2
# ReconForge
```
____ _____ ____ ___ _ _ _____ ___ ____ ____ _____
| _ \| ____/ ___/ _ \| \ | | ___/ _ \| _ \ / ___| ____|
| |_) | _|| | | | | | \| | |_ | | | | |_) | | _| _|
| _ <| |__| |__| |_| | |\ | _|| |_| | _ <| |_| | |___
|_| \_\_____\____\___/|_| \_|_| \___/|_| \_\\____|_____|
```
[](#installation)
[](LICENSE)
[](#contributing)
[](https://github.com/ferasbusiness666/ReconForge)
[](https://github.com/ferasbusiness666/ReconForge/issues)
**面向 Bug Bounty 猎人和安全研究人员的 AI 辅助侦察工具包**
ReconForge 将实用的自动化侦察与 AI 分类(triage)提示词相结合,帮助授权测试者更快地从原始发现过渡到优先级假设。专为速度、可靠性和易用性而构建。
## ✨ 功能
- 🔎 **子域名发现** - 通过 crt.sh 从证书透明度数据中发现子域名
- ⚡ **并发端口扫描** - 使用 ThreadPoolExecutor 进行快速多端口扫描
- 🧬 **技术栈检测** - 从 headers、cookies 和 body 信号中识别技术栈
- 🧭 **范围检查** - 根据精确主机、通配符、IP 范围和 CIDR 块验证目标
- 📄 **Markdown 报告** - 包含发现结果、技术栈和收集说明的专业报告
- 🤖 **AI 分类提示词** - 用于分析 HTTP 响应、认证流程、API 等的结构化提示词
- 🎨 **丰富的终端输出** - 美观的表格、状态指示器和进度旋转图标
- 🚀 **生产就绪** - 全面的测试、CI/CD 和错误处理
## 🚀 快速开始
### 安装
```
# 从 PyPI 安装(推荐)
pip install reconforge
# 或从源码安装
git clone https://github.com/ferasbusiness666/ReconForge.git
cd ReconForge
pip install .
```
### 基本用法
```
# 发现子域名
reconforge subdomains -d example.com
# 扫描常用端口
reconforge portscan -t api.example.com
# 检测技术
reconforge techdetect -u https://api.example.com
# 检查范围
reconforge scopecheck -t targets.txt -s scope.txt
# 生成完整报告
reconforge report -d example.com --output report.md
```
## 📖 详细用法
### 子域名发现
使用证书透明度日志发现子域名:
```
reconforge subdomains -d example.com
```
**输出:**
```
Subdomains for example.com
┏━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ # ┃ Subdomain ┃
┡━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ 1 │ api.example.com │
│ 2 │ login.example.com │
│ 3 │ www.example.com │
└────┴───────────────────┘
Total: 3
```
### 端口扫描
使用并发扫描以实现快速扫描常用端口:
```
# 默认:扫描常用端口 (80, 443, 8080, 8443, 22, 21, 3306, 6379)
reconforge portscan -t api.example.com
# 自定义端口
reconforge portscan -t api.example.com --ports 80,443,3000,5000
```
**输出:**
```
Port scan for api.example.com
┏━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Port ┃ Status ┃ Banner / Note ┃
┡━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 80 │ 🟢 open │ HTTP/1.1 301 Moved Permanently │
│ 443 │ 🟢 open │ No banner │
│ 8080 │ 🔴 closed │ Connection refused │
└──────┴───────────┴─────────────────────────────────┘
```
### 技术栈检测
从 HTTP headers 和响应 body 中指纹识别 Web 技术:
```
reconforge techdetect -u https://api.example.com
```
**输出:**
```
Final URL: https://api.example.com/
HTTP status: 200
Detected Technologies
┏━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Technology ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ nginx │
│ HSTS │
│ Content Security Policy │
└─────────────────────────┘
```
### 范围检查
根据您的 Bug Bounty 范围验证目标:
```
reconforge scopecheck -t targets.txt -s scope.txt
```
**scope.txt:**
```
example.com
*.example.com
192.0.2.0/24
```
**targets.txt:**
```
api.example.com
login.example.com
thirdparty.net
192.0.2.50
```
**输出:**
```
In-Scope Targets
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Target ┃ Reason ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ api.example.com │ matched wildcard *.example.com │
│ 192.0.2.50 │ matched CIDR 192.0.2.0/24 │
└───────────────────┴────────────────────────────┘
Out-of-Scope Targets
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Target ┃ Reason ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━┩
│ thirdparty.net │ no scope rule matched │
└────────────────────┴───────────────────────┘
```
### 生成报告
创建一个汇总所有发现的全面 Markdown 报告:
```
reconforge report -d example.com --output report.md
```
有关示例报告,请参见 [`examples/example_report.md`](examples/example_report.md)。
## 🤖 AI 分类提示词
ReconForge 在 [`prompts/ai_triage.md`](prompts/ai_triage.md) 中包含了一系列 AI 辅助分类提示词,用于分析:
- HTTP 响应和 headers
- 认证和会话流程
- 敏感和类似管理后台的端点
- JavaScript 路由和功能开关
- API 授权模式
- 参数异常
- 发现结果优先级排序
**重要提示:** 在将任何内容粘贴到 AI 系统之前,请务必删除 secrets、tokens 和专有数据。
## 🛠 开发
### 配置开发环境
```
git clone https://github.com/ferasbusiness666/ReconForge.git
cd ReconForge
python -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
pip install -e .
```
### 运行测试
```
# 所有测试
pytest
# 带有 coverage
pytest --cov=reconforge
# 特定测试文件
pytest tests/test_subdomains.py -v
```
### 代码质量
```
# 格式化代码
black reconforge tests
# Lint
flake8 reconforge tests
# 类型检查
mypy reconforge
# 排序 imports
isort reconforge tests
```
## 📋 项目结构
```
reconforge/
__init__.py # Package metadata
cli.py # CLI commands
subdomains.py # Subdomain discovery
portscan.py # Port scanning with concurrency
techdetect.py # Technology detection
scopecheck.py # Scope validation
report.py # Report generation
prompts/
ai_triage.md # AI triage prompt library
tests/
test_*.py # Unit tests
examples/
example_report.md # Sample generated report
.github/workflows/
ci.yml # GitHub Actions CI/CD
requirements.txt # Runtime dependencies
requirements-dev.txt # Development dependencies
setup.py # Package configuration
```
## 🎯 为什么选择 ReconForge?
### 避免超出范围(Out-of-Scope)的错误
Bug Bounty 范围可能包含精确主机、通配符子域名和 IP 范围,同时排除第三方系统。ReconForge 的范围检查器能够在测试前将范围外目标区分开。
### 减少手动侦察时间
手动侦察意味着要在 CT 日志、socket 检查、浏览器标签页和笔记之间来回切换。ReconForge 为常见的首轮任务提供了一个易于复制输出且可审计的工作流。
### 将 AI 引入侦察
ReconForge 包含与模型无关的 AI 分类提示词,可帮助分析发现结果,同时将最终验证权交由您掌握。
## 🔒 安全与道德规范
ReconForge **仅适用于您拥有或已获得明确测试许可的系统**。您需要负责:
- 遵守项目范围和交战规则
- 遵守所有适用法律和法规
- 尊重速率限制和服务条款
- 仅对已授权的目标进行操作
## 📝 许可证
MIT 许可证 - 详情请参见 [`LICENSE`](LICENSE)。
## 📚 资源
- [Bug Bounty 平台](https://www.bugcrowd.com) - 寻找授权项目
- [OWASP 测试指南](https://owasp.org/www-project-web-security-testing-guide/) - 测试方法论
- [PortSwigger Web 安全](https://portswigger.net/web-security) - 安全培训
## 🙏 致谢
怀着 ❤️ 为安全研究社区而构建。
**有疑问?** 提交一个 [issue](https://github.com/ferasbusiness666/ReconForge/issues) 或查看 [讨论区](https://github.com/ferasbusiness666/ReconForge/discussions)。
标签:C2日志可视化, Python, 动态插桩, 子域名收集, 安全规则引擎, 实时处理, 密码管理, 指纹识别, 数据统计, 无后门, 端口扫描, 逆向工具