Skip to content

v1.2.4

Choose a tag to compare

@uziii2208 uziii2208 released this 23 Aug 19:59
· 19 commits to master since this release

What's Changed

Critical Fix - PSRP Wire Format runspace.py

  • run_command - 100% pipeline failure on Windows Server 2025 WinRM (w:InternalError / w:InvalidSelectors): The custom MS-PSRP fragmentation layer in _fragment() encoded Runspace/Pipeline GUIDs as 32-byte ASCII hex strings instead of the 16-byte binary format required by MS-PSRP spec §2.2.1. Additionally, rsp:ShellId in the Create request body was hardcoded to "http://localhost/wsman" (the ResourceURI value) instead of a valid UUID, causing Windows to invalidate the shell immediately after creation. Combined, these two defects caused _create_pipeline() to receive w:InternalError on first command dispatch and w:InvalidSelectors on all subsequent commands - 100% failure rate on Windows Server 2025. Windows Server builds may have been more lenient and partially functional. Fixed by replacing the custom PSRP implementation with pypsrp as the PSRP backend while retaining PwnRM's own SPNEGO/Kerberos/CredSSP/ClientCert transport layer for authentication. Affected runspace.py entirely.

  • __enter__ - bare _receive() calls crash shell init on Windows Server 2025: Two _receive() calls in __enter__ were issued without a CommandId, which Windows Server WinRM rejects with w:InternalError at the shell init stage. After the first receive failed, the shell was invalidated by the server - every subsequent request returned w:InvalidSelectors. Resolved as part of the PSRP backend replacement.

Dependency

  • Added pypsrp>=0.8.0 to requirements.txt and pyproject.toml.

Full Changelog: v1.2.1...v1.2.4