Ruby570bocadito/ArgusPest
GitHub: Ruby570bocadito/ArgusPest
ARGOS v2.0 是一个半自主攻击性作战平台,通过融合 A* 规划、CBR 案例推理与规则引擎的混合决策架构,在人在回路的前提下实现智能化的 APT 攻击模拟与红队行动编排。
Stars: 0 | Forks: 0
# ARGOS v2.0
**半自主攻击性作战平台**
APT 模拟 · 混合决策引擎 · 人在回路
## 快速开始
```
# Setup
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
# Interactive console(推荐)
python argos_console.py
```
在控制台中:
```
argos> guide # Explica la arquitectura y el flujo
argos> start # Inicia una mision
argos> demo # Demo narrada de 6 fases con el motor de decision
argos> lab # Verifica el laboratorio (6 targets vulnerables)
argos> status # Estado detallado de la mision
argos> test unit # Corre los 34 tests unitarios
argos> help # Todos los comandos
```
你也可以使用传统的 CLI:
```
python ui/cli.py start -t 10.0.0.0/24 -g domain_admin -p balanced
python ui/cli.py dashboard # TUI a pantalla completa
python ui/cli.py arsenal build stager --os linux --arch amd64
```
## 控制台命令
```
argos> guide Arquitectura y flujo de ARGOS
argos> start [t] [g] [p] Iniciar mision (default: 10.100.0.0/24 domain_admin balanced)
argos> start --auto Iniciar con auto-aprobacion
argos> demo [--fast] Demo narrada de 6 fases
argos> status Estado detallado
argos> agent register ... Registrar agente
argos> agent list Listar agentes
argos> agent find ... Simular hallazgo
argos> decide list Decisiones pendientes
argos> decide approve Aprobar (HITL)
argos> decide reject Rechazar (HITL)
argos> lab Laboratorio (6 targets)
argos> test unit 34 tests
argos> quit Salir
```
## 项目结构
```
├── main.py # Director entrypoint
├── config.yaml # Global config
├── pyproject.toml # Dependencies & tooling
├── core/ # Decision engine
│ ├── director.py # Mission orchestrator
│ ├── event_bus.py # Async pub/sub
│ ├── knowledge_tree.py# Live World Graph (NetworkX)
│ ├── planner.py # A* attack path planner
│ ├── cbr.py # Case-Based Reasoner (Qdrant + embeddings)
│ ├── rules_engine.py # Tactical rules (~500 lines, 10+ services)
│ ├── decision_fusion.py# Weighted fusion of 3 engines
│ ├── recon_manager.py # Auto-recon dispatch
│ ├── exploit_manager.py# Exploit dispatch (agent / MSF)
│ └── msf_rpc.py # Metasploit RPC integration
├── database/ # SQLAlchemy models (SQLite WAL)
├── api/ # gRPC server (protobuf)
├── ui/ # CLI (Click + Rich) & TUI (Textual)
├── arsenal/ # Malware factory
│ ├── builder.py # Go/Rust compiler + obfuscation
│ └── crypter.py # AES-GCM payload crypter + Go loader gen
├── evasion/ # Traffic camouflage (Chameleon C2)
├── ctf/ # Flag hunter + auto-submitter
├── agents/ # Go field agents
│ ├── stager/ # Initial access payload
│ ├── cell/ # Full persistent agent
│ │ ├── recon/ # Port scanner + SMB enum
│ │ ├── exploit/ # Shellcode injection (syscalls)
│ │ └── post/ # Credential dump + persistence
│ └── python_cell/ # Python test agent
├── tests/ # Test suite
│ ├── test_director.py # 36 unit tests (core engine)
│ ├── mock_agent.py # Event bus simulation
│ ├── demo_integration.py# End-to-end demo
│ └── docker-compose-lab.yml# Vulnerable lab (6 targets)
└── shared/proto/ # Protobuf schema
```
## 决策引擎
Director 通过一个**实时世界图** (NetworkX MultiDiGraph) 来评估战场。每次 agent 的发现(主机、服务、凭证、flag)都会更新该图。为了决定下一步行动:
| 引擎 | 权重 | 方式 |
|--------|--------|-----|
| **A* 规划器** | 45% | 通过漏洞利用边找到通往目标的静默/快速路径 |
| **CBR 记忆** | 30% | 向量相似度搜索 (Qdrant + SentenceTransformers) — 以前什么方法有效? |
| **规则引擎** | 25% | 针对已知服务的确定性规则 (SSH → 暴力破解, SMB 445 + Win7 → EternalBlue, 等) |
**全局防御状态 (GDS)** 会跟踪敌方网络的偏执程度 (0.0–1.0)。当达到 0.90 时,**紧急停止开关** 被触发 — 所有 agent 进入休眠状态。
## Go Agents
```
# 编译 stager(初始访问)
make build-stager # plain: agents/stager/stager.exe
make build-stager-obf # garble-obfuscated
# 编译 cell(完整 agent)
make build-cell # agents/cell/cell.exe
# Cross-compile for Linux
make build-stager-linux
```
## Docker 实验环境
```
docker-compose -f tests/docker-compose-lab.yml up -d
```
在 `10.100.0.0/24` 上启动:
- **10.100.0.20** — Apache 2.4.49 (CVE-2021-41773)
- **10.100.0.21** — SSH 弱口令 (admin:admin123)
- **10.100.0.22** — MySQL 5.7 无认证
- **10.100.0.23** — vsftpd 2.3.4 后门 (CVE-2011-2523)
- **10.100.0.24** — Redis 无认证
- **10.100.0.30** — DVWA Web 应用
```
docker-compose -f tests/docker-compose-lab.yml down
```
## 测试
```
# 完整套件(34 个通过,2 个跳过 ML 依赖)
pytest tests/ -v --tb=short
# 快速 — 跳过 CBR/ML 测试
pytest tests/ -v --tb=short -k "not cbr"
# 集成演示
python tests/demo_integration.py
```
## 依赖项
| 类别 | 库 |
|----------|-----------|
| 核心 | networkx, pyyaml, grpcio, protobuf |
| 决策 | qdrant-client, sentence-transformers, torch (可选) |
| API | fastapi, uvicorn, websockets |
| DB | sqlalchemy, aiosqlite |
| CLI/TUI | click, rich, textual |
| 安全 | impacket, scapy, pymetasploit3 |
| 开发 | pytest, pytest-asyncio, pytest-cov, black, ruff |
完整安装:`pip install -e ".[all]"`
## 警告
标签:APT仿真, APT模拟, A*算法, CBR, Go语言代理, HITL, Metasploit集成, Mr. Robot, NetworkX, OPA, PE 加载器, Python, Python工具, TUI, TUI仪表盘, Web报告查看器, 云计算, 人在回路, 半自主化攻击平台, 后渗透, 域控提权, 基于案例推理, 安全实验室, 密码管理, 恶意代码分类, 插件系统, 攻击模拟, 无后门, 无线安全, 日志审计, 混合决策引擎, 特权检测, 知识树, 突变策略, 紫队工具, 红队自动化, 网络安全, 网络安全审计, 网络攻防, 网络知识图谱, 自动化渗透测试, 规则引擎, 请求拦截, 逆向工具, 隐私保护, 靶场, 驱动签名利用