Vulnerabilities > CVE-2014-6036 - Path Traversal vulnerability in Zohocorp products

047910
CVSS 6.4 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
zohocorp
CWE-22
nessus
exploit available

Summary

Directory traversal vulnerability in the multipartRequest servlet in ZOHO ManageEngine OpManager 11.3 and earlier, Social IT Plus 11.0, and IT360 10.3, 10.4, and earlier allows remote attackers or remote authenticated users to delete arbitrary files via a .. (dot dot) in the fileName parameter.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Relative Path Traversal
    An attacker exploits a weakness in input validation on the target by supplying a specially constructed path utilizing dot and slash characters for the purpose of obtaining access to arbitrary files or resources. An attacker modifies a known path on the target in order to reach material that is not available through intended channels. These attacks normally involve adding additional path separators (/ or \) and/or dots (.), or encodings thereof, in various combinations in order to reach parent directories or entirely separate trees of the target's directory structure.
  • Directory Traversal
    An attacker with access to file system resources, either directly or via application logic, will use various file path specification or navigation mechanisms such as ".." in path strings and absolute paths to extend their range of access to inappropriate areas of the file system. The attacker attempts to either explore the file system for recon purposes or access directories and files that are intended to be restricted from their access. Exploring the file system can be achieved through constructing paths presented to directory listing programs, such as "ls" and 'dir', or through specially crafted programs that attempt to explore the file system. The attacker engaging in this type of activity is searching for information that can be used later in a more exploitive attack. Access to restricted directories or files can be achieved through modification of path references utilized by system applications.
  • File System Function Injection, Content Based
    An attack of this type exploits the host's trust in executing remote content including binary files. The files are poisoned with a malicious payload (targeting the file systems accessible by the target software) by the attacker and may be passed through standard channels such as via email, and standard web content like PDF and multimedia files. The attacker exploits known vulnerabilities or handling routines in the target processes. Vulnerabilities of this type have been found in a wide variety of commercial applications from Microsoft Office to Adobe Acrobat and Apple Safari web browser. When the attacker knows the standard handling routines and can identify vulnerabilities and entry points they can be exploited by otherwise seemingly normal content. Once the attack is executed, the attackers' program can access relative directories such as C:\Program Files or other standard system directories to launch further attacks. In a worst case scenario, these programs are combined with other propagation logic and work as a virus.
  • Using Slashes and URL Encoding Combined to Bypass Validation Logic
    This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple way of encoding an URL and abuse the interpretation of the URL. An URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.

Exploit-Db

descriptionManageEngine OpManager / Social IT Plus / IT360 - Multiple Vulnerabilities. CVE-2014-6034,CVE-2014-6035,CVE-2014-6036,CVE-2014-7866,CVE-2014-7868. Webapps ex...
idEDB-ID:43896
last seen2018-01-25
modified2014-11-09
published2014-11-09
reporterExploit-DB
sourcehttps://www.exploit-db.com/download/43896/
titleManageEngine OpManager / Social IT Plus / IT360 - Multiple Vulnerabilities

Nessus

NASL familyCGI abuses
NASL idMANAGEENGINE_OPMANAGER_11300_FILE_UPLOAD_EXPLOIT.NASL
descriptionThe 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
last seen2020-06-01
modified2020-06-02
plugin id81378
published2015-02-16
reporterThis script is Copyright (C) 2015-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/81378
titleManageEngine OpManager Multiple Directory Traversal Vulnerabilities
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(81378);
  script_version("1.10");
  script_cvs_date("Date: 2019/11/25");

  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-2019 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);

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/128474/meopmanager-execlfi.txt
idPACKETSTORM:128474
last seen2016-12-05
published2014-09-29
reporterPedro Ribeiro
sourcehttps://packetstormsecurity.com/files/128474/ManageEngine-Code-Execution-File-Deletion.html
titleManageEngine Code Execution / File Deletion