diemoeve/oxide

GitHub: diemoeve/oxide

一个跨平台的 C2 植入体框架,专注于以代码级 TTP 展示、配套检测规则与 IR 剧本支持安全研究与检测工程。

Stars: 2 | Forks: 0

# 氧化物 跨平台 RAT 框架,用于安全研究与检测工程。 旨在在代码层面展示威胁行为者的 TTPs。每个组件都附带配对的 YARA 规则、Sigma 规则、网络签名和 IR 剧本。 **所有测试均在隔离的 VM 实验室(仅主机网络,无互联网桥接)中进行。** 默认 C2 地址为 localhost。请参阅 `DISCLAIMER.md`。 ## 这是什么 现代 RAT 框架的参考实现,用于: - 理解植入体与面板在协议层面的通信 - 针对已知行为构建检测规则,而非猜测 - 使用有文档记载的攻击与防御工件进行红队演练 参考架构:AsyncRAT(C#,2019)。Oxide 将其现代化:Rust 植入体、跨平台持久化、Web 面板、分阶段加载器、独立式窃取器。 ## 组件 | 仓库 | 角色 | 语言 | |------|------|------| | [oxide](https://github.com/diemoeve/oxide)(本仓库) | 植入体 + C2 面板 + 检测 | Rust + Python | | [oxide-loader](https://github.com/diemoeve/oxide-loader) | 三阶段交付链 | C + Rust | | [oxide-stealer](https://github.com/diemoeve/oxide-stealer) | 浏览器凭证提取 | Rust | | [oxide-infra](https://github.com/diemoeve/oxide-infra) | 实验室基础设施自动化 | Terraform + Ansible | ## 快速启动(实验室) **前提条件:** Rust 稳定版、Python 3.11+、libvirt/KVM、gcc ``` bash lab-setup/gen_certs.sh cargo build -p oxide-implant cd panel && pip install -e . && python -m panel.panel.main --web-port 8080 --c2-port 4444 OXIDE_C2_HOST=10.10.100.1 ./target/debug/oxide-implant ``` 打开 `http://localhost:8080`(管理员 / oxide)。 ## 协议 `[4 字节小端长度][AES-256-GCM 加密的 JSON]` 通过 TLS 1.3 传输。 命令类型:`shell`、`file_list`、`file_download`、`screenshot`、 `process_list`、`persist_status`、`persist_remove`、`steal`。 ## 窃取命令 1. 上传 oxide-stealer 二进制文件:`POST /api/staging/upload`(无 stage_number) 2. 在面板机器人详情视图中点击 **Steal** 3. 植入体从暂存区下载二进制文件,验证 SHA-256,并作为子进程执行 4. 凭证将显示在 **Credentials** 选项卡中 ## 检测 所有技术位于 `detection/COVERAGE_MATRIX.md`。 ``` detection/ ├── sigma/ 15 rules: persistence, commands, C2, credential access, tool staging ├── yara/ 3 rules ├── network/ Zeek, Suricata, JA3/JA4 └── ir/ 5 IR playbooks ``` ## 测试 ``` cargo test pytest panel/tests/ -v pytest tests/vm/ -v # requires VMs (see tests/vm/README.md) ``` ## 结构 ``` oxide/ ├── implant/ Rust implant ├── shared/ Shared crypto + packet types ├── panel/ Python/FastAPI C2 panel ├── detection/ YARA, Sigma, network, IR ├── docs/ Architecture and protocol docs ├── tests/vm/ VM integration tests (libvirt) └── lab-setup/ Certificate generation ``` ## 相关项目 - [oxide-loader](https://github.com/diemoeve/oxide-loader) - 三阶段交付链 - [oxide-stealer](https://github.com/diemoeve/oxide-stealer) - 浏览器凭证提取 - [oxide-infra](https://github.com/diemoeve/oxide-infra) - 实验室基础设施(Terraform + Ansible) ## 病毒总览 | 二进制文件 | 检出数 | 链接 | |------------|--------|------| | oxide-implant(Windows x86_64) | 5/72 | [扫描](https://www.virustotal.com/gui/file/69ba7de6d505dbf6c655895718e65d49088f673a7a798177bd5c3fe9eef4744d) | 所有 5 次检出均来自基于启发式/ML 的引擎(Bkav Pro、Webroot 等),这些引擎对无签名 Rust PE 二进制文件已知会产生误报。没有来自 Defender、Kaspersky、ESET、CrowdStrike、SentinelOne 或其他主要引擎的基于签名或行为的检测。 参考二进制文件 SHA256:`69ba7de6d505dbf6c655895718e65d49088f673a7a798177bd5c3fe9eef4744d` 从源代码重建的二进制文件不会匹配此哈希(Rust 构建默认不具备可重现性)。
标签:AES-256-GCM, Ansible, C, DNS信息、DNS暴力破解, ECS, IR playbooks, KVM, libvirt, Python, RAT, Rust, Sigma规则, Terraform, TGT, TLS 1.3, TTP, YARA规则, 三阶段加载, 主机仅网络, 信息窃取, 内存加载, 凭证提取, 协议级通信, 参考架构, 可视化界面, 命令行界面, 威胁行为, 异步通信, 攻防演练, 数据展示, 无后门, 本地回环, 植入框架, 浏览器窃取, 现代RAT框架, 目标导入, 紫队, 红队, 网络流量审计, 网络签名, 虚拟化, 逆向工具, 隔离实验室