Ruby570bocadito/X404X

GitHub: Ruby570bocadito/X404X

X404X 是一个覆盖完整网络杀伤链的自主红队进攻框架,集成了 AI 决策、内核级规避、多通道 C2 和 45 个攻击模块。

Stars: 0 | Forks: 0

X404X





🛡️ 内核
规避

BYOVD · DKOM · Blue Pill

🔐 后量子
C2

Kyber-1024 · Ed25519 · SPIFFE

🦠 异常
传播

Ultrasound · PLC · QR · PJL

🧠 AI
编排器

Q-Learning · FedAvg · Deepfake

## 什么是 X404X? X404X 采用 **Go** 核心、**Python** 桥接层以及 **WASM** 扩展支持构建,整合了涵盖 4 个开发阶段的 45 个攻击模块 —— 所有模块均已编译、测试完毕,随时可用于授权的红队演练。 ## 架构
``` flowchart LR subgraph OPERATOR[" Operator Console"] CLI[Go CLI Shell] DASH[Vue 3 Dashboard] end subgraph C2[" C2 Infrastructure"] MTLS[SPIFFE mTLS] SIGN[Ed25519 Signer] KYBER[Kyber-1024 KEM] MULTI[5-Channel Stack] end subgraph CORE[" Core Engine Go"] RANSOM[Ransomware Engine] EVASION[Evasion Suite] PROPAG[Propagation Vectors] AI[AI Orchestrator] end subgraph BRIDGE[" Python Bridge"] RPC[Go↔Python RPC Router] H170[~170 Handlers] end subgraph PLUGINS[" Plugin Ecosystem"] WORM[Worm + RL] ARGOS[Argos Operations] BLUE[Bluesky BT] PULSE[Pulse C2] H_MIND[Hivemind AI] RF[RF Contagion SDR] end CLI --> MTLS DASH --> MTLS MTLS --> RANSOM MTLS --> EVASION MTLS --> PROPAG MTLS --> AI RANSOM --> RPC EVASION --> RPC PROPAG --> RPC AI --> RPC RPC --> WORM RPC --> ARGOS RPC --> BLUE RPC --> PULSE RPC --> H_MIND RPC --> RF style OPERATOR fill:#ff336620,stroke:#ff3366 style C2 fill:#00d4ff20,stroke:#00d4ff style CORE fill:#00ff8820,stroke:#00ff88 style BRIDGE fill:#ff6b3520,stroke:#ff6b35 style PLUGINS fill:#a855f720,stroke:#a855f7 ```
## Kill Chain 覆盖范围
``` ╔══════════════════════════════════════════════════════════════════════╗ ║ ATTACK KILL CHAIN ║ ╠═══════╦══════════╦══════════╦══════════╦══════════╦════════════════╣ ║ RECON ║ INITIAL ║ EXEC ║ PERSIST ║ PRIVESC ║ LATERAL ║ ║ ║ ACCESS ║ ║ ║ ║ ║ ╠═══════╬══════════╬══════════╬══════════╬══════════╬════════════════╣ ║ OSINT ║ Phish AI ║ LOLBin ║ WER ║ BYOVD ║ Kerberos ║ ║ Recon ║ CI/CD ║ Chainer ║ Triple ║ DKOM ║ Delegation ║ ║ DNS ║ QR Worm ║ Reflect ║ MFT ║ Token ║ IMDSv2 (AWS) ║ ║ APIs ║ USB ADB ║ DLL ║ Slack ║ Steal ║ VLAN Jump ║ ║ ║ PJL ║ WASM ║ Schtasks ║ ║ Chronos NTP ║ ╚═══════╩══════════╩══════════╩══════════╩══════════╩════════════════╝ │ │ ╔═══════════════╩══════════╦═══════════════╩═════════════╗ ║ EVASION ║ C2 & EXFIL ║ ╠══════════════════════════╬═════════════════════════════╣ ║ WFP DNS Poisoning ║ SPIFFE mTLS + Ed25519 ║ ║ Blue Pill Hypervisor ║ Kyber-1024 Post-Quantum ║ ║ Anti-Reversing Suite ║ 5-Channel Stack ║ ║ Anti-Forensics (DoD 7p) ║ Blockchain C2 (BTC/ETH) ║ ║ MFT Slack Hide ║ MFT Slack Storage ║ ╚══════════════════════════╩═════════════════════════════╝ ```
## 阶段完成情况
``` FASE 0 ████████████████████████ 100% Critical Stubs Fixed FASE 1 ████████████████████████ 100% Evasion + Anti-Forensics FASE 2 ████████████████████████ 100% C2 Hardened FASE 3 ████████████████████████ 100% Advanced Propagation FASE 4 ████████████████████████ 100% AI + Cross-Platform └──────────────────────┘ 45 Modules · 12,685 Lines ```
| 阶段 | 主题 | 🧩 | 📝 代码行数 | 状态 | |:-----:|-------|:--:|---------|:------:| | **0** | 关键存根 | 8 | 500 | `█████████░` 100% | | **1** | 规避 + 反取证 | 10 | 3,599 | `█████████░` 100% | | **2** | C2 强化 | 6 | 2,374 | `█████████░` 100% | | **3** | 高级传播 | 12 | 3,274 | `█████████░` 100% | | **4** | AI + 跨平台 | 9 | 2,938 | `█████████░` 100% |
## 模块矩阵
### 🔴 阶段 1 — 规避与反取证 | # | 模块 | 功能 | OS | |:--:|--------|------------|:--:| | 1.1 | **BYOVD Loader** | 5 个存在漏洞的驱动程序 (WinRing0, Gdrv, RTCore64, kprocesshacker, CPUID) · IOCTLs · 读写物理内存 · MSR · 句柄提权 | ![Win](https://img.shields.io/badge/Win-0078D6?style=flat-square&logo=windows&logoColor=white) | | 1.2 | **DKOM** | 通过 ActiveProcessLinks 断链隐藏进程 · 窃取 SYSTEM token · 针对不同版本的 EPROCESS 偏移量 | ![Win](https://img.shields.io/badge/Win-0078D6?style=flat-square&logo=windows&logoColor=white) | | 1.3 | **Anti-Reversing** | 硬件断点检测 (DR0-DR7) · INT3 扫描 · CRC32 完整性校验 · RDTSC 计时 · 沙箱 + 虚拟 MAC 检测 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 1.4 | **Anti-Forensics** | DoD 5220.22-M 7 次擦除 · MFT $BITMAP 破坏 · VAD 隐藏 · 崩溃转储/事件日志/预读取/USN/Shellbag 擦除 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 1.5 | **WER Persistence** | Windows 错误报告挂起劫持 · 静默进程退出 · 启动项 + Run 键 + schtasks | ![Win](https://img.shields.io/badge/Win-0078D6?style=flat-square&logo=windows&logoColor=white) | | 1.6 | **MFT Slack** | 通过 PowerShell 进行 NTFS 闲置空间读写 · AES-GCM 加密片段 · 隐藏的 agent/勒索说明存储 | ![Win](https://img.shields.io/badge/Win-0078D6?style=flat-square&logo=windows&logoColor=white) | | 1.7 | **WFP DNS Poison** | WFP 提供程序 + netsh 回退 · 伪造 DNS 服务器 (UDP 53) · hosts 文件注入 · 缓存刷新 | ![Win](https://img.shields.io/badge/Win-0078D6?style=flat-square&logo=windows&logoColor=white) | | 1.8 | **Blue Pill HV** | VMXON/VMCS VT-x hypervisor · 绕过 PatchGuard · CPUID 陷阱 · 内存隐藏 | ![Win](https://img.shields.io/badge/Win-0078D6?style=flat-square&logo=windows&logoColor=white) | | 1.9 | **LOLBin Chainer** | 28 个 LOLBins (20 个 Win + 8 个 Linux) · 每小时随机链 · 多层 base64 编码 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 1.10 | **Kernel DNS Driver** | NDIS 过滤驱动 · 阻止 Defender/安全更新 · DNS 重定向至 C2 | ![Win](https://img.shields.io/badge/Win-0078D6?style=flat-square&logo=windows&logoColor=white) | ### 🔵 阶段 2 — C2 强化 | # | 模块 | 功能 | OS | |:--:|--------|------------|:--:| | 2.1 | **SPIFFE mTLS** | SVID 生成 · trust bundle · peer SPIFFE ID 验证 · 证书轮换 · mTLS 服务端/客户端 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 2.2 | **Multi-Channel C2** | 5 个通道 (gRPC→WebSocket→DoH→Twitter→Blockchain) · 健康检查 · 自动故障转移 · beacon 循环 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 2.3 | **Ed25519 Signing** | 命令签名/验证 · nonce 重放保护 · 受信任的密钥环 · 批量操作 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 2.4 | **Dashboard Ops** | HTTP+WebSocket API · agent 节点 · 传播地图 · 签名命令下发 · 嵌入式 HTML | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 2.5 | **Kyber-1024** | 混合 KEM (ML-KEM-1024 + X25519) · HKDF 派生 · AES-256-GCM + HMAC-SHA256 会话 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 2.6 | **Proto Obfuscation** | XOR+AES-CTR+GZIP · 完整性验证 · 蒸发缓冲区 · 仅内存加载 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | ### 🟢 阶段 3 — 高级传播 | # | 模块 | 功能 | OS | |:--:|--------|------------|:--:| | 3.1 | **Ultrasound QPSK** | >18kHz 调制 · WAV 生成 · 扬声器/麦克风 RX/TX · 前导码同步 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 3.2 | **Powerline PLC** | HomePlug 设备扫描 · UPnP SSDP · 通过电网进行 SOAP 注入 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 3.3 | **USB ADB** | ADB 枚举 · APK 安装 · 远程 shell 执行 · SMS/联系人转储 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 3.4 | **DNS Rebinding** | TTL=0 重绑定服务器 · 绕过 SOP 的 JS payload · 通过 Host 头进行 SSRF 横向移动 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 3.5 | **CI/CD Webhooks** | GitHub Actions · Jenkins · GitLab CI 注入 · 10 CI 扫描器 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 3.6 | **VLAN Jump** | Double tagging · DTP 协商 · ARP 泛洪 · 按 VLAN 进行 DHCP | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 3.7 | **QR Dynamic Worm** | QR 矩阵生成 · PNG 渲染 · 轮换通道 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 3.8 | **PJL Printer Worm** | PJL 漏洞利用 · NVRAM 读写 · 固件感染 · PCL 勒索说明 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 3.9 | **Chronos NTP** | 伪造 NTP 服务器 · 时间快进/倒回 · schtask 偏移 · w32tm 劫持 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 3.10 | **Reflective DLL** | NtCreateSection+NtMapViewOfSection · 100 字节 NASM stager · 远程线程注入 | ![Win](https://img.shields.io/badge/Win-0078D6?style=flat-square&logo=windows&logoColor=white) | | 3.11 | **Kerberos Deleg** | 非约束委派发现 · 强制认证 · TGT 转储 · Silver Ticket | ![Win](https://img.shields.io/badge/Win-0078D6?style=flat-square&logo=windows&logoColor=white) | | 3.12 | **IMDSv2 Bypass** | AWS token 获取 · IAM 提取 · SSRF · AssumeRole · 邻居扫描 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | ### 🟣 阶段 4 — AI + 跨平台 | # | 模块 | 功能 | OS | |:--:|--------|------------|:--:| | 4.1 | **Cross-Platform Loader** | ELF · Mach-O · APK 生成 · 打包+加密 · syscall 钩子 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 4.2 | **JIT Polymorphism** | NOP-sleds · 代码交叉 · 寄存器重排 · runtime 变异循环 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 4.3 | **AI FSM Orchestrator** | Q-learning 状态机 · 探索与利用 · 风险预测 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | |4.4 | **Federated Learning** | FedAvg 聚合 · 受害者画像 · 钓鱼时间预测 · 模型导出 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 4.5 | **Autofactory Fuzzer** | AFL++ 集成 · 9 种变异策略 · 崩溃检测 · exploit 候选 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 4.6 | **Wazero Bridge** | WASM 模块解析 · TinyGo 编译 · Python→WASM 迁移 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) | | 4.7 | **RF Contagion** | SDR 检测 (RTL-SDR/HackRF) · ModemManager · 基带注入 · IMSI · SS7 | ![Linux](https://img.shields.io/badge/Linux-FCC624?style=flat-square&logo=linux&logoColor=black) | | 4.8 | **EDR Test Lab** | Docker Compose · Windows Server 2022 · ELK Stack · Sysmon · 自动化测试 | ![Docker](https://img.shields.io/badge/Docker-2496ED?style=flat-square&logo=docker&logoColor=white) | | 4.9 | **Deepfake Vishing** | Coqui TTS (tacotron2-DDC) · VoIP · SMS 钓鱼 · SE 画像 | ![All](https://img.shields.io/badge/All-333?style=flat-square&logo=linux&logoColor=white) |
## 🚀 快速开始
### 前置条件 ``` # 必需 go >= 1.22 # Core engine (Go) python >= 3.11 # Bridge + handlers (Python) git # Version control # 可选 docker >= 27.0 # EDR lab + containerized deployment node >= 22.0 # Dashboard frontend (Vue 3) ``` ### 一键部署 ``` # 全栈部署 (Linux/macOS) bash deploy/deploy.sh # 这将: # 1. 安装 Go 和 Python 依赖 # 2. 构建 C2 server # 3. 启动 Python bridge # 4. 在端口 9090 上启动 dashboard # 5. 以 dry-run 模式启动 worm 引擎 ``` ### 手动设置 ``` # 1. Clone 并进入 git clone https://github.com/Ruby570bocadito/X404X.git cd X404X # 2. 安装依赖 pip install -r requirements.txt cd internal/ransomware && go mod tidy && cd ../.. # 3. 启动 Python Bridge cd modules/bridge && python3 bridge.py & cd ../.. # 4. 构建并启动 C2 Dashboard cd plugins/pulse-c2/src/go go build -o x404x-dashboard ./cmd/dashboard ./x404x-dashboard -port 9090 & cd ../../.. # → 打开 http://localhost:9090 # 5. 启动交互式控制台 cd cmd/x404x go run . console # → 输入 'help' 获取可用命令 ``` ### 运行模式 ``` # ─── Dry-Run 演示(安全 —— 无真实 exploits)───────────── bash scripts/run_demo.sh # ─── Worm 模拟 ──────────────────────────────────── cd plugins/worm # Windows python worm_core.py --config configs/config_simulation.yaml # Linux/macOS python3 worm_core.py --config configs/config_simulation.yaml # ─── 实战行动(⚠️ 仅限授权目标)─────────── cd cmd/x404x go run . campaign start --name "Operation Nightfall" --targets targets.json # ─── EDR 测试实验室 ──────────────────────────────────── docker-compose -f lab/docker-compose.edr.yml up -d # → Windows Server 2022 + Defender ATP + ELK + Sysmon # → 自动化 evasion 测试套件在开机时运行 ``` ### 控制台命令 ``` # 在 X404X 交互式控制台中: help # List all commands modules # Show available modules (45 total) campaign start # Start a new campaign (FSM-driven) recon # Run reconnaissance module exploit # Execute exploit chain privesc # Privilege escalation persist # Install persistence mechanisms lateral # Lateral movement exfil # Data exfiltration dashboard # Open dashboard URL deploy # One-click full deploy status # Show campaign status killchain # Display kill chain progress ransomware # Launch ransomware engine propagate # Start worm propagation listeners # List active C2 listeners webhook # Configure webhook notifications ```
## 目录映射
``` X404X/ │ ├── cmd/ ← CLI + Implant Agent │ ├── x404x/console.go Interactive shell │ └── implant/main.go Go C2 agent │ ├── internal/ ← CORE ENGINE │ ├── ransomware/ Engine principal (37 files) │ │ ├── hydra_vectors/ 8 vectores exóticos │ │ ├── loader/cross.go ELF · Mach-O · APK │ │ ├── stager/reflective_asm Reflective DLL NASM │ │ ├── v27/ v29/ v210/ Versiones avanzadas │ │ └── *.go Módulos core │ ├── agent/ Post-exploit + privesc │ ├── appstate/ FSM + AI orchestrator │ ├── bridge/wazero_loader.go WASM bridge │ └── dispatch/dispatcher.go MITRE ATT&CK mapper │ ├── modules/bridge/ ← PYTHON BRIDGE │ ├── bridge.py Go↔Python RPC router │ └── handlers/ 12 files · ~170 handlers │ ├── plugins/ ← PLUGIN ECOSYSTEM │ ├── worm/ 35 exploits + RL engine │ ├── operations/ Argos agents + UI │ ├── pulse-c2/ Crypto + Dashboard │ ├── ai/ Hivemind · Fuzzer · Vishing │ ├── blue/bluesky/ Bluetooth attacks │ └── rf_contagion/ SDR 4G/5G baseband │ ├── lab/docker-compose.edr.yml EDR test environment ├── deployments/deploy.sh One-click deploy ├── scripts/run_demo.sh Cross-platform demo ├── ROADMAP.md Development roadmap └── requirements.txt Dependencies ```
## 技术画卷

LANGUAGE FRAMEWORK CRYPTO TOOL


## 统计数据


## 法律声明

RBYHACK © 2025-2026 · 构建于西班牙马拉加 · 路线图 · 报告问题


标签:AI风险缓解, EVTX分析, Go, Python, Ruby工具, Vue 3, Web报告查看器, XXE攻击, 无后门, 无线安全, 日志审计, 本地大模型, 自动化攻击框架, 逆向工具