Vulnerabilities > CVE-2020-3169 - OS Command Injection vulnerability in Cisco Firepower Extensible Operating System

047910
CVSS 6.7 - MEDIUM
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
HIGH
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
local
low complexity
cisco
CWE-78
nessus

Summary

A vulnerability in the CLI of Cisco FXOS Software could allow an authenticated, local attacker to execute arbitrary commands on the underlying Linux operating system with a privilege level of root on an affected device. The vulnerability is due to insufficient validation of arguments passed to a specific CLI command on the affected device. An attacker could exploit this vulnerability by including malicious input as the argument of an affected command. A successful exploit could allow the attacker to execute arbitrary commands on the underlying Linux operating system with root privileges. An attacker would need valid administrator credentials to exploit this vulnerability.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • 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.
  • Command Delimiters
    An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
  • Exploiting Multiple Input Interpretation Layers
    An attacker supplies the target software with input data that contains sequences of special characters designed to bypass input validation logic. This exploit relies on the target making multiples passes over the input data and processing a "layer" of special characters with each pass. In this manner, the attacker can disguise input that would otherwise be rejected as invalid by concealing it with layers of special/escape characters that are stripped off by subsequent processing steps. The goal is to first discover cases where the input validation layer executes before one or more parsing layers. That is, user input may go through the following logic in an application: In such cases, the attacker will need to provide input that will pass through the input validator, but after passing through parser2, will be converted into something that the input validator was supposed to stop.
  • Argument Injection
    An attacker changes the behavior or state of a targeted application through injecting data or command syntax through the targets use of non-validated and non-filtered arguments of exposed services or methods.
  • OS Command Injection
    In this type of an attack, an adversary injects operating system commands into existing application functions. An application that uses untrusted input to build command strings is vulnerable. An adversary can leverage OS command injection in an application to elevate privileges, execute arbitrary commands and compromise the underlying operating system.

Nessus

NASL familyCISCO
NASL idCISCO-SA-20200226-FPWR-CMDINJ.NASL
descriptionAccording to its self-reported version, Cisco Firepower Extensible Operating System (FXOS) is affected by a command injection vulnerability in its command line interface component due to insufficient validation of arguments passed to a specific command. An authenticated, local attacker can exploit this, by issuing specially crafted commands to an affected host, to execute arbitrary commands as root on the host. Please see the included Cisco BIDs and Cisco Security Advisory for more information.
last seen2020-03-17
modified2020-03-06
plugin id134233
published2020-03-06
reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/134233
titleCisco FXOS Software CLI Command Injection Vulnerability (cisco-sa-20200226-fpwr-cmdinj)
code
#TRUSTED 5eb06e9be3be989addbd3c0fdab87bb9a3e2624aa2dc39a155a49358b107f04fb0070259a1f8113d4f064f9b170c479641132d35e9990e1a28655fb0bd4952a7016aaeddd32517d241874584942300ab5680c7e99b068457d06dd30238684ff9533bb4a7ad0a11a25e0c30d4e60ed32995312bba346ae96c3c324af4001ef7b10aaef201ee822f565adfcdaa55d7441b2dcc24203c40f0799f10169270943563117234e15c5049d3c3f05d1de2f06040c13527c2fa019e5cfb558c5c69a1c54eee53fabc36d74f1aa6d604e3ceb8f0ff554dd3b5b3694d5cbef05fe332393447551b1c00cfa8166c68af059200ab606585d123eab2aa3b33722d65cea94d1f63e9f7a1ba611043e93667212dd9bcfffee05ed717e261be0c847a1b1ab67f666fdd798974bfd14df1847697e4627b444d5958e4e8aca11c11fa5940be04e449c6e60361eb0d34a9a3ed580a990d59c63678438e17092176ded0dd53112e3247e5692a832120ee9407c6011510ac835f40eba28b7797d0efd1fdda2a7c7f624fca8573ac1a219eb6bdbe2b28bf5f663c4560855332f785395308918aa16bcf4feb96ade42b8a4ff4f667a3ef90fe1e1146f5fcd6e9d36c164e6b3859e8a560358c40e5ca2e736fe264dbdde79875e8f5a2352f01231ef14bf09938921f5839361cf53fac6937a5873ff1e39b5c99b157d23e676b9b1594ed6893fab68307db7192
#
# (C) Tenable Network Security, Inc.
#

include('compat.inc');

if (description)
{
  script_id(134233);
  script_version("1.4");
  script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/10");

  script_cve_id("CVE-2020-3169");
  script_xref(name:"CISCO-BUG-ID", value:"CSCvo42633");
  script_xref(name:"CISCO-SA", value:"cisco-sa-20200226-fpwr-cmdinj");
  script_xref(name:"IAVA", value:"2020-A-0085");

  script_name(english:"Cisco FXOS Software CLI Command Injection Vulnerability (cisco-sa-20200226-fpwr-cmdinj)");

  script_set_attribute(attribute:"synopsis", value:
"The remote device is missing a vendor-supplied security patch");
  script_set_attribute(attribute:"description", value:
"According to its self-reported version, Cisco Firepower 
  Extensible Operating System (FXOS) is affected by a command injection vulnerability in its command line interface 
  component due to insufficient validation of arguments passed to a specific command. An authenticated, local attacker 
  can exploit this, by issuing specially crafted commands to an affected host, to execute arbitrary commands as root
  on the host. 

  Please see the included Cisco BIDs and Cisco Security Advisory for more information.");
  # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200226-fpwr-cmdinj
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?f935994d");
  script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvo42633");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in Cisco bug ID 
  CSCvo42633");
  script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2020-3169");

  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_cwe_id(78);

  script_set_attribute(attribute:"vuln_publication_date", value:"2020/02/26");
  script_set_attribute(attribute:"patch_publication_date", value:"2020/02/26");
  script_set_attribute(attribute:"plugin_publication_date", value:"2020/03/06");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:fxos");
  script_set_attribute(attribute:"stig_severity", value:"II");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"CISCO");

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

  script_dependencies("cisco_enumerate_firepower.nbin", "cisco_asa_firepower_version.nasl");
  script_require_keys("installed_sw/FXOS");

  exit(0);
}

include('audit.inc');
include('cisco_workarounds.inc');
include('ccf.inc');

product_info = cisco::get_product_info(name:'FXOS');
product_info['model'] = product_info['Model'];

if( isnull(product_info['model']) || product_info['model'] !~ "^(41|93)[0-9]{2}$" )
  audit(AUDIT_HOST_NOT, 'affected');

vuln_ranges = [
  {'min_ver' : '2.2',  'fix_ver': '2.2.2.97'},
  {'min_ver' : '2.3',  'fix_ver': '2.3.1.144'},
  {'min_ver' : '2.4',  'fix_ver': '2.4.1.234'}
];

workarounds = make_list(CISCO_WORKAROUNDS['no_workaround']);
workaround_params = make_list();

reporting = make_array(
  'port'     , 0,
  'severity' , SECURITY_HOLE,
  'version'  , product_info['version'],
  'bug_id'   , 'CSCvo42633'
);

cisco::check_and_report(
  product_info:product_info,
  workarounds:workarounds,
  workaround_params:workaround_params,
  reporting:reporting,
  vuln_ranges:vuln_ranges
);