Repository navigation
v1.2.1
What's Changed
Bug Fixes - Post-Exploitation Modules (adtriage.py, sessions.py, shares.py, pwnshell.py)
-
!adtriage/!sessions/!shares-[bool]::ParseFormatException (100% failure rate): Template substitution in all three resource loaders was replacing'__QUICK__'(with surrounding single quotes) instead of the inner token__QUICK__, stripping the quotes the.ps1template already provides. The emitted PowerShell was[bool]::Parse($false)/[bool]::Parse(True)depending on attempt - both are invalid inputs to the CLR static method, which strictly requires"True"or"False"as quoted string literals. Fixed by targeting__QUICK__(no quotes) in all three loaders so the template's existing single quotes are preserved, producing well-formed[bool]::Parse('True')/[bool]::Parse('False')output. Affectedadtriage.py:16,sessions.py:15,shares.py:18. -
!shares- Silent no-op on default invocation (@('')array clobber): When!sharesis called without explicit targets,shares.pysubstituted an empty string into@('__TARGETS__'), producing@('')- a one-element PowerShell array containing an empty string.$Targets.Countevaluated to1, satisfying theCount -gt 0branch and bypassing both AD domain controller discovery and local WMI share enumeration entirely - zero output, zero error. Fixed by replacing the entire@('__TARGETS__')expression with@()on the no-target path, correctly producing an empty array and allowing the intended discovery branches to execute. Affectedshares.py:18–25,shares.ps1:210. -
!amsi- Silent bypass failure via[ref]$nullinVirtualProtectout-parameter:amsi_bypass()passed[ref]$nullas thelpflOldProtectout-parameter toVirtualProtect.$nullis a read-only automatic variable in PowerShell - the CLR marshaler cannot write the returneduintinto it, throwingCannot set the Value property for a Reference object whose Value is not a variable. As a result,VirtualProtectfailed to markAmsiScanBufferas writable, the subsequentMarshal::Copyhit a write-protected page, and the bypass silently failed while the shell still printed[+] AMSI bypass applied.Fixed by declaring a typed mutable variable$old = [uint32]0before each call and passing[ref]$old. Affectedpwnshell.py:431–435. -
!netrun-TargetParameterCountExceptionon zero-argument invocation: When!netrunwas called with a URL and no trailing arguments, the no-args branch selectedEntryPoint.Invoke($null, $null). For any assembly with a standardMain(string[] args)entry point (one parameter), the CLR reflection API requires exactly one argument - passing$nullthrowsSystem.Reflection.TargetParameterCountException: Parameter count mismatch, aborting execution before the assembly runs. Fixed by dynamically inspectingEntryPoint.GetParameters().Length: zero-parameter entry points useInvoke($null, $null); one-parameter entry points useInvoke($null, [object[]](,[string[]]@())), supplying a valid empty string array. Affectedpwnshell.py:494.
Full Changelog: v1.2.0...v1.2.1