ninja1984/Chimera_C2
GitHub: ninja1984/Chimera_C2
一个从零手写的教学型红队 C2 框架,通过逐行实现 agent 管理、流量混淆与持久化机制来深入理解 offensive security 工具的内部原理。
Stars: 0 | Forks: 0
Chimera_C2 框架
一个从零开始构建的 C2 框架,旨在深入理解 offensive security 工具的内部原理。拒绝复制粘贴——所有组件均为手动编写,以此彻底弄清这些系统的实际运行机制。
### 为什么开发这个项目
在从 IT 支持向 offensive security 转型的过程中,我希望从内到外彻底理解这些工具。与其运行别人写好的 exploits,我决定亲自重新构建 C2 的核心功能——学习 command & control 系统是如何管理 agents、混淆流量以及维持 persistence 的。
**核心学习目标**:构建出 C2 概念的可用实现,且完全不依赖复制粘贴的代码或明显的特征码。如果我没法解释每一行代码的作用,它就不会被加进来。
### 这里有什么
这是一个历时 3 个月专注投入所开发的研究项目。该框架目前实现了:
#### 98 个专用 Offensive Agents(正在快速扩充)
从零开始构建,采用模块化设计。每个 agent 专注于一项特定的红队任务——从内核诊断到高级的数据窃取。
```
Tiered architecture - Separation between control logic and agent execution
Modular components - Swappable communication methods and task handlers
SQLite backend - Simple data persistence for testing/development
```
早期版本中提到的“AI 集成”是指由 LLM 辅助的实验性脚本生成和分析工具——而非自主决策 agents。可以将其理解为类似 Copilot 风格的辅助,而不是自主编排。
### 项目结构
```
Language: Python 3.x
Database: SQLite (development), PostgreSQL planned
Communication: HTTP/HTTPS with basic obfuscation
Target platforms: Linux primarily, Windows agents in progress
```
### 当前状态
这是一项正在进行的开发工作,并非打磨完善的产品。你所看到的约 15 次 commit 代表了我在学习过程中的迭代重建——许多实验在我掌握了更好的方法后都被废弃了。已提交的代码均可正常运行;无法运行的部分已被彻底删除,而非被隐藏。
### 技术细节
```
How C2 frameworks manage agent registration and tasking
Practical obfuscation techniques that actually evade basic detection
Why most "AI-powered" security tools are just regex with marketing
The gap between "works in the lab" and "works in production"
```
### 我的收获
```
Staged payload delivery system
Proper encryption for C2 traffic
Windows agent hardening
Detection evasion testing against real EDR
```
### 后续计划
## 快速入门 — 如何运行 Chimera C2
### 推荐的 LLM 配置(重要)
Chimera C2 是基于 **Ollama** 构建并测试的,使用了以下模型:
- `whiterabbitneo`
- `obliteratus`
这些模型为多 agent 系统提供了最佳的推理和红队行为表现。
在启动 orchestrator 之前,请确保 Ollama 正在运行其中某一个模型。
### 1. 环境配置
```
cd /path/to/Chimera_C2
# 1. 创建和编辑环境变量
cp config/.env.example config/.env # if the example file exists
# 或者手动创建:
cat > config/.env << EOF
C2_HOST=127.0.0.1
C2_PORT=9999
CALLBACK_HOST=192.168.56.101 # ← CHANGE to your host/VM IP
CALLBACK_PORT=4444
GPU_IP=127.0.0.1 # ← your Ollama/GPU machine IP
OLLAMA_HOST=127.0.0.1
EOF
cd Orchestrator
python3 live_orchestrator_backend.py
cd Orchestrator
python3 autonomous_orchestrator.py
# demo agents(SQL Harvester, SSH Tunneler, Metasploit Bridge 等)使用的 Lab 密码
LAB_PASSWORD=change_me_in_.env # ← Change this to your own secure password
Disclaimer
This is educational/research code for learning offensive security concepts. Not for unauthorized use. The goal is understanding defenses by building what they defend against.
```
标签:AI风险缓解, IP 地址批量处理, LLM辅助开发, SQLite, 免杀与混淆, 命令与控制(C2), 测试用例, 网络信息收集