Cisco Adaptive Security Appliance Software CLI Arbitrary File Read and Write Vulnerability (cisco-sa-20200226-fxos-cli-file)

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

Description

According to its self-reported version, Adaptive Security Appliance (ASA) Software is affected by an arbitrary file read and write vulnerability in the CLI due to insufficient input validation. An authenticated, local attacker can exploit this, via crafted arguments on a specific CLI command, to read and write arbitrary files on the remote host.

Please see the included Cisco BID and Cisco Security Advisory for more information.

                                        
                                            #TRUSTED 5dd9d72875f9212b4fbf725f97d1f7435df643200208589826948a34da729a25e16680514bbacb0555328ca7de555de80e1533e59aa13819be43d75723bf0d07aa847865a354b263656a7de1b0f30cee91f11b714ec6d10f45efbc57b1accee9829496887a209d073d01fcc080ddcd072fcbbad5bb5a92ce50a5e2d520d0df9dc91f3cc726bbd50ffa10ea1efdb961a60a530826ed067747d5e66d3ad1d4517d81a7d2202cc6a9e7e3abb9dc8a60419e69c63dd62aadad13e9c4cd3533d6acdb942d1afe50b9879ed56f9636b5580834dc4140f1ee4b41b42c55fa20acfec21b8208a0375d05e9ed84b1e97b04092dacfeef1d7a2d6924a2c0fef1706425a7df324e5570e2847f5366356690876a289e630ea0daadc30de8d676aacf03da2a172f424d066745456fa18c8b63b2829119f09e3cd4229847c1f1dfdf07e23c21f6f376979667f8c3bc002be3ca398379162fce85494d58b89f0334c59ac2b9349dea30aefb18e50f7405ddcd1cc5c913b0b7685aaa1437409f40fe0cb0cdd0bcf716f17b8c6a29f043152e6557b88e9df217279b13d2d74e7fc0ee3bec301f9a17c7d1ab360c2e0e4d80139ad3cfd4dd42f30d669edd88a1e3a5b2bb20ed45deaba421a85d05187b7ef717d9e55e179f60d70da61e1e0ecfb1747761b259f8ac817983c7383e0ef5fc2ce397cdd200f7221d0c9035f2ca5c73ff45d6898b11c193
#
# (C) Tenable Network Security, Inc.
#

include('compat.inc');

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

  script_cve_id("CVE-2020-3166");
  script_xref(name:"CISCO-BUG-ID", value:"CSCvr09748");
  script_xref(name:"CISCO-SA", value:"cisco-sa-20200226-fxos-cli-file");
  script_xref(name:"IAVA", value:"2020-A-0085");

  script_name(english:"Cisco Adaptive Security Appliance Software CLI Arbitrary File Read and Write Vulnerability (cisco-sa-20200226-fxos-cli-file)");

  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, Adaptive Security Appliance (ASA) Software is affected by an arbitrary
file read and write vulnerability in the CLI due to insufficient input validation. An authenticated, local attacker can
exploit this, via crafted arguments on a specific CLI command, to read and write arbitrary files on the remote host.

Please see the included Cisco BID and Cisco Security Advisory for more information.");
  # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200226-fxos-cli-file
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?f0375756");
  script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvr09748");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in Cisco bug ID CSCvr09748");
  script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:P/I:P/A:P");
  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-3166");

  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/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:/a: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('cisco_workarounds.inc');
include('ccf.inc');

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

if (
  product_info.model !~ "^10[0-9][0-9]($|[^0-9])" && # Firepower 1000
  product_info.model !~ "^21[0-9][0-9]($|[^0-9])"    # Firepower 2100
) audit(AUDIT_HOST_NOT, 'an affected Cisco ASA product');

vuln_ranges = [
  {'min_ver' : '9.8',  'fix_ver' : '9.9.2.66'},
  {'min_ver' : '9.10',  'fix_ver' : '9.13.1.5'}
];

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

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

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