
Rosemary: Cross-platform kernel-level pivoting over QUIC. No TUN/TAP. No proxychains. No proxy settings.
Cross-platform kernel-level pivoting platform over QUIC. No TUN/TAP. No proxychains. No proxy settings.
Rosemary transparently intercepts traffic on remote hosts at the kernel level: no proxy settings, no TUN/TAP devices, no proxychains. Agents connect back to the server over QUIC. You reach the entire remote network as if you were directly on it.
Run the server on your machine and deploy an agent on any remote host. The agent connects back over QUIC, the server installs kernel-level interception rules for the agent's subnets, and from that point all traffic to those subnets, including DNS, is transparently forwarded through the agent, no proxy config, no TUN device, no DNS settings to change, no changes to your applications.
curl http://192.168.1.50 ───► agent dials 192.168.1.50 and bridges it back
ssh [email protected]
ping 192.168.1.1
Connect multiple agents at once and traffic is automatically routed to whichever agent owns the destination.
Agent runs on all platforms above. No root required on the agent side.
Interactive network graph showing connected agents and their relationships
Detailed agent information including OS, hostname, subnets, and connection status
Browser extension for easy access and traffic routing through the tunnel
Installation:
chrome://extensions/extension/ folder from the repositoryThe extension icon will appear in your browser toolbar.
Create and manage TCP/UDP port forwards through any agent
Note: The graph view automatically layouts agents and visualizes subnet relationships. Edges between agents indicate shared subnets, enabling multi-hop pivoting visualization.
# 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/
Or download pre-built binaries from Releases.
# Auto-generate a key
sudo rosemary
# Or provide your own
sudo rosemary -key YOUR_BASE64_KEY
Dashboard available at http://server-ip:1024: log in with your key.
# 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
Once connected, the agent's subnets are automatically routed through it.
# 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
Invoke-Rosemary.ps1 supports both outbound agent mode and bind mode. Bind mode works on legacy Windows PowerShell hosts. Outbound agent mode uses QUIC and requires PowerShell 7 on a .NET runtime where System.Net.Quic and libmsquic are available.
# 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
Check QUIC support before using PowerShell outbound mode:
[type]::GetType('System.Net.Quic.QuicConnection, System.Net.Quic') -ne $null
[System.Net.Quic.QuicConnection]:https://raw.githubusercontent.com/blue0x1/rosemary/HEAD/:IsSupported
If either check fails, use the Go Windows agent for outbound mode or run the PowerShell agent in agent-bind mode.
rosemary> egress agent-1
[+] Default egress set to agent-1
All traffic to IPs outside known agent subnets now flows through agent-1. DNS continues to work for both private and public domains.
This version moves outbound agents to QUIC/UDP transport, keeps bind agents on encrypted TCP framing, updates the PowerShell agent for both modes, and refreshes CLI list output with consistently aligned tables for agents, routes, forwards, reverse forwards, SOCKS5 proxies, and API tokens.
Compatibility notes:
Type help or help <command> inside the REPL for full details.
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
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
forward add <local-port> <agent-id> <host> <port> [tcp|udp]
forward del <id>
forwards List active forwards
rforward add <listen-port> <agent-id> <host> <port>
rforward del <id>
rforward list
socks <agent-id> <port> [username] [password]
socks list
socks stop <id>
ping <agent-id> <target> [count]
discover <agent-id> <subnet> [timeout_ms] [workers]
portscan <agent-id> tcp|udp <target> [ports]
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
Complete API Reference
Full endpoint documentation with examples is available at:
http://<server>:1024/docs
Authenticate once to get a token, then use it for all requests.
# 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"}'
Endpoints: /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
Token permission levels: read · write · admin
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/
Supported architectures:
amd64 arm64 arm 386amd64 arm64 386amd64 arm64The Windows server uses WinDivert for kernel-level packet interception. Before building:
rosemary/ directoryThey are embedded into the binary at build time.
read / write / adminGNU General Public License v3.0: see LICENSE
blue0x1 (Chokri Hammedi)
Use only on systems you own or have explicit written permission to test. Unauthorized use is prohibited.
| Category | Capability |
|---|
| Interception | Transparent TCP · UDP · ICMP · DNS, no client config required |
| Egress | Default egress agent routes all internet traffic through a chosen agent |
| SOCKS5 | Per-agent SOCKS5 proxy with optional username/password auth |
| Forwards | TCP/UDP port forwards · Reverse port forwards (server listens, agent dials) |
| Discovery | Ping · Ping sweep · TCP/UDP port scan via agent |
| DNS | Intercepts DNS, resolves through agents, private and public domains |
| Pivoting | Multi-hop through multiple agents (5+ hops tested) |
| Transport | QUIC/UDP outbound agents · encrypted TCP bind agents |
| Dashboard | Web UI with real-time agent graph, routing table, log viewer |
| API | Full REST API with token-based auth (read/write/admin) |
| CLI | Interactive REPL + web-based CLI panel |
| Extension | Chrome extension for quick access |
| Agents | Background mode · bind mode · auto subnet discovery · internet detection |
| Config | JSON import/export · live key rotation · per-port configuration |
| Platform | TCP | UDP | DNS | ICMP | SOCKS5 | Egress |
|---|
| Linux | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Windows | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| macOS | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| FreeBSD | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| OpenBSD | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |

View and toggle subnet routes with real-time status

Built-in REPL for full server control


Real-time event streaming with filtering and export options

Start/stop SOCKS5 proxies through any agent with optional authentication

Configure server ports, encryption keys, and API tokens

Create and manage REST API tokens with granular permissions

Quick actions: tag, forward, ping, port scan, reconnect, disconnect

| Parameter | Description |
|---|
-Key | Base64 encryption key - must match the server |
-Mode | agent (outbound) or agent-bind (inbound) |
-Server | Server address host:port - required in agent mode |
-Listen | Bind address for agent-bind mode (default 0.0.0.0:9001) |
-Background | Relaunch as a hidden background process and return immediately |
-Verbose | Show connection and session diagnostic output |