Hey everyone,
I just released nim-winrm, a native WinRM client library for Nim.
It implements the full WinRM protocol stack in a single file with zero external Nim dependencies:
- NTLMv2 authentication (password and pass-the-hash)
- Kerberos authentication via GSSAPI
- PSRP (PowerShell Remoting Protocol) with runspace management
- WinRS (Windows Remote Shell) for CMD execution
- NTLM message encryption (sealing) over HTTP
- Chunked file transfers with progress tracking
- .NET managed assembly detection
- Native crypto: MD4, MD5, HMAC-MD5, RC4
Quick example:
import winrm
- var client = newClient(
- host = "192.168.1.10", user = "CORP\admin", pass = "Password123", ntHash = "", spn = "", domain = "", auth = amNtlm, ssl = false, port = 5985
)
warmSmartShell(client) echo runCmd(client, "whoami", isCmd = false) deleteShell(client)
Install:
nimble install https://github.com/blue0x1/nim-winrm
Nimble directory registration is pending: https://github.com/nim-lang/packages/pull/3341
Links:
- Repository: https://github.com/blue0x1/nim-winrm
- Wiki: https://github.com/blue0x1/nim-winrm/wiki
- nimrm (CLI tool built on this library): https://github.com/blue0x1/nimrm
Feedback and contributions welcome.