farixzz/project-ares
GitHub: farixzz/project-ares
AI 驱动的自主渗透测试 CLI 工具,编排多种行业标准安全工具实现从侦察到漏洞利用的全流程自动化,并生成含 CVSS 评分与合规映射的专业报告。
Stars: 1 | Forks: 0
# 🛡️ ARES: 自主侦察与漏洞利用系统







**ARES** 是一个由 AI 驱动的自主渗透测试 CLI 工具,它能够编排行业标准安全工具来执行侦察、漏洞扫描和漏洞利用——全部在你的终端中完成。
## ⚡ 功能
### 核心能力
- 🤖 **自主工作流** — 基于目标特征的 AI 驱动工具编排
- 📊 **CVSS 3.1 评分** — 采用基础指标与时间指标进行行业标准的漏洞风险评估
- 🔧 **多工具集成** — Nmap、Nuclei、SQLMap、Nikto、Katana 等
- 🛡️ **WAF 检测** — 自动检测与绕过策略
### 报告与情报
- 📄 **专业报告** — PDF、HTML 和 JSON 格式导出
- 🎯 **修复路线图** — 包含具体命令的优先修复列表
- ⚡ **快速见效** — 突出显示低投入、高影响的修复措施
- 🗺️ **MITRE ATT&CK 映射** — 为所有发现提供技术 ID
- 📜 **合规性映射** — PCI-DSS 和 HIPAA 检查
### 扫描配置
| Profile | Use Case | Duration |
|---------|----------|----------|
| `quick` | 快速表面侦察 | ~5 分钟 |
| `standard` | 全面评估 | ~30 分钟 |
| `deep` | 漏洞利用模式 | 2 小时以上 |
| `stealth` | IDS/WAF 绕过 | ~1 小时 |
有关详细文档,请参见 [PROFILES.md](./PROFILES.md)。
## 🚀 安装
### 选项 A — 本地安装(推荐)
#### 1. 克隆仓库
```
git clone https://github.com/farixzz/project-ares.git
cd project-ares
```
#### 2. 设置虚拟环境
```
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
#### 3. 安装安全工具
**自动安装(推荐):**
```
python ares.py tools --install
```
**手动安装 — 系统工具:**
```
# Debian / Ubuntu / Kali / Parrot
sudo apt install nmap nikto sqlmap hydra whatweb commix
```
**手动安装 — Go 工具(需要 Go 1.19+):**
```
go install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
go install github.com/projectdiscovery/katana/cmd/katana@latest
go install github.com/ffuf/ffuf/v2@latest
# 将 Go bin 添加到 PATH
export PATH=$PATH:~/go/bin
echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc
```
#### 4. 设置 AI 分析(完整功能所需)
ARES 使用 Ollama 来支持 AI 摘要、执行报告和修复指导。如果没有它,工具将以降级模式运行,仅提供通用输出。
```
# 安装 Ollama
curl -fsSL https://ollama.com/install.sh | sh
# 拉取模型
ollama pull mistral
# 启动服务器
ollama serve
```
验证其是否正在运行:
```
curl http://localhost:11434/api/tags
# 应返回列出 mistral 的 JSON
```
#### 5. 验证安装
```
python ares.py tools --check
```
### 选项 B — Docker
ARES 提供了一个完全自包含的 Docker 镜像。所有工具——Nmap、Nikto、SQLMap、Hydra、WhatWeb、Commix、Nuclei、Katana、Subfinder、FFUF——均已预安装在镜像中。无需进行本地工具设置。
#### 构建
```
docker build -t project-ares .
```
#### 运行
```
# 基础扫描
docker run -it --rm project-ares scan -t example.com -p standard
# 快速侦查
docker run -it --rm project-ares scan -t example.com -p quick --dry-run
# 完整 pentest
docker run -it --rm project-ares scan -t target.com -p deep
# 隐蔽模式
docker run -it --rm project-ares scan -t target.com -p stealth
```
#### 持久化报告
```
docker run -it --rm \
-v $(pwd)/reports:/app/ares_results \
project-ares scan -t example.com -p standard
```
#### 将 Ollama 连接到 Docker
首先在主机上运行 Ollama (`ollama serve`),然后将主机地址传递给容器:
```
# Linux
docker run -it --rm \
-v $(pwd)/reports:/app/ares_results \
-e OLLAMA_HOST=http://172.17.0.1:11434 \
project-ares scan -t example.com -p standard
# macOS / Windows
docker run -it --rm \
-v $(pwd)/reports:/app/ares_results \
-e OLLAMA_HOST=http://host.docker.internal:11434 \
project-ares scan -t example.com -p standard
```
#### 验证容器内的工具
```
docker run --rm project-ares tools --check
```
## 📖 用法
### 基础扫描
```
python ares.py scan -t example.com -p standard
```
### 快速侦察
```
python ares.py scan -t example.com -p quick --dry-run
```
### 完整渗透测试
```
python ares.py scan -t target.com -p deep
```
### 隐身模式(绕过 IDS/WAF)
```
python ares.py scan -t target.com -p stealth
```
### 批量扫描
```
# 从文件
python ares.py scan -t targets.txt -p standard
# 逗号分隔
python ares.py scan -t "target1.com,target2.com" -p quick
```
### 查看报告
```
# 在浏览器中打开最新报告
python ares.py view --latest
# 通过 HTTP 提供报告服务
python ares.py serve --port 8888
```
### 检查工具状态
```
python ares.py tools --check
```
### 配置 ARES
```
python ares.py config --init
python ares.py config --show
python ares.py config -p deep # View profile details
```
## 📊 报告功能
ARES 生成包含以下内容的综合报告:
1. **执行摘要** — AI 生成的业务影响分析
2. **CVSS 评分** — 每个漏洞的基础评分与时间评分
3. **快速见效** — 附带精确命令的高影响、低投入修复措施
4. **修复路线图** — 优先级时间表(24小时 → 1周 → 1个月)
5. **合规性映射** — PCI-DSS 和 HIPAA 检查
6. **MITRE ATT&CK** — 按发现映射的技术 ID
### 报告格式
| Format | Description |
|--------|-------------|
| **PDF** | 专业的可打印客户就绪报告 |
| **HTML** | 交互式的基于浏览器的报告 |
| **JSON** | 机器可读,便于流水线集成 |
## 🔧 工具集成
| Tool | Purpose | Profiles |
|------|---------|---------|
| Nmap | 端口扫描与服务检测 | All |
| Subfinder | 子域名枚举 | standard, deep, stealth |
| WhatWeb | 技术指纹识别 | All |
| Katana | Web 爬取与 endpoint 发现 | standard, deep, stealth |
| FFUF | 目录与参数模糊测试 | standard, deep |
| Nuclei | 基于模板的漏洞扫描 | standard, deep, stealth |
| Nikto | Web 服务器错误配置扫描 | standard, deep |
| SQLMap | SQL 注入检测与漏洞利用 | deep |
| Commix | 命令注入利用 | deep |
| Hydra | 凭据暴力破解 | deep |
## 🏗️ 架构
```
flowchart TD
CLI["ares.py\nCLI entry point"]
DISP["display.py\nTerminal UI"]
CONF["config.py\nYAML config"]
CLI --> SCAN
CLI --> DISP
CLI --> CONF
SCAN["scanner.py\nAutonomous orchestration engine"]
SCAN --> AI["Ollama / AI\nMistral model backend"]
SCAN --> TOOLS["tools/\n10 tool wrappers"]
SCAN --> CVSS["cvss.py\nCVSS 3.1 scoring"]
TOOLS --> RECON["Nmap · WhatWeb · Subfinder"]
TOOLS --> CRAWL["Katana · FFUF · Nikto"]
TOOLS --> EXPLOIT["SQLMap · Commix · Hydra"]
AI --> REMED
TOOLS --> REMED
CVSS --> REMED
REMED["remediation_db.py\nFix guidance + MITRE ATT&CK mapping"]
REMED --> REPORT["reporter.py\nReport generation"]
REPORT --> PDF["PDF"]
REPORT --> HTML["HTML"]
REPORT --> JSON["JSON"]
style SCAN fill:#EEEDFE,stroke:#534AB7,color:#3C3489
style REMED fill:#EEEDFE,stroke:#534AB7,color:#3C3489
style TOOLS fill:#EEEDFE,stroke:#534AB7,color:#3C3489
style AI fill:#E1F5EE,stroke:#0F6E56,color:#085041
style CVSS fill:#E1F5EE,stroke:#0F6E56,color:#085041
style REPORT fill:#E1F5EE,stroke:#0F6E56,color:#085041
style RECON fill:#E1F5EE,stroke:#0F6E56,color:#085041
style CRAWL fill:#FAECE7,stroke:#993C1D,color:#712B13
style EXPLOIT fill:#FAECE7,stroke:#993C1D,color:#712B13
```
```
project-ares/
├── ares.py # Main CLI entry point
├── ares_cli/
│ ├── scanner.py # Autonomous scanning engine
│ ├── reporter.py # Multi-format report generation
│ ├── display.py # Rich terminal UI
│ ├── config.py # Configuration management
│ ├── cvss.py # CVSS 3.1 scoring engine
│ ├── remediation_db.py # Remediation guidance + MITRE mapping
│ └── tools/
│ ├── enhanced_tool_manager.py
│ ├── nuclei_scanner.py
│ ├── katana_crawler.py
│ ├── ffuf_fuzzer.py
│ ├── subdomain_enum.py
│ └── whatweb_fingerprint.py
├── tests/ # Test suite
├── PROFILES.md # Scan profile documentation
├── CHANGELOG.md # Version history
├── requirements.txt # Python dependencies
└── Dockerfile # Multi-stage container build
```
## ⚙️ 配置
初始化配置:
```
python ares.py config --init
```
位置:`~/.config/ares/config.yaml`
```
# AI 配置
ollama_host: http://localhost:11434
ollama_model: mistral
enable_ai_analysis: true
# 报告
report_author: "Security Team"
company_name: "Your Company"
enable_compliance_check: true
# 输出
output_dir: ./ares_results
```
### 环境变量(Docker)
| Variable | Default | Description |
|----------|---------|-------------|
| `OLLAMA_HOST` | `http://host.docker.internal:11434` | Ollama 服务器地址 |
## 🔍 故障排除
### AI 分析不工作
```
[!] WARNING: OLLAMA NOT REACHABLE — AI analysis is DISABLED
```
在你的主机上运行 `ollama serve`。Docker 用户:向容器传递 `-e OLLAMA_HOST=http://host.docker.internal:11434`。
### Nuclei 未发现任何内容
```
# 手动更新模板
nuclei -update-templates
# 直接测试
nuclei -target https://example.com -severity critical,high -silent
```
### 安装后找不到 Go 工具
```
export PATH=$PATH:~/go/bin
echo 'export PATH=$PATH:~/go/bin' >> ~/.bashrc
source ~/.bashrc
```
### Nmap 权限被拒绝
```
# Nmap 原始套接字扫描需要 root
sudo python ares.py scan -t target.com -p standard
```
## ⚖️ 法律免责声明
**ARES 仅适用于授权的安全测试。**
- 仅扫描你拥有**明确书面授权**进行测试的系统
- 在进行任何评估之前获取授权
- 开发者对滥用行为**不承担任何责任**
- 请负责任且符合道德地使用
## 🤝 贡献
1. Fork 该仓库
2. 创建一个功能分支:`git checkout -b feature/awesome`
3. 提交更改:`git commit -m 'Add awesome feature'`
4. 推送:`git push origin feature/awesome`
5. 发起 Pull Request
## 📋 更新日志
有关完整的版本历史,请参见 [CHANGELOG.md](./CHANGELOG.md)。
## 📝 许可证
MIT 许可证 — 详情请参见 [LICENSE](LICENSE)。
**由 [farixzz](https://github.com/farixzz) 用 💪 制作**
标签:AI风险缓解, AI驱动, CISA项目, CTI, CVSS 3.1评分, Docker, FTP漏洞扫描, Google, GPT, HIPAA, LIDS, MISP, MITRE ATT&CK映射, Nikto, Nmap, Nuclei, PCI-DSS, PDF报告生成, Python, SQLMap, WAF检测与绕过, 人工智能安全, 反取证, 合规性, 威胁模拟, 安全工具集成, 安全测试CLI, 安全编排, 安全评估, 安全防御评估, 密码管理, 插件系统, 攻击模拟, 无后门, 无服务器架构, 漏洞管理, 网络安全, 自动化侦察, 自动化渗透测试, 虚拟驱动器, 请求拦截, 逆向工具, 隐私保护, 驱动签名利用