Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
rosemary — Rosemary:基于 QUIC 的跨平台内核级跳板。无需 TUN/TAP。无需 proxychains。无需代理设置。 | Kitploit
工具/GitHubGitHub/blue0x1/rosemary
侦察横向移动网络安全渗透测试命令与控制红队DNS 分析
GitHubblue0x1/rosemary

rosemary

Rosemary:基于 QUIC 的跨平台内核级跳板。无需 TUN/TAP。无需 proxychains。无需代理设置。

查看仓库
12117天前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
网站

Rosemary

基于 QUIC 的跨平台内核级内网穿透平台。无需 TUN/TAP。无需 proxychains。无需设置代理。
Docs Go Version Go Report Card Release Downloads Stars


logo-dark

Rosemary 在远程主机上以内核级透明拦截流量:无需代理设置、无需 TUN/TAP 设备、无需 proxychains。Agent 通过 QUIC 回连服务器。你可以像直接接入远程网络一样访问整个远端网络。


目录

  • 工作原理
  • 功能特性
  • 支持平台
  • 截图
  • 快速开始
  • PowerShell 代理
  • 发布说明
  • CLI 参考
  • API
  • 构建
  • 安全
  • 许可证
  • 作者

工作原理

在你的机器上运行服务端,并在任意远程主机上部署Agent。Agent 通过 QUIC 回连,服务端为 Agent 的子网安装内核级拦截规则,此后发往这些子网的所有流量(包括 DNS)都会通过 Agent 透明转发,无需代理配置、无需 TUN 设备、无需修改 DNS 设置,也无需改动你的应用程序。

root@kitploit:~
curl http://192.168.1.50   ───►  agent dials 192.168.1.50 and bridges it back
ssh  [email protected]
ping 192.168.1.1

可以同时连接多个 Agent,流量会自动路由到拥有目标地址的那个 Agent。


功能特性


支持平台

Agent 可运行于上述所有平台。Agent 端无需 root 权限。


截图

显示截图

仪表盘 | Agent 拓扑视图

交互式网络拓扑图,展示已连接 Agent 及其关系

image

仪表盘 | 表格视图

详细的 Agent 信息,包括操作系统、主机名、子网和连接状态

image

Chrome 扩展

浏览器扩展,便于快速访问并通过隧道路由流量

image

安装方法:

  1. 打开 Chrome 并访问 chrome://extensions/
  2. 启用右上角的 开发者模式(切换开关)
  3. 点击 加载已解压的扩展程序
  4. 从仓库中选择 extension/ 文件夹

扩展图标将出现在浏览器工具栏中。

端口转发管理

通过任意 Agent 创建和管理 TCP/UDP 端口转发

image image

路由表


注意: 拓扑视图会自动布局 Agent 并可视化子网关系。Agent 之间的连线表示共享子网,从而实现多级跳板的可视化。


快速开始

安装

root@kitploit:~
# Install via go install
go install github.com/blue0x1/rosemary/rosemary@latest
go install github.com/blue0x1/rosemary/agent@latest # For install agent

# Copy to system path for sudo use
sudo cp ~/go/bin/rosemary /usr/local/bin/

或者从 Releases 下载预编译二进制文件。

1. 启动服务端

root@kitploit:~
# Auto-generate a key
sudo rosemary

# Or provide your own
sudo rosemary -key YOUR_BASE64_KEY

仪表盘可在 http://server-ip:1024 访问:使用你的密钥登录。

2. 部署 Agent

root@kitploit:~
# Standard QUIC/UDP mode (agent connects to server)
./agent-linux-amd64 -s server-ip:2048 -k YOUR_KEY

# Background mode
./agent-linux-amd64 -b -s server-ip:2048 -k YOUR_KEY

# Windows
agent-windows-amd64.exe -s server-ip:2048 -k YOUR_KEY

连接成功后,Agent 的子网将自动通过它进行路由。

3. Bind 模式(Agent 位于 NAT 之后)

root@kitploit:~
# On the agent host: agent listens for the server to connect
./agent-linux-amd64 -m agent-bind -l 0.0.0.0:9001 -k YOUR_KEY

# On the server CLI
rosemary> connect agent-ip:9001

4. PowerShell 代理(Invoke-Rosemary)

Invoke-Rosemary.ps1 同时支持出站 Agent 模式和 Bind 模式。Bind 模式可在旧版 Windows PowerShell 主机上运行。出站 Agent 模式使用 QUIC,需要 PowerShell 7 运行在提供 System.Net.Quic 和 libmsquic 的 .NET 运行时上。

root@kitploit:~
# Import
. .\Invoke-Rosemary.ps1

# Help
Invoke-Rosemary -Help

Invoke-Rosemary -Mode agent -Server 192.168.1.10:2048 -Key YOUR_KEY

Invoke-Rosemary -Mode agent-bind -Listen 0.0.0.0:9001 -Key YOUR_KEY

Invoke-Rosemary -Mode agent -Server 192.168.1.10:2048 -Key YOUR_KEY -Background

Invoke-Rosemary -Mode agent -Server 192.168.1.10:2048 -Key YOUR_KEY -Verbose

使用 PowerShell 出站模式前,请检查 QUIC 支持:

root@kitploit:~
[type]::GetType('System.Net.Quic.QuicConnection, System.Net.Quic') -ne $null
[System.Net.Quic.QuicConnection]:https://raw.githubusercontent.com/blue0x1/rosemary/HEAD/:IsSupported

如果任一检查失败,请使用 Go Windows Agent 进行出站模式,或以 agent-bind 模式运行 PowerShell Agent。

参数

5. 出口流量:路由所有互联网流量

root@kitploit:~
rosemary> egress agent-1
[+] Default egress set to agent-1

所有指向已知 Agent 子网之外 IP 的流量现在都会通过 agent-1 转发。DNS 对于私有和公共域名继续正常工作。


发布说明

本版本将出站 Agent 迁移至 QUIC/UDP 传输,保留 Bind Agent 的加密 TCP 帧,更新了 PowerShell Agent 以支持两种模式,并刷新了 CLI 列表输出,为 Agents、路由、转发、反向转发、SOCKS5 代理和 API 令牌提供对齐一致的表格。

兼容性说明:

  • 现有 WebSocket/smux Agent 必须替换为新的 Go Agent。
  • PowerShell 出站模式需要 PowerShell 7 并支持 .NET QUIC。
  • PowerShell Bind 模式仍是 Windows PowerShell 5.1 主机的后备方案。

CLI 参考

在 REPL 中输入 help 或 help <command> 获取完整详情。

Agent 管理

root@kitploit:~
agents                         List all connected agents
disconnect <agent-id|all>      Disconnect agent(s)
reconnect  <agent-id>          Force agent to reconnect
connect    <ip:port>           Connect to a bind-mode agent

路由管理

root@kitploit:~
routes                         Show routing table
routes enable  <subnet>        Re-enable a disabled route
routes disable <subnet>        Disable a route without disconnecting
routes default <agent-id>      Set default egress agent
routes default off             Clear default egress
egress <agent-id>              Alias: set default egress agent
egress none                    Alias: clear default egress

端口转发

root@kitploit:~
forward add <local-port> <agent-id> <host> <port> [tcp|udp]
forward del <id>
forwards                       List active forwards

反向转发

root@kitploit:~
rforward add <listen-port> <agent-id> <host> <port>
rforward del <id>
rforward list

SOCKS5

root@kitploit:~
socks <agent-id> <port> [username] [password]
socks list
socks stop <id>

发现

root@kitploit:~
ping     <agent-id> <target> [count]
discover <agent-id> <subnet> [timeout_ms] [workers]
portscan <agent-id> tcp|udp <target> [ports]

服务端

root@kitploit:~
settings                       Show current config
verbose                        Toggle debug logging
rotate-key                     Regenerate encryption key
save-config <path>             Export config to JSON
load-config <path>             Import config from JSON
token list|create|view|revoke  Manage API tokens
exit                           Shutdown

API

完整 API 参考

包含示例的完整端点文档位于:

root@kitploit:~
http://<server>:1024/docs

认证一次以获取令牌,之后所有请求均可使用该令牌。

root@kitploit:~
# Authenticate
curl -X POST http://server:1024/api/v1/auth \
  -H "Content-Type: application/json" \
  -d '{"key":"YOUR_KEY"}'

# List agents
curl -H "Authorization: Bearer tun_xxx" \
  http://server:1024/api/v1/agents

# Port forward
curl -X POST http://server:1024/api/v1/forwards \
  -H "Authorization: Bearer tun_xxx" \
  -H "Content-Type: application/json" \
  -d '{"action":"add","agent_id":"agent-1","local_port":8080,"target_host":"192.168.1.10","target_port":80}'

# SOCKS5 proxy
curl -X POST http://server:1024/api/v1/socks \
  -H "Authorization: Bearer tun_xxx" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"agent-1","port":1080}'

# Run any CLI command
curl -X POST http://server:1024/api/v1/cli \
  -H "Authorization: Bearer tun_xxx" \
  -H "Content-Type: application/json" \
  -d '{"command":"discover agent-1 10.10.10.0/24"}'

端点: /api/v1/auth · /api/v1/agents · /api/v1/routes · /api/v1/forwards · /api/v1/rforwards · /api/v1/socks · /api/v1/cli · /api/v1/settings · /api/v1/tokens · /api/v1/shutdown

令牌权限级别:read · write · admin


构建

root@kitploit:~
git clone https://github.com/blue0x1/rosemary.git
cd rosemary

# Build all platforms and architectures
bash build.sh

# Build specific target
bash build.sh rosemary linux amd64
bash build.sh agent  windows arm64

# Output goes to dist/

支持的架构:

  • linux, freebsd, openbsd: amd64 arm64 arm 386
  • windows: amd64 arm64 386
  • darwin: amd64 arm64

Windows 服务端:WinDivert 要求

Windows 服务端使用 WinDivert 进行内核级数据包拦截。构建之前:

  1. 从 reqrypt.org/windivert.html 下载 WinDivert.dll 和 WinDivert64.sys(v2.x,64 位)
  2. 将这两个文件放入 rosemary/ 目录

它们会在构建时嵌入到二进制文件中。


安全

  • 加密:所有 Agent ↔ 服务端通信均使用 AES-256-GCM
  • 认证:基于共享密钥的 Agent 传输认证
  • 仪表盘:基于会话的登录,并受 CSRF 令牌保护
  • API 令牌:限定作用域的权限:read / write / admin
  • 权限分离:Agent 无需 root 权限;只有服务端需要提升权限

许可证

GNU 通用公共许可证 v3.0:参见 LICENSE


作者

blue0x1 (Chokri Hammedi)

GitHub · 赞助
Buy Me A Coffee


仅可在你拥有或已获得明确书面授权测试的系统上使用。禁止未经授权使用。

下载工具
类别能力
流量拦截透明 TCP · UDP · ICMP · DNS,无需客户端配置
出口流量默认出口 Agent 将所有互联网流量经由选定的 Agent 路由
SOCKS5每个 Agent 可启用 SOCKS5 代理,支持可选的用户名/密码认证
端口转发TCP/UDP 端口转发 · 反向端口转发(服务端监听,Agent 拨号)
发现Ping · Ping 扫描 · 通过 Agent 进行 TCP/UDP 端口扫描
DNS拦截 DNS,通过 Agent 解析私有和公共域名
跳板多级跳板,支持多个 Agent(已测试 5+ 跳)
传输QUIC/UDP 出站 Agent · 加密 TCP bind Agent
仪表盘Web UI,实时 Agent 拓扑图、路由表、日志查看器
API完整的 REST API,基于令牌认证(read/write/admin)
CLI交互式 REPL + Web 版 CLI 面板
扩展Chrome 扩展,便于快速访问
Agent后台模式 · bind 模式 · 自动子网发现 · 互联网检测
配置JSON 导入/导出 · 在线密钥轮换 · 按端口配置
平台TCPUDPDNSICMPSOCKS5Egress
Linux✓✓✓✓✓✓
Windows✓✓✓✓✓✓
macOS✓✓✓✓✓✓
FreeBSD✓✓✓✓✓✓
OpenBSD✓✓✓✓✓✓

查看并切换子网路由,实时显示状态

image

CLI 面板

内置 REPL,用于完整控制服务端

image

Web CLI 面板

image

日志面板

实时事件流,支持过滤和导出选项

image

SOCKS5 代理管理

通过任意 Agent 启动/停止 SOCKS5 代理,支持可选认证

image

设置弹窗

配置服务端端口、加密密钥和 API 令牌 image

API 令牌

创建和管理具有细粒度权限的 REST API 令牌

image

Agent 右键菜单

快速操作:标记、转发、Ping、端口扫描、重连、断开

image
参数描述
-KeyBase64 加密密钥 - 必须与服务端一致
-Modeagent(出站)或 agent-bind(入站)
-Server服务端地址 host:port - agent 模式必需
-Listenagent-bind 模式的绑定地址(默认 0.0.0.0:9001)
-Background以隐藏后台进程方式重新启动并立即返回
-Verbose显示连接和会话诊断输出