Vulnerabilities > CVE-2016-8017 - Improper Input Validation vulnerability in Mcafee Virusscan Enterprise

047910
CVSS 4.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
SINGLE
Confidentiality impact
PARTIAL
Integrity impact
NONE
Availability impact
NONE
network
low complexity
mcafee
CWE-20
nessus
exploit available

Summary

Special element injection vulnerability in Intel Security VirusScan Enterprise Linux (VSEL) 2.0.3 (and earlier) allows authenticated remote attackers to read files on the webserver via a crafted user input.

Vulnerable Configurations

Part Description Count
Application
Mcafee
1

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

Exploit-Db

descriptionMcAfee Virus Scan Enterprise for Linux - Remote Code Execution. CVE-2016-8016,CVE-2016-8017,CVE-2016-8018,CVE-2016-8019,CVE-2016-8020,CVE-2016-8021,CVE-2016-...
fileexploits/linux/remote/40911.py
idEDB-ID:40911
last seen2016-12-13
modified2016-12-13
platformlinux
port
published2016-12-13
reporterExploit-DB
sourcehttps://www.exploit-db.com/download/40911/
titleMcAfee Virus Scan Enterprise for Linux - Remote Code Execution
typeremote

Nessus

NASL familyMisc.
NASL idMCAFEE_VSEL_SB10181.NASL
descriptionThe remote host has a version of McAfee VirusScan Enterprise for Linux (VSEL) installed that is prior or equal to 2.0.3. It is, therefore, affected by multiple vulnerabilities : - An information disclosure vulnerability exists in the web interface due to improper error reporting. An authenticated, remote attacker can exploit this, by manipulating the
last seen2020-06-01
modified2020-06-02
plugin id95812
published2016-12-14
reporterThis script is Copyright (C) 2016-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/95812
titleMcAfee VirusScan Enterprise for Linux <= 2.0.3 Multiple vulnerabilities (SB10181)
code
#TRUSTED 7fa1e66ff358b6d8b86cacbe4b2c2437d7cbb4bf031024a4bda74b06877986e1cb98f80d3c86c2537bf6e283abc17a2be76805aa430945058044479762c9f554dd59a1dcb29536c25623b7af3d3b83c830353e3f1e167e1b4b912a064f086f6b78fa32d13cecb5adc30cdfeb49ea3da353dc1e843d9d7e6bb3842c8de4d4d489e9056f8f7aa6cc03b1b558ce616399466f0678075d180b8e7fe78bc4bd7123a9efcc8d65af99a7aa1a135521298518b13c5b8ce44aafda28427001a37fd1fb1853752e8005feeaf518f0e82ddd8ff70a5c57a5a32ead531e7931440d7b51eafce530f7d4c325432c6daf2a05081b8023e22886586a51aa72fe6447e857294f254ffd49b2d012620c3bba7d5ce1bb711b1f869a7c3a5904b017b9dd0d927ce092259e0d1f59398bdb5aa719de81a365dd454d9fb8f84d1938f91878736dad09476bfa169b58d7361fb3014047522b39728613efaa6165fc1dc7c695f2054ae676961a08578b45fed102542f959d81a346518de39f7ab237970ca1ea7ea2cd0974e665ae1f34d49d152aea6597fed319e0b9905ee80346d04bececd732aed7b67e543965c33b1d36a1d5eefd3c8f6864db912440e0f2fbb28f78ea2b2eeaa304cd2d0cc953514b9a08a608d73f15ae186c2b7588cc3541ce32e5b3d762c33b63db5d8128491433bda989b1fb0542fca8535a42b9be0fe06543f562aaf0ecbf8b0b
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(95812);
  script_version("1.9");
  script_cvs_date("Date: 2019/11/13");

  script_cve_id(
    "CVE-2016-8016",
    "CVE-2016-8017",
    "CVE-2016-8018",
    "CVE-2016-8019",
    "CVE-2016-8020",
    "CVE-2016-8021",
    "CVE-2016-8022",
    "CVE-2016-8023",
    "CVE-2016-8024",
    "CVE-2016-8025"
  );
  script_bugtraq_id(94823);
  script_xref(name:"MCAFEE-SB", value:"SB10181");
  script_xref(name:"CERT", value:"245327");
  script_xref(name:"EDB-ID", value:"40911");

  script_name(english:"McAfee VirusScan Enterprise for Linux <= 2.0.3 Multiple vulnerabilities (SB10181)");
  script_summary(english:"Checks VSEL version");

  script_set_attribute(attribute:"synopsis", value:
"The remote host is affected by multiple vulnerabilities.");
  script_set_attribute(attribute:"description", value:
"The remote host has a version of McAfee VirusScan Enterprise for Linux
(VSEL) installed that is prior or equal to 2.0.3. It is, therefore,
affected by multiple vulnerabilities :

  - An information disclosure vulnerability exists in the
    web interface due to improper error reporting. An
    authenticated, remote attacker can exploit this, by
    manipulating the 'tplt' parameter, to disclose filenames
    on the system. (CVE-2016-8016)

  - An information disclosure vulnerability exists in the
    parser due to improper handling of template files. An
    authenticated, remote attacker can exploit this, via
    specially crafted text elements, to disclose the
    contents of arbitrary files subject to the privileges of
    the 'nails' account. (CVE-2016-8017)

  - Multiple cross-site request forgery (XSRF)
    vulnerabilities exist in the web interface due to a
    failure to require multiple steps, explicit
    confirmation, or a unique token when performing certain
    sensitive actions. An unauthenticated, remote attacker
    can exploit these vulnerabilities, by convincing a user
    to follow a specially crafted link, to execute arbitrary
    script code or commands in a user's browser session.
    (CVE-2016-8018)

  - Multiple cross-site scripting (XSS) vulnerabilities
    exist due to improper validation of user-supplied input
    to the 'info:7' and 'info:5' parameters when the 'tplt'
    parameter is set in NailsConfig.html or
    MonitorHost.html. An unauthenticated, remote attacker
    can exploit these vulnerabilities, via a specially
    crafted request, to execute arbitrary script code in a
    user's browser session. (CVE-2016-8019)

  - A remote code execution vulnerability exists due to
    improper validation of user-supplied input to the
    'nailsd.profile.ODS_9.scannerPath' variable in the last
    page of the system scan form. An authenticated, remote
    attacker can exploit this, via a specially crafted HTTP
    request, to execute arbitrary code as the root user.
    (CVE-2016-8020)

  - A remote code execution vulnerability exists in the web
    interface when downloading update files from a specified
    update server due to a race condition. An authenticated,
    remote attacker can exploit this to place and execute a
    downloaded file before integrity checks are completed.
    (CVE-2016-8021)

  - A security bypass vulnerability exists in the web
    interface due to improper handling of authentication
    cookies. The authentication cookie stores the IP address 
    of the client and is checked to ensure it matches the
    IP address of the client sending it; however, an 
    unauthenticated, remote attacker can cause the cookie to
    be incorrectly parsed by adding a number of spaces to
    the IP address stored within the cookie, resulting in a
    bypass of the security mechanism. (CVE-2016-8022)

  - A security bypass vulnerability exists in the web
    interface due to improper handling of the nailsSessionId
    authentication cookie. An unauthenticated, remote
    attacker can exploit this, by brute-force guessing the
    server start authentication token within the cookie, to
    bypass authentication mechanisms. (CVE-2016-8023)

  - An HTTP response splitting vulnerability exists due to
    improper sanitization of carriage return and line feed
    (CRLF) character sequences passed to the 'info:0'
    parameter before being included in HTTP responses. An
    authenticated, remote attacker can exploit this to
    inject additional headers in responses and disclose
    sensitive information. (CVE-2016-8024)

  - A SQL injection (SQLi) vulnerability exists in the web
    interface due to improper sanitization of user-supplied
    input to the 'mon:0' parameter. An authenticated, remote
    attacker can exploit this to inject or manipulate SQL
    queries in the back-end database, resulting in the
    manipulation or disclosure of arbitrary data.
    (CVE-2016-8025)");
  script_set_attribute(attribute:"see_also", value:"https://kc.mcafee.com/corporate/index?page=content&id=SB10181");
  script_set_attribute(attribute:"see_also", value:"https://nation.state.actor/mcafee.html");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Endpoint Security for Linux (ENSL) version 10.2.0 or later.
Alternatively, as a workaround, open the following line in a text editor:
'/var/opt/NAI/LinuxShield/etc/nailsd.cfg' and change 'nailsd.disableCltWEbUI: false' 
to the value of true and restart the nails service.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2016-8024");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"in_the_news", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2016/12/12");
  script_set_attribute(attribute:"patch_publication_date", value:"2016/12/12");
  script_set_attribute(attribute:"plugin_publication_date", value:"2016/12/14");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:mcafee:virusscan_enterprise");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

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

  script_dependencies("mcafee_vsel_detect.nbin");
  script_require_keys("installed_sw/McAfee VirusScan Enterprise for Linux");

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("install_func.inc");
include("ssh_func.inc");
include("telnet_func.inc");
include("hostlevel_funcs.inc");

if ( islocalhost() )
{
  port = 0;
  if ( ! defined_func("pread") ) exit(1, "'pread()' is not defined.");
    info_t = INFO_LOCAL;
}
else
{
  port = kb_ssh_transport();
  if (!get_port_state(port)) audit(AUDIT_PORT_CLOSED, port);

  ret = ssh_open_connection();
  if (!ret) audit(AUDIT_FN_FAIL, "ssh_open_connection()");

    info_t = INFO_SSH;
}

app_name = "McAfee VirusScan Enterprise for Linux";
get_install_count(app_name:app_name, exit_if_zero:TRUE);

install = get_single_install(app_name:app_name, exit_if_unknown_ver:TRUE);
version = install['version'];
vuln = FALSE;

if (ver_compare(ver:version, fix:"2.0.3", strict:FALSE) <= 0 || version =~ "^2\.0\.3") 
{
  cmd = 'grep nailsd.disableCltWebUI /var/opt/NAI/LinuxShield/etc/nailsd.cfg | tr -d "\n"';
  buf = info_send_cmd(cmd:cmd);
  # match = is temporary workaround in place?
  match = pregmatch(pattern:'nailsd.disableCltWebUI: true', string:buf);
  if (!isnull(match)) audit(AUDIT_HOST_NOT, "affected because 'nailsd.disableCltWebUI' is set to true");
  # set to false & vulnerable
  notSet = pregmatch(pattern:'nailsd.disableCltWebUI: false', string:buf);
  # no config setting & vuln
  dne = pregmatch(pattern:'nailsd.disableCltWebUI:', string:buf);
  # if false or if the config does not exist and we are v2.0.3 then flag as vuln
  if (!isnull(notSet) || isnull(dne)) vuln = TRUE;
}


if (vuln)
{
  port = 0;
  report ='\nInstalled version : ' + version +
          '\nSolution          : Upgrade to McAfee Endpoint Security for Linux (ENSL) 10.2.0 or later.\n';
  security_report_v4(severity:SECURITY_WARNING, extra:report, port:port, xss:TRUE, sqli:TRUE, xsrf:TRUE);
}
else audit(AUDIT_INST_VER_NOT_VULN, version);

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/140147/mvsel-exec.txt
idPACKETSTORM:140147
last seen2016-12-14
published2016-12-14
reporterAndrew Fasano
sourcehttps://packetstormsecurity.com/files/140147/McAfee-Virus-Scan-Enterprise-For-Linux-Remote-Code-Execution.html
titleMcAfee Virus Scan Enterprise For Linux Remote Code Execution

Saint

bid94823
descriptionMcAfee VirusScan Enterprise for Linux authentication token brute force
titlemcafee_virus_scan_linux_brute
typeremote