winrm-pentest
Async WinRM 2.0 (WS-Management, MS-WSMV) client for offensive-security work
in Rust. NTLM / Kerberos / CredSSP auth, remote PowerShell shells,
-EncodedCommand execution, streaming stdout, and SMB-free file upload via
base64-chunked <rsp:Send>. Cross-platform reboot of the Evil-WinRM surface,
minus the Ruby.
Status
0.1.0-dev — pre-alpha, expect breaking changes before 0.1.0. Part of the
icedracon Rust offensive AD ecosystem.
What it does
Talks WS-Management directly over HTTP(S) — no winrs.exe, no PowerShell
Remoting on the client side, no OpenSSH. Byte-deterministic WSMan envelope
builders (Create / Command / Send / Receive / Signal / Delete)
sit under a small [WinRmClient] surface, driven by a full three-legged
HTTP-Negotiate NTLM handshake (via [ntlmssp]) with native support for
pass-the-hash from a 32-hex NT hash or a LM:NT secretsdump pair.
Because it is Rust reqwest + tokio on top, it runs on Linux and macOS as
well as Windows — an authenticated pivot from a non-Windows attacker box.
Usage
use WinRmClient;
# async
Pass-the-hash — call auth_ntlm with a 32-hex NT hash (or LM:NT) as the
password argument; the NTLMSSP driver treats it as an NT-hash secret rather
than hashing it again.
What works / what does not (this version)
- Working: byte-deterministic WSMan envelope builders (round-trip tested);
full NTLM Negotiate → Challenge → Authenticate over HTTP, including PtH
from
nthashorLM:NT; PowerShell-EncodedCommandUTF-16LE helper + deflate-then-b64 payload for scripts that overflow the 512 KB envelope cap; stable [WinRmClient] API surface. - Stubbed: HTTP sign+seal
(
multipart/encrypted; protocol="application/HTTP-SPNEGO-session-encrypted") — blocks WinRM over plaintext 5985 whenAllowUnencrypted=false(Windows default). Use HTTPS (5986) meanwhile.receive_streamreturns an immediately-empty stream;upload_filereturnsError::Unsupported;invoke_psruns the command but reports empty stdout / exit=0 until the sign+seal layer lands. - Not yet: full CredSSP transport (the sibling
credsspcrate wires up the pump; WSMV encryption on top is still open); Kerberos ticket transport (needs a picky-krb-style KDC client — will land withms-kile).
Everything above the "working" line is fair game to fail on non-toy targets.
Dependency posture
S-tier. Nine runtime deps total: ntlmssp, credssp (sibling path),
reqwest (rustls-tls only), tokio, quick-xml, base64, flate2,
futures-util, thiserror. No serde, no serde-xml-rs, no uuid crate —
WSMan envelopes are hand-rolled strings and UUIDv4s are 20 LOC.
Related icedracon crates
windows-wmi-com— in-process WMI via COM (~10x faster than DCOM-over-RPC for local queries).windows-eventlog-native— liveEvtQuery/EvtSubscribewrapper for Security/System/Application channels.
Cluster: Windows-native higher-level admin surfaces. winrm-pentest is the
cross-platform remoting piece; the other two are cfg(windows)-only local
telemetry.
License
MIT (c) 2026 zevs