Oracle GlassFish Server Administration Console GET Request Authentication Bypass - Nessus

Critical   Plugin ID: 55931

This page contains detailed information about the Oracle GlassFish Server Administration Console GET Request Authentication Bypass Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 55931
Name: Oracle GlassFish Server Administration Console GET Request Authentication Bypass
Filename: glassfish_get_auth_bypass.nasl
Vulnerability Published: 2011-04-19
This Plugin Published: 2011-08-17
Last Modification Time: 2021-01-19
Plugin Version: 1.18
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: glassfish_console_detect.nasl
Required KB Items [?]: www/glassfish, www/glassfish/console

Vulnerability Information


Severity: Critical
Vulnerability Published: 2011-04-19
Patch Published: 2011-04-20
CVE [?]: CVE-2011-0807
CPE [?]: cpe:/a:oracle:glassfish_server

Synopsis

The remote web server has an authentication bypass vulnerability that may permit code execution.

Description

The version of GlassFish Server running on the remote host has an authentication bypass vulnerability. The server fails to enforce authentication on HTTP requests that contain lower case method names (e.g. 'get').

A remote, unauthenticated attacker could exploit this to upload and execute arbitrary code.

Solution

Upgrade to GlassFish Server 3.1 or later.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Oracle GlassFish Server Administration Console GET Request Authentication Bypass vulnerability:

  1. Metasploit: exploit/multi/http/glassfish_deployer
    [Sun/Oracle GlassFish Server Authenticated Code Execution]
  2. Metasploit: auxiliary/scanner/http/glassfish_login
    [GlassFish Brute Force Utility]
  3. Exploit-DB: exploits/jsp/webapps/17615.rb
    [EDB-17615: Sun/Oracle GlassFish Server - (Authenticated) Code Execution (Metasploit)]
  4. GitHub: https://github.com/ACIC-Africa/metasploitable3
    [CVE-2011-0807]

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-2011-0807
CVSS V2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:POC/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:7.8 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.8 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:P/RL:O/RC:C
CVSS Base Score:10.0 (Critical)
Impact Subscore:6.0
Exploitability Subscore:3.9
CVSS Temporal Score:9.0 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.0 (Critical)

Go back to menu.

Plugin Source


This is the glassfish_get_auth_bypass.nasl nessus plugin source code. This script is Copyright (C) 2011-2021 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(55931);
  script_version("1.18");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/19");

  script_cve_id("CVE-2011-0807");
  script_bugtraq_id(47438);
  script_xref(name:"EDB-ID", value:"17615");

  script_name(english:"Oracle GlassFish Server Administration Console GET Request Authentication Bypass");
  script_summary(english:"Bypasses authentication and accesses a page which permits code execution.");

  script_set_attribute(
    attribute:"synopsis",
    value:
"The remote web server has an authentication bypass vulnerability
that may permit code execution."
  );
  script_set_attribute(
    attribute:"description",
    value:
"The version of GlassFish Server running on the remote host has an
authentication bypass vulnerability. The server fails to enforce
authentication on HTTP requests that contain lower case method names
(e.g. 'get').

A remote, unauthenticated attacker could exploit this to upload and
execute arbitrary code."
  );
  #https://www.oracle.com/technetwork/topics/security/cpuapr2011-301950.html
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?93e12960");
  script_set_attribute(
    attribute:"see_also",
    value:"https://www.zerodayinitiative.com/advisories/ZDI-11-137/"
  );
  script_set_attribute(
    attribute:"solution",
    value:"Upgrade to GlassFish Server 3.1 or later."
  );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2011-0807");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Sun/Oracle GlassFish Server Authenticated Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2011/04/19");
  script_set_attribute(attribute:"patch_publication_date", value:"2011/04/20");
  script_set_attribute(attribute:"plugin_publication_date", value:"2011/08/17");

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

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

  script_copyright(english:"This script is Copyright (C) 2011-2021 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_dependencies("glassfish_console_detect.nasl");
  script_require_keys("www/glassfish", "www/glassfish/console");

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("glassfish.inc");
include("http.inc");

#
# Main
#

# Check GlassFish & GlassFish Admin Console
get_kb_item_or_exit('www/glassfish');
get_kb_item_or_exit('www/glassfish/console');

# By default, GlassFish's administration console listens on port 4848.
port = get_glassfish_console_port(default:4848);

# Get the previously-detected version of GlassFish so we know which
# page to request.
version = get_kb_item_or_exit("www/" + port + "/glassfish/version");
if (version =~ "^[29]")
  url = "/applications/upload.jsf";
else if (version =~ "^3")
  url = "/common/applications/uploadFrame.jsf";
else
  exit(0, "The Oracle GlassFish server on port " + port + " is version " + version + " and thus is not affected.");

# Try to access the page with a lowercase HTTP request method.
res = get_glassfish_res(
  method       : "get",
  port         : port,
  url          : url,
  exit_on_fail : TRUE
);

if (res[2] !~ "<title>Deploy.*Applications.*Modules</title>")
  exit(0, "The Oracle GlassFish server on port " + port + " is not vulnerable.");

if (report_verbosity > 0)
{
  report =
    '\nNessus was able to exploit the issue using the following request :' +
    '\n' +
    '\n' + http_last_sent_request();

  security_hole(port:port, extra:report);
}
else security_hole(port:port);

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

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

Go back to menu.

How to Run


Here is how to run the Oracle GlassFish Server Administration Console GET Request Authentication Bypass 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 GlassFish Server Administration Console GET Request Authentication Bypass plugin ID 55931.
  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 glassfish_get_auth_bypass.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - glassfish_get_auth_bypass.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 glassfish_get_auth_bypass.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 58846 - Oracle GlassFish Server 3.1.1 < 3.1.1.3 Multiple Vulnerabilities (April 2012 CPU)
  • 82902 - Oracle GlassFish Server Multiple Vulnerabilities (April 2015 CPU) (POODLE)
  • 76591 - Oracle GlassFish Server Multiple Vulnerabilities (July 2014 CPU)
  • 84810 - Oracle GlassFish Server Multiple Vulnerabilities (July 2015 CPU)
  • 58090 - Oracle GlassFish Server 2.1.1 < 2.1.1.15 / 3.0.1 < 3.0.1.5 / 3.1.1 < 3.1.1.2 Hash Collision DoS
  • 53876 - Oracle GlassFish Server Administrative Console Authentication Bypass
  • 110192 - Oracle GlassFish Server Path Traversal

Version


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

Go back to menu.