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 listenerAuthorized 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 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'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 .NETClientWebSocketclass, 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.exeandcmd.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 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 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