Catch a Windows PowerShell connection with a ConPTY listener
Free, and no account needed for one session. Create a listener and follow along.
Create a listenerAuthorized use only. Use RevSheller only on CTFs, your own labs, training platforms and engagements where you have permission.
The problem with Windows shells
Getting a usable shell back from a Windows lab machine is harder than on Linux. A plain netcat connection to cmd.exe or powershell.exe is a pipe, not a console. There is no line editing worth the name, Ctrl+C can kill the whole connection, programs that expect a console behave oddly, and screen-oriented tools do not render. Many Windows lab boxes also have no Python installed, which rules out Python-based clients.
RevSheller ships a PowerShell client that needs nothing but the PowerShell already on the machine, and it hosts the program behind a Windows pseudoconsole so you get a terminal rather than a pipe.
How it works
- You create a session on revsheller.com and copy the Windows payload. The API returns it as
payloads.auto_windows, and it can be encoded withpowershell_b64for use with-EncodedCommandwhen quoting is awkward. See the API docs. - You run it on the lab machine you are authorized to test. It is 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 WebSocket URL for the session and downloads the PowerShell client,
rs-powershell-ws.ps1. This is pure PowerShell using the .NETClientWebSocketclass, so no Python is required on the target. - The client connects out over WSS on port 443 with a per-session token carried as a WebSocket subprotocol, never in the URL.
- It picks the first shell it finds from
powershell.exe,pwsh.exeandcmd.exe, starts it behind a ConPTY pseudoconsole and relays everything to your browser terminal.
Because the connection is outbound HTTPS-style traffic, it works from a Windows VM behind NAT with no inbound rules. If the lab machine cannot reach the internet at all, use the bridge agent from your VPN-connected machine (see the THM and HTB guide).
What a full PTY on Windows gives you
- A real console, not a pipe. The shell runs inside a pseudoconsole, so it believes it has a terminal. Console applications behave as they would at a local prompt.
- Terminal resizing. Resizing the browser terminal sends a resize message and the client resizes the pseudoconsole, so wide output and full-screen console programs lay out correctly.
- Interactive programs. Prompts, pagers and tools that read keystrokes directly work far better than over redirected pipes.
- Control keys. Ctrl+C reaches the running program through the console, rather than tearing down your connection.
- Colour and cursor handling. Escape sequences render in the xterm.js terminal in your browser.
The client launches PowerShell with -NoLogo -NoProfile -NoExit and removes the PSReadLine module for the session. Without that, each keystroke would echo twice when input arrives through the pseudoconsole's pipe. The practical effect is that you do not get PSReadLine niceties such as syntax colouring and predictive history, and the profile is not loaded.
Requirements and fallbacks
- ConPTY needs Windows 10 version 1809 or later. On older systems the client falls back to pipe-based I/O. It still connects, but you lose the full-terminal behaviour above.
- PowerShell is needed on the target to run the stager. Execution policy, AppLocker, Constrained Language Mode and endpoint protection can all stop it from running. Those are properties of your lab, not something RevSheller works around.
- Outbound HTTPS to revsheller.com must be allowed from the target.
- Session limits apply. Idle sessions time out (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, a Windows box in a training platform you are enrolled in, or a host explicitly in your scope document. When you finish, delete the session in the interface so the token stops working. Shell I/O is relayed live to your browser and is not stored.
FAQ
Does the Windows target need Python?
No. The Windows stager and client are pure PowerShell using .NET ClientWebSocket.
What is ConPTY?
The Windows pseudoconsole API, available from Windows 10 version 1809. It hosts a console program behind a real terminal interface.
What happens on older Windows?
The client falls back to pipe-based I/O. It works, but without full terminal behaviour.
Can I use it on any machine?
Only on systems you own or have explicit permission to test. See the Terms of Service.
Ready to try it? One click creates a listener; you paste one command on a machine you are authorized to test.
Create a listener