Vulnerabilities > CVE-2020-3205 - OS Command Injection vulnerability in Cisco IOS

047910
CVSS 8.8 - HIGH
Attack vector
ADJACENT_NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
low complexity
cisco
CWE-78
nessus

Summary

A vulnerability in the implementation of the inter-VM channel of Cisco IOS Software for Cisco 809 and 829 Industrial Integrated Services Routers (Industrial ISRs) and Cisco 1000 Series Connected Grid Routers (CGR1000) could allow an unauthenticated, adjacent attacker to execute arbitrary shell commands on the Virtual Device Server (VDS) of an affected device. The vulnerability is due to insufficient validation of signaling packets that are destined to VDS. An attacker could exploit this vulnerability by sending malicious packets to an affected device. A successful exploit could allow the attacker to execute arbitrary commands in the context of the Linux shell of VDS with the privileges of the root user. Because the device is designed on a hypervisor architecture, exploitation of a vulnerability that affects the inter-VM channel may lead to a complete system compromise. For more information about this vulnerability, see the Details section of this advisory.

Vulnerable Configurations

Part Description Count
OS
Cisco
91
Hardware
Cisco
4

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-IOS-IOT-UDP-VDS-INJ-F2D5JZRT-IOS.NASL
descriptionAccording to its self-reported version, IOS is affected by a vulnerability in the implementation of the inter-VM channel due to insufficient validation of signaling packets that are destined to the Virtual Device Server (VDS). An unauthenticated, adjacent attacker can exploit this, by sending malicious packets to an affected device, in order to execute arbitrary shell commands on the VDS of an affected device. Please see the included Cisco BIDs and Cisco Security Advisory for more information.
last seen2020-06-12
modified2020-06-05
plugin id137147
published2020-06-05
reporterThis script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/137147
titleCisco IOS Software for Cisco Industrial Routers Virtual Device Server Inter-VM Channel Command Injection (cisco-sa-ios-iot-udp-vds-inj-f2D5Jzrt)
code
#TRUSTED 25d1ae1b35a8797c6957b52332bb4e2638283a69a499ee0312aafe00e72a497898498fdd69385eacc98f3fdf7ae6e272fa5849dc47527808051d610f3d09048365867952a6dcf94dac69bb960c7f7884653404277f3f173829447abc9763b456d06d28f44e5c4d1f076d9a17d9a6deb368adb32f1d8e0f673108c3f1d38a42eb6c3972de8b1bcf936f7f16dbee6bc810a2075cb99b754739f4d839ca7652be18b4ce7a83fdf188cb4e214ef8c09094124b7b45c9779527bd05e14a29ea18bf4bd82406cf2a36e5252f6f419a6f4a0462b20e4dd636d3a0560a6db52d854cee02d9d7d77de7de7ac789e32b652c873b78e3b4163867a630e3e38b46f7599426852fa35e46467bd061120ea2f10859493daaeb97af0434ce5a775c55f2a19c5b749a513287c387f89c34b26d9e0087f46b91867af0d8449e8b140c4392876f71fec72d053dc2eae60c508a1d5888dba84de02a2f86db6ef5d882c98e1947134693db578bc9276661d06abfbb71d3eaff6dcf9297a674266c51c82b36220663c8140c4220cf31bfeed89493c773a82faaf79b3363a7cd31d2ab4817cfddae5e1a78be57042e812314f346a8b68d51471bf7c6ebb1602fc50d60b445bd1a163865a58679859717613354765ea9f4e047e3d8e9059b8eae23e729809a8bb903cb23de1b7c7f278c3669971bcc78dbdb6a2a6052d811765405a600ac14a65f6364cb8e
#
# (C) Tenable Network Security, Inc.
#

include('compat.inc');

if (description)
{
  script_id(137147);
  script_version("1.6");
  script_set_attribute(attribute:"plugin_modification_date", value:"2020/06/10");

  script_cve_id("CVE-2020-3205");
  script_xref(name:"CISCO-BUG-ID", value:"CSCvq66443");
  script_xref(name:"CISCO-SA", value:"cisco-sa-ios-iot-udp-vds-inj-f2D5Jzrt");
  script_xref(name:"IAVA", value:"2020-A-0239");

  script_name(english:"Cisco IOS Software for Cisco Industrial Routers Virtual Device Server Inter-VM Channel Command Injection (cisco-sa-ios-iot-udp-vds-inj-f2D5Jzrt)");

  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, IOS is affected by a vulnerability in the implementation of the inter-VM
channel due to insufficient validation of signaling packets that are destined to the Virtual Device Server (VDS). An
unauthenticated, adjacent attacker can exploit this, by sending malicious packets to an affected device, in order to
execute arbitrary shell commands on the VDS of an affected device.

Please see the included Cisco BIDs and Cisco Security Advisory for more information.");
  # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ios-iot-udp-vds-inj-f2D5Jzrt
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?52e14c10");
  script_set_attribute(attribute:"see_also", value:"http://tools.cisco.com/security/center/viewErp.x?alertId=ERP-73388");
  script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvq66443");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in Cisco bug ID CSCvq66443");
  script_set_cvss_base_vector("CVSS2#AV:A/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:A/AC:L/PR:N/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-3205");

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

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

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios");
  script_set_attribute(attribute:"stig_severity", value:"I");
  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_ios_version.nasl");
  script_require_keys("Host/Cisco/IOS/Version", "Host/Cisco/IOS/Model");

  exit(0);
}

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

get_kb_item_or_exit("Host/local_checks_enabled");

product_info = cisco::get_product_info(name:'Cisco IOS');

if (('cgr' >!< tolower(product_info.model) || product_info.model !~ "1\d\d\d(^\d|$)") &&
    ('isr' >!< tolower(product_info.model) || product_info.model !~ "8[02]9(^\d|$)"))
  audit(AUDIT_HOST_NOT, 'an affected model');

version_list=make_list(
  '15.9(3)M0a',
  '15.9(3)M',
  '15.8(3)M5',
  '15.8(3)M4',
  '15.8(3)M3b',
  '15.8(3)M3a',
  '15.8(3)M3',
  '15.8(3)M2a',
  '15.8(3)M2',
  '15.8(3)M1',
  '15.8(3)M0a',
  '15.8(3)M',
  '15.7(3)M7',
  '15.7(3)M6',
  '15.7(3)M5',
  '15.7(3)M4b',
  '15.7(3)M4a',
  '15.7(3)M4',
  '15.7(3)M3',
  '15.7(3)M2',
  '15.7(3)M1',
  '15.7(3)M',
  '15.6(3)M9',
  '15.6(3)M8',
  '15.6(3)M7',
  '15.6(3)M6b',
  '15.6(3)M6a',
  '15.6(3)M6',
  '15.6(3)M5',
  '15.6(3)M4',
  '15.6(3)M3a',
  '15.6(3)M3',
  '15.6(3)M2',
  '15.6(3)M1b',
  '15.6(3)M1',
  '15.6(3)M0a',
  '15.6(3)M',
  '15.6(2)T3',
  '15.6(2)T2',
  '15.6(2)T1',
  '15.6(2)T',
  '15.6(1)T3',
  '15.6(1)T2',
  '15.6(1)T1',
  '15.6(1)T0a',
  '15.6(1)T',
  '15.5(3)M9',
  '15.5(3)M8',
  '15.5(3)M7',
  '15.5(3)M6a',
  '15.5(3)M6',
  '15.5(3)M5',
  '15.5(3)M4a',
  '15.5(3)M4',
  '15.5(3)M3',
  '15.5(3)M2a',
  '15.5(3)M2',
  '15.5(3)M11',
  '15.5(3)M10',
  '15.5(3)M1',
  '15.5(3)M0a',
  '15.5(3)M',
  '15.5(2)T4',
  '15.5(2)T3',
  '15.5(2)T2',
  '15.5(2)T1',
  '15.5(2)T',
  '15.5(1)T4',
  '15.5(1)T3',
  '15.5(1)T2',
  '15.5(1)T',
  '15.4(3)M9',
  '15.4(3)M8',
  '15.4(3)M7',
  '15.4(3)M6a',
  '15.4(3)M6',
  '15.4(3)M5',
  '15.4(3)M4',
  '15.4(3)M3',
  '15.4(3)M2',
  '15.4(3)M10',
  '15.4(3)M1',
  '15.4(3)M',
  '15.4(2)CG',
  '15.4(1)CG',
  '15.3(3)JPJ',
  '15.3(3)JPI',
  '15.3(3)JAA1',
  '15.2(4)JAZ1',
  '15.0(2)SG11a',
  '12.2(60)EZ16'
);

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

cisco::check_and_report(
  product_info:product_info,
  reporting:reporting,
  vuln_versions:version_list
);