vesche/dropfu

GitHub: vesche/dropfu

基于 Zig 的跨平台远程事件响应工具包,通过轻量级 Agent 和 Web 控制台实现端点远程管理与命令执行

Stars: 0 | Forks: 0

# dropfu 跨平台事件响应工具包。在目标端点上部署轻量级 agent,通过中继服务器协调操作,并通过快速的 Web 命令界面驱动一切。 ``` ┌──────────────┐ WSS ┌──────────────┐ WSS ┌──────────────┐ │ dropfu-client│◄────────────►│ dropfu-server│◄────────────►│ dropfu-agent │ │ (SolidJS) │ port 8443 │ (Zig) │ port 9443 │ (Zig) │ └──────────────┘ └──────┬───────┘ └──────────────┘ │ hosts ┌──────▼───────┐ │dropfu-plugins│ │ (Python) │ └──────────────┘ ``` ## 组件 | 组件 | 语言 | 用途 | |-----------|----------|---------| | [dropfu-agent](dropfu-agent/) | Zig | 端点 agent —— 执行命令、流式传输 shell、传输文件 | | [dropfu-server](dropfu-server/) | Zig | 中继服务器 —— 在 client 和 agent 之间路由消息,托管插件 | | [dropfu-client](dropfu-client/) | TypeScript/SolidJS | Web UI —— 带有平铺窗格管理器的命令控制台 | | [dropfu-plugins](dropfu-plugins/) | Python | 可扩展插件库 —— 编译为字节码 zipapps | ## 快速开始 ### 前置条件 - [Zig](https://ziglang.org/download/) >= 0.15 - [Node.js](https://nodejs.org/) >= 20 (用于 client) - [Python](https://python.org/) >= 3.10 (用于插件) - pip 包: `psutil` (agent 上的 ps 插件需要) - npm ### 构建所有内容 ``` # 构建服务器 cd dropfu-server && zig build && cd .. # 构建代理 cd dropfu-agent && zig build && cd .. # 构建插件 cd dropfu-plugins && python3 tools/build_plugins.py && cd .. # 安装客户端依赖 cd dropfu-client && npm install && cd .. ``` ### 运行 (开发) 在本地运行所有内容的最快方法: ``` bash scripts/dev_up.sh ``` 这将启动 server、一个本地 agent 和 client 开发服务器。在浏览器中打开 `http://localhost:3000`。 或者手动启动每个组件: ``` # 终端 1 — 服务器 cd dropfu-server mkdir -p plugins && cp ../dropfu-plugins/dist/*.pyz plugins/ ./zig-out/bin/dropfu-server # 终端 2 — Agent cd dropfu-agent DROPFU_SERVER_HOST=127.0.0.1 DROPFU_SERVER_PORT=9443 ./zig-out/bin/dropfu-agent # 终端 3 — 客户端 cd dropfu-client npx vite --port 3000 ``` ### TLS (生产) 1. 生成证书: bash scripts/gen_certs.sh ./certs 2. 在 server 前面放置 nginx 或 caddy 反向代理以进行 TLS 终结。有关示例 nginx 配置,请参阅 [dropfu-server/README.md](dropfu-server/README.md)。 3. 将 agent 指向 TLS 端点,将 client 指向 WSS URL。 ## 跨平台 Agent 构建 Zig 使交叉编译变得简单: ``` cd dropfu-agent # Windows x86_64 zig build -Dtarget=x86_64-windows -Doptimize=ReleaseSmall # macOS ARM zig build -Dtarget=aarch64-macos -Doptimize=ReleaseSmall # Linux ARM zig build -Dtarget=aarch64-linux -Doptimize=ReleaseSmall ``` ### 以 Root/管理员权限运行 | 平台 | 命令 | |----------|---------| | Linux / macOS | `sudo ./dropfu-agent` | | Windows (cmd) | 以管理员身份运行 cmd,然后执行 `dropfu-agent.exe` | | Windows (PowerShell) | 以管理员身份运行 PowerShell,然后执行 `.\dropfu-agent.exe` | ## 客户端 UI Web 界面功能包括: - **可折叠的 agent 侧边栏** —— 列出所有已连接的 agent,显示主机名、操作系统、架构和权限级别。 - **命令控制台** —— 绑定到所选 agent 的类终端界面。 - **平铺窗格管理器** —— 使用键盘快捷键拆分和管理窗格: - `Shift + 箭头` 向该方向拆分窗格 - `Shift + Delete` 关闭活动窗格 - `Shift + Ctrl + 箭头` 在窗格之间导航 - `Shift + Backspace` 清屏 ## Agent 命令 有关完整的命令参考,请参阅 [dropfu-agent/README.md](dropfu-agent/README.md)。 ## 插件开发 有关编写和打包新插件的说明,请参阅 [dropfu-plugins/README.md](dropfu-plugins/README.md)。 ## 项目结构 ``` dropfu/ ├── dropfu-agent/ Zig agent binary │ └── src/ ├── dropfu-server/ Zig server binary │ └── src/ ├── dropfu-client/ SolidJS web frontend │ └── src/ ├── dropfu-plugins/ Python plugin library │ ├── plugins/ │ ├── tools/ │ └── dist/ Built .pyz artifacts ├── scripts/ │ ├── gen_certs.sh Generate self-signed TLS certs │ └── dev_up.sh Start all components locally └── README.md ```
标签:C2框架, Google搜索, IP 地址批量处理, PB级数据处理, PE 加载器, Python, Web界面, WSS通信, Zig, 安全学习资源, 安全运维, 文件传输, 无后门, 端点安全, 网络中继, 网络信息收集, 补丁管理, 轻量级代理, 远程Shell, 远程命令执行, 远程控制, 逆向工具