23 Commits

Author SHA1 Message Date
SREsAreHumanToo c78f0f3494 Surface clear HTTP status errors in sealed transports
The sealed transports (ntlmseal, krbseal) manage raw TCP connections
and bypass go-psrp's HTTP layer, so a server returning 404 or another
unexpected status produced cryptic messages like "no challenge" or
decryption failures instead of telling the user what actually happened.

ntlmseal now distinguishes a non-401 response (wrong URL, WinRM not
running) from a 401 without a Negotiate header (wrong auth scheme).
krbseal catches non-200/non-500 non-sealed responses before attempting
decryption, surfacing the status code and a body snippet.

Closes #1
2026-11-23 19:07:59 -05:00
SREsAreHumanToo 7b908574f9 Fix remaining golangci-lint findings: ineffassign, errcheck, SA1019 2026-11-21 13:14:40 -05:00
SREsAreHumanToo 3b313262aa Fix golangci-lint CI: suppress protocol-mandated crypto warnings, fix ineffassign 2026-11-21 13:12:55 -05:00
SREsAreHumanToo ac33f9ccd7 Run gofmt on three files missed by the worktree agent 2026-11-21 13:09:15 -05:00
SREsAreHumanToo e841249eb5 Note WDAC requirement in bypass-clm help text 2026-11-21 13:02:42 -05:00
SREsAreHumanToo d71e0a843c Obfuscate bypass-4msi patch bytes to evade Win11 25H2 Defender
Step 7/12 (the AMSI patch byte array) was caught by Defender signature
1.463.399.0 because the well-known stub bytes appeared as literals.
Replace them with per-invocation random arithmetic expressions so no
static byte pattern exists in the script.

Also fix the success message: report ScriptBlock logging as disabled
only when the _enableScriptBlockLogging field actually existed (it was
removed in recent Win11 builds, making the SBL step a no-op).

Tested against Win11 Pro 25H2 with Defender RT + Tamper Protection on.
2026-11-21 13:02:41 -05:00
SREsAreHumanToo 5b9dad5359 Fix British spellings: colour, behavioural, greyed, defence, cancelled 2026-11-21 11:22:42 -05:00
SREsAreHumanToo b7ebf79d86 Mention ScriptBlock logging in help text for bypass-4msi 2026-11-21 11:20:15 -05:00
SREsAreHumanToo fd904a0bbd Add bypass-clm command
Patches GetSystemLockdownPolicy to return 0 (FullLanguage) via
the same obfuscated multi-step template approach as bypass-4msi.
Ported from bypass-clm's C# implementation.
2026-11-21 11:11:47 -05:00
SREsAreHumanToo d70fd22b9e Disable ScriptBlock logging in bypass-4msi
Reflectively sets _enableScriptBlockLogging to 0 and
scriptBlockLoggingExplicitlyDisabled to true on the ScriptBlock type.
Ported from bypass-clm.
2026-11-21 11:08:11 -05:00
SREsAreHumanToo 81630165c3 Add ETW patching to bypass-4msi
Patches EtwEventWrite with a xor eax,eax; ret stub alongside the
existing AmsiScanBuffer patch, using the same VirtualProtect delegate.
Ported from bypass-clm's C# implementation.
2026-11-21 11:07:01 -05:00
SREsAreHumanToo 3445dfb2bf Add -q/--quiet flag to suppress Info: lines 2026-11-21 11:05:22 -05:00
SREsAreHumanToo 9122066233 Add table-driven tests for pure functions 2026-11-21 11:01:37 -05:00
SREsAreHumanToo 51e089398d Add -T/--timeout flag and WSMANCER_TIMEOUT env var 2026-11-21 11:00:17 -05:00
SREsAreHumanToo fe93a87582 Add environment variables section to --help 2026-11-21 10:58:58 -05:00
SREsAreHumanToo cc3b610b12 Seed bypass-4msi obfuscation from crypto/rand 2026-11-21 10:58:34 -05:00
SREsAreHumanToo 40149906a4 Extract parseNTHash to internal/psutil.ParseNTHash 2026-11-21 10:58:03 -05:00
SREsAreHumanToo 0a4f871578 Extract psQuote to internal/psutil.Quote 2026-11-21 10:56:56 -05:00
SREsAreHumanToo cdbe2cde35 Update dependencies and cut 0.1.2
go-psrp v0.1.0 -> v0.1.1 (its dependency/Go-floor alignment), plus
x/net, x/crypto, x/sys, x/term and go-winio bumps that clear 5 uncalled
x/net HTTP/2 advisories.
2026-10-24 18:16:34 -04:00
sresarehumantoo 833020f5de Update dependencies; raise Go floor to 1.26; cut 0.1.1 2026-09-27 18:08:41 -04:00
sresarehumantoo f5b3241ff7 Add GoReleaser: release binaries on tag push
Pushing a vX.Y.Z tag cross-compiles the 5 common targets and attaches archives
+ SHA256SUMS + SBOMs to the GitHub Release (.goreleaser.yml +
.github/workflows/release.yml). Version is stamped from the tag via -ldflags.
2026-08-13 22:24:57 -04:00
sresarehumantoo b5ac4f89be Depend on the published go-psrp fork; cut 0.1.0
Replace the vendored go-psrp-fork/ (11.5k LOC carrying 15 lines of transport
patches, wired via a replace directive) with a normal dependency on
github.com/sresarehumantoo/go-psrp v0.1.0 (a public fork of smnsjas/go-psrp,
MIT). No replace directive, so `go install` works; one module, so
`go test ./...` is complete. Also drops the -dev suffix from the version.
2026-08-13 14:45:53 -04:00
sresarehumantoo 2f1dbda6e1 wsmancer: initial public release (0.1.0)
An interactive WinRM shell for offensive Windows work, speaking the
PowerShell Remoting Protocol end to end. Command results come back as typed
objects (structured JSON on demand), and it authenticates against stock,
locked-down listeners: NTLM and Kerberos with WinRM message sealing that is
integrity-checked in both directions, pass-the-hash, and certificate auth.

Highlights:
  - -o json structured output; -x one-shot and -x - batch/session mode over
    one connection, built for automation as well as a prompt
  - context-aware Tab completion (local/remote paths, the target's own cmdlet
    names, and parameters/values via the target's TabExpansion2), ghost text
  - a session that recovers a dropped connection, and detects a shell the
    target has forgotten
  - the full evil-winrm post-ex set: -s scripts + menu, services,
    invoke-binary, donut-loader, bypass-4msi
  - SOCKS5 pivoting, TLS verification (--ca-cert / --accept-fingerprint /
    --insecure), client certs / mutual TLS

Every claim is live-verified against a real WinRM target; see
docs/verification.md. A Go port of Hackplayers/evil-winrm (LGPL-3.0), with all
20 of its flags and every post-ex command; PSRP transport builds on a patched
smnsjas/go-psrp (MIT), vendored under go-psrp-fork/.
2026-08-12 20:39:57 -04:00