TheW4rF4ther/blackbox-recon
GitHub: TheW4rF4ther/blackbox-recon
面向渗透测试人员的 AI 增强侦察框架,将传统信息收集与大模型分析结合,自动生成攻击路径映射和风险优先级排序。
Stars: 0 | Forks: 0

本平台正在建设中!请随时自由拉取并随意使用它。我将在接下来的 2 周内进行大量更新。如果它被证明是有用的,我们将继续开发。
**面向渗透测试人员的 AI 增强侦察**
[](https://github.com/TheW4rF4ther/blackbox-recon/releases)
[](https://www.python.org/)
[](LICENSE)
*作者:[Blackbox Intelligence Group LLC](https://blackboxintelgroup.com)*
## 🎯 什么是 Blackbox Recon?
**Blackbox Recon** 将原始侦察数据转化为 **可操作的情报**。与那些用海量数据淹没您的传统侦察工具不同,Blackbox Recon:
- 🤖 **AI 驱动的分析** - 关联发现结果并建议攻击路径
- 🎯 **智能优先级排序** - 根据可利用性对漏洞进行排名
- 🔗 **攻击链映射** - 展示漏洞之间的相互联系
- ⚡ **可插拔 AI** - 兼容 OpenAI、Claude 或您的本地 LLM
- 🎨 **精美的输出** - 带有进度指示器的富终端 UI
## 🚀 快速开始 (60 秒)
### 安装
```
# 克隆 repository
git clone https://github.com/TheW4rF4ther/blackbox-recon.git
cd blackbox-recon
# 安装
pip install -e .
# 验证安装
blackbox-recon --help
```
### 您的第一次扫描
```
# Basic reconnaissance
blackbox-recon --target example.com
# 使用本地 LLM 进行 AI 分析
blackbox-recon --target example.com --ai-mode local
```
## 📖 详细使用指南
### 1. 基础侦察
从一次简单的侦察扫描开始:
```
blackbox-recon --target corp.example.com
```
**将会发生什么:**
1. 发现子域名 (www, mail, dev, api 等)
2. 识别活动的 Web 服务
3. 检测技术栈 (Apache, Nginx, WordPress 等)
4. 生成结构化的 JSON 报告
**示例输出:**
```
[+] Starting reconnaissance on corp.example.com
==================================================
[+] Found 47 subdomains
[+] Discovered 12 live web services
[+] Identified 3 technologies: Apache, PHP, WordPress
[+] Completed in 45 seconds
Results saved to: corp.example.com-recon-20250113.json
```
### 2. 启用所有模块的全面侦察
启用全面扫描:
```
blackbox-recon --target corp.example.com --full
```
**包含的模块:**
- ✅ **子域名枚举** - DNS 暴力破解 + 发现
- ✅ **端口扫描** - TCP 端口扫描 (Top 1000 端口)
- ✅ **技术栈检测** - Web 指纹识别
- ✅ **漏洞扫描** - Nuclei 集成 (即将推出)
### 3. AI 增强分析
这是 Blackbox Recon 的亮点所在。AI 会分析您的侦察数据并提供 **可操作的情报**。
#### 使用 OpenAI GPT-4
```
# 设置你的 API key
export OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxx"
# 运行 AI 分析
blackbox-recon --target corp.example.com --ai-mode openai --full
```
#### 使用 Claude
```
export ANTHROPIC_API_KEY="sk-ant-xxxxxxxxxxxxxxxx"
blackbox-recon --target corp.example.com --ai-mode claude --full
```
#### 使用 LM Studio (本地 AI) ⭐ 推荐
```
# 1. 使用你的 model 启动 LM Studio(例如,Qwen, Llama 等)
# 2. 在 LM Studio 设置中启用 API server(通常为端口 1234)
# 使用本地 AI 运行 - 无 API 成本,完全隐私
blackbox-recon --target corp.example.com --ai-mode local --local-url http://localhost:1234/v1
```
#### 使用 Ollama
```
# 启动 Ollama
ollama serve
# 使用 Ollama 运行
blackbox-recon --target corp.example.com --ai-mode ollama --ollama-model llama3.1
```
## 🎓 工作原理
### 侦察流水线
```
┌─────────────────────────────────────────────────────────────┐
│ RECONNAISSANCE PHASE │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Subdomain │───▶│ Port Scan │───▶│ Technology │ │
│ │ Enumeration │ │ (Nmap) │ │ Detection │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ RAW RECON DATA │ │
│ │ • 47 subdomains found │ │
│ │ • 12 open ports (80, 443, 8080, 3306...) │ │
│ │ • Technologies: Apache, PHP, WordPress │ │
│ └──────────────────────────────────────────────────────┘ │
│ │ │
└──────────────────────────┼──────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ AI ANALYSIS PHASE │
├─────────────────────────────────────────────────────────────┤
│ │
│ 🤖 AI analyzes the data and produces: │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ EXECUTIVE SUMMARY │ │
│ │ Attack surface identified with 3 critical │ │
│ │ vulnerabilities requiring immediate attention. │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ PRIORITIZED FINDINGS │ │
│ │ 🔴 HIGH: Jenkins exposed (CVE-2024-23897) │ │
│ │ 🔴 HIGH: SMB signing disabled │ │
│ │ 🟡 MEDIUM: WordPress outdated │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ ATTACK PATHS │ │
│ │ Path 1: Jenkins → RCE → Internal Access │ │
│ │ Path 2: SMB Relay → Domain Compromise │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
```
### AI 会分析什么
AI 会接收所有侦察数据并进行分析:
1. **技术栈风险**
- 过时的软件版本
- 危险的配置
- 已知的 CVE 关联
2. **攻击面关联**
- “开发服务器上的 Jenkins + 弱身份验证 = 入口点”
- “SMB 签名被禁用 + NTLM = 可能发生中继攻击”
3. **漏洞利用链**
- 入口点 → 横向移动 → 权限提升
- 基于发现结果的真实攻击路径
4. **风险优先级排序**
- 高:可以直接利用
- 中:需要链接利用或特定条件
- 低:仅作信息参考,难以利用
## 📊 示例输出
### 无 AI (标准侦察)
```
{
"target": "corp.example.com",
"subdomains": [
{"subdomain": "www.corp.example.com", "ip": "203.0.113.10"},
{"subdomain": "dev.corp.example.com", "ip": "203.0.113.20"},
{"subdomain": "jenkins.corp.example.com", "ip": "203.0.113.21"}
],
"ports": [
{"port": 80, "service": "http"},
{"port": 443, "service": "https"},
{"port": 8080, "service": "http-proxy"}
],
"technologies": [
{"name": "Apache", "version": "2.4.41"},
{"name": "Jenkins", "version": "2.426.1"},
{"name": "WordPress", "version": "6.2.2"}
]
}
```
### 有 AI 分析
```
┌─────────────────────────────────────────────────────────────┐
│ AI ANALYSIS RESULTS │
├─────────────────────────────────────────────────────────────┤
│ │
│ EXECUTIVE SUMMARY │
│ The target exhibits a significant attack surface with │
│ multiple entry points. The exposed Jenkins instance on │
│ the development server represents the highest risk. │
│ │
│ PRIORITIZED FINDINGS │
│ 🔴 HIGH jenkins.corp.example.com:8080 │
│ Jenkins 2.426.1 vulnerable to CVE-2024-23897 │
│ (Arbitrary file read → RCE) │
│ Remediation: Upgrade to 2.426.2+ │
│ │
│ 🔴 HIGH SMB (Port 445) on 203.0.113.20 │
│ SMB signing disabled │
│ NTLM relay attacks possible │
│ Remediation: Enable SMB signing │
│ │
│ 🟡 MEDIUM WordPress 6.2.2 on blog.corp.example.com │
│ 3 security updates behind │
│ Remediation: Update to 6.4.3 │
│ │
│ ATTACK PATH 1: Quick Domain Compromise │
│ 1. Exploit Jenkins CVE-2024-23897 → Code execution │
│ 2. Extract credentials from Jenkins scripts │
│ 3. SMB relay attack against Domain Admin │
│ 4. Full Active Directory compromise │
│ │
│ CONFIDENCE: 87% │
└─────────────────────────────────────────────────────────────┘
```
## ⚙️ 配置
### 创建默认配置
```
blackbox-recon --init-config
```
这将创建 `~/.blackbox-recon/config.yaml`:
```
# AI Provider 设置
ai:
provider: openai # openai, claude, local, ollama
api_key: null # Or use env var: OPENAI_API_KEY
model: gpt-4
temperature: 0.3
max_tokens: 4000
# 本地 LLM(LM Studio 等)
local:
url: http://localhost:1234/v1
model: qwen2.5-9b-instruct
# Recon 设置
recon:
threads: 50
timeout: 30
ports: top1000 # top100, top1000, all, or "80,443,8080"
# Modules
modules:
- subdomain
- portscan
- technology
output_format: json
verbose: false
```
### 环境变量
```
# API Keys(推荐替代 config file)
export OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxx"
export ANTHROPIC_API_KEY="sk-ant-xxxxxxxxxxxxxxxx"
```
## 🛠️ 命令参考
| 命令 | 描述 |
|---------|-------------|
| `blackbox-recon --target DOMAIN` | 基础侦察 |
| `blackbox-recon --target DOMAIN --full` | 启用所有模块的全面扫描 |
| `blackbox-recon --target DOMAIN --ai-mode openai` | 结合 AI 分析 |
| `blackbox-recon --target DOMAIN --modules subdomain,portscan` | 指定特定模块 |
| `blackbox-recon --target DOMAIN -o report.md --format markdown` | Markdown 格式输出 |
| `blackbox-recon --init-config` | 创建默认配置 |
### 模块选项
- `subdomain` - DNS 枚举
- `portscan` - TCP 端口扫描
- `technology` - Web 指纹识别
- `vulnscan` - 漏洞扫描 (即将推出)
### AI 模式
- `openai` - OpenAI GPT-4/GPT-3.5
- `claude` - Anthropic Claude
- `local` - 通过 HTTP 的本地 LLM (LM Studio 等)
- `ollama` - Ollama 本地模型
## 🏢 关于 Blackbox Intelligence Group
**Blackbox Intelligence Group LLC** 是一家退役军人所有的网络安全公司,专门从事进攻性安全和托管防御服务。
### 我们的服务
- 🛡️ **7x24 小时 SOC** 与 BlackboxEDR 平台
- 🔴 **渗透测试** (内部、外部、Web 应用)
- 🎯 **红队行动** - 真实的对手模拟
- 📊 **漏洞评估** 结合 ERIP 优先级排序
- 💼 **网络安全咨询**
**网站:** https://blackboxintelgroup.com
**邮箱:** info@blackboxintelgroup.com
**GitHub:** https://github.com/TheW4rF4ther
## 📄 许可证
MIT 许可证 - 详见 [LICENSE](LICENSE)
## ⚠️ 法律声明
**Blackbox Recon 仅用于授权的安全测试。**
- 仅在您拥有或有 **明确的书面授权** 进行测试的系统上使用
- 遵守测试范围边界
- 遵循负责任的披露实践
- 遵守有关安全测试的当地法律法规
**⭐ 如果您觉得有用,请给本仓库加星!**
由 Blackbox Intelligence Group 的进攻性安全专家倾注 ❤️ 构建
标签:AI安全, AI风险缓解, Blackbox Recon, Chat Copilot, Claude, Cloudflare, CTI, CVE检测, DLL 劫持, GitHub, MITRE ATT&CK, OpenAI, Python, SEO, 云存储安全, 内存规避, 占用监测, 反取证, 可插拔AI, 大语言模型, 安全扫描, 安全评估, 实时处理, 密码管理, 开源安全工具, 情报分析, 搜索引擎优化, 攻击路径映射, 无后门, 时序注入, 本地大模型, 漏洞优先级排序, 网络安全, 网络扫描, 网络探针, 网络诊断, 自动化侦查, 资产管理, 逆向工具, 逆向工程平台, 隐私保护, 黑盒测试