Cisco ASA Software CLI Command Injection (cisco-sa-20200226-fxos-ucs-cmdinj)

2020-03-13T00:00:00
ID CISCO-SA-20200226-ASA-CMDINJ.NASL
Type nessus
Reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
Modified 2020-03-13T00:00:00

Description

According to its self-reported version, Cisco ASA Software is affected by a vulnerability in the CLI due to insufficient input validation. An authenticated, local attacker can exploit this, by including crafted arguments to specific commands, in order to execute arbitrary commands on the underlying OS with the privileges of the currently logged-in user.

Please see the included Cisco BIDs and Cisco Security Advisory for more information

                                        
                                            #TRUSTED 478b103c2163d7caa0eb2139ebd7448976c88ee380e826d0e68a852e36e011509034072e83da7456b0ebc7ddf9124a9542059dcf53a4de476cde2c992b130948a89be80ac1234a03f3a957dba4d087834303d781bd5e10a062f85aabedd9956e88c02bb3fb640ee49991728affa39bfa3550c0139d36f4ab789cdb7cc7991f1a6b6df869c06b2ab2f11c8edb4019ce9c57a2323f82dcc36f90bf027a87e2c9bc3bee1c7c3dc6b0a5358f68d95db22ff5b23937741cc93d2d2f56747636eca0ac92bb4666ee37bcb48d09ffc957d9834b23e3cd69d0b0492606ff1419e332dd4b846462647ed297d0e322ddf1c0fabe98cba87d1b7cddfb75173723f0c5e2336daac72e9c483cf445906f2218c31eb4b74f85f1ef60d1704b0340c03e9eae4e43ec37d4a93508ca65ce8869d708852e509d75019344138528534619a9ce6f26c799903b233013adade606ba9ff884525dd2361134abaf620635340f1977c0c5d30ca6be4d71c6c4d657ab0981d724246c469ccc34a97844d4a79cb2d69733c1c898ccd2c9603b26821f20a8d2f7aa534381b526a009334261d5ee88db60ff3a56d6eefe8e124f728ad83b89974db9cd72b1818fa23ac97ca0d83337c2958910a8e7406cbd25a7c2304853853ab6b415c83d12b158a6e6d71a60c289cf2fb30e0c7a02f58ed4fc2d6ddb28c4cd8343234add7f9a8ff77b2cbbcd609f41e5874146
#
# (C) Tenable Network Security, Inc.
#

include('compat.inc');

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

  script_cve_id("CVE-2020-3167");
  script_xref(name:"CISCO-BUG-ID", value:"CSCvr49734");
  script_xref(name:"CISCO-SA", value:"cisco-sa-20200226-fxos-ucs-cmdinj");
  script_xref(name:"IAVA", value:"2020-A-0085");

  script_name(english:"Cisco ASA Software CLI Command Injection (cisco-sa-20200226-fxos-ucs-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 ASA Software is affected by a vulnerability in the CLI due to
insufficient input validation. An authenticated, local attacker can exploit this, by including crafted arguments to
specific commands, in order to execute arbitrary commands on the underlying OS with the privileges of the currently
logged-in user.

Please see the included Cisco BIDs and Cisco Security Advisory for more information");
  # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200226-fxos-ucs-cmdinj
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a5d34d6d");
  script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvr49734");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in Cisco bug ID CSCvr49734.");
  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:L/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-3167");

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

  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/13");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:adaptive_security_appliance_software");
  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("ssh_get_info.nasl", "os_fingerprint.nasl");
  script_require_keys("Host/Cisco/ASA", "Host/Cisco/ASA/model");

  exit(0);
}

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

product_info = cisco::get_product_info(name:'Cisco Adaptive Security Appliance (ASA) Software');

if (product_info['model'] !~ "^(10|21)[0-9]{2}")
 audit(AUDIT_HOST_NOT, 'an affected model');

vuln_ranges = [
  {'min_ver' : '9.8',  'fix_ver' : '9.9.2.66'},
  {'min_ver' : '9.10',  'fix_ver' : '9.10.1.37'},
  {'min_ver' : '9.12',  'fix_ver' : '9.12.3.7'},
  {'min_ver' : '9.13',  'fix_ver' : '9.13.1.7'}
];

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'   , 'CSCvr49734'
);


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