You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Powershell payloads were generating using the :generate method
mixed in from Payload::Windows::Exec which is a binary payload
mixin.
Address the breakage by implementing a generate method which simply
outputs the script code produced by the module with no additional
content prepended or appended.
While here, cleanup the commandline generation for the script being
produced by having Rex do it (this permits changes made in Rex to
benefit all consumers).
As a bonus, drop the IEX invocation since it'll trip up AMSI and
upgrade to the scripblock execution semantic.
Credit for finding this little gem goes to bperry - i dont usually
use the native powershell command shells, and managed to miss this
for a long time. Thanks boss.
Testing:
Local in pry
@bperry: Could you test and ping me back if this is right?
0 commit comments