Cisco IOS XR Software Authenticated User Privilege Escalation (cisco-sa-iosxr-LJtNFjeN)

2020-09-25T00:00:00
ID CISCO-SA-IOSXR-LJTNFJEN.NASL
Type nessus
Reporter This script is Copyright (C) 2020 and is owned by Tenable, Inc. or an Affiliate thereof.
Modified 2020-09-25T00:00:00

Description

According to its self-reported version, Cisco IOS XR Software is affected by a privilege escalation vulnerability in task group assignment for a specific CLI command due to incorrect mapping to task groups. An attacker could exploit this vulnerability by first authenticating to the local CLI shell on the device and using the CLI command to bypass the task group–based checks. A successful exploit could allow the attacker to elevate privileges and gain full administrative control of the device. There are workarounds that address this vulnerability.

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

                                        
                                            #TRUSTED 4a92d1e563ecad3cee5cc6d9978cbf921ee8b6d15ca96eda7edb1208fd503a021dbc10f230dccc89253e81a7a5b5237e9d9d711992a01bc8fb436c311c96d24add91dda778f497e82b864b9741db941cf3fbb51a728294edd4eeced515f04a847680c74e24cc8476937efd757f478111b05baede587ddb157f0612a84150496e32ace6109a07bbe77f5bdb69d949b4733190451cf9d4fb6f1b009ee6fadd03bb9588c2399e20b71f2651f7eda911b3bc2c3db3eb1a63000caf2935e3f61005313eb4ef67f7806461f6e10bc4306247af04cf5533dd482b8515e20d7beae814dfce1c9904972b7b5d35e3149e3a1376963d197fb07c80bcbb5886c6b1b6c887d7c68cb9106ede4fea0f964e9450fe73daafaa7e7e8ba446ab10fa148a6a103027db148441a5a37aacf8145d3fce77fcd072e6cbd4c627a3469b665ff44a556addec2c75004f1d8a024b0dbf6f3acfe3a990867296046bcfedb4b0fafb2aa5f1cf01b1875565b368b48f4452798eaafcf473f2e593643227af302cad6f487bfb1530fd3af8f22b0385a942ab19c1a78bfeb8525ee5e96559e60b07fb3260651095366176844d84fc0ed835523be4b72bce7888c0cd8727c166a387c181c2ddc96255da2d65eefdd8bf7584368d02a7f86a7ef9b7ef97972afc338264ea9adc27a2594a881e1a67b728cfc8e8405f03b1013dc1c502dfe4766126db535c0e685313
#
# (C) Tenable Network Security, Inc.
#

include('compat.inc');

if (description)
{
  script_id(140793);
  script_version("1.4");
  script_set_attribute(attribute:"plugin_modification_date", value:"2020/09/28");

  script_cve_id("CVE-2020-3473");
  script_xref(name:"CISCO-BUG-ID", value:"CSCvs12604");
  script_xref(name:"CISCO-SA", value:"cisco-sa-iosxr-LJtNFjeN");
  script_xref(name:"IAVA", value:"2020-A-0374");

  script_name(english:"Cisco IOS XR Software Authenticated User Privilege Escalation (cisco-sa-iosxr-LJtNFjeN)");

  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 IOS XR Software is affected by a privilege escalation vulnerability in
task group assignment for a specific CLI command due to incorrect mapping to task groups. An attacker could exploit
this vulnerability by first authenticating to the local CLI shell on the device and using the CLI command to bypass
the task group–based checks. A successful exploit could allow the attacker to elevate privileges and gain full
administrative control of the device. There are workarounds that address this vulnerability.

Please see the included Cisco BID and Cisco Security Advisory for more information.");
  # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-iosxr-LJtNFjeN
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?9d85a259");
  script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvs12604");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in Cisco bug ID CSCvs12604");
  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-3473");

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

  script_set_attribute(attribute:"vuln_publication_date", value:"2020/09/02");
  script_set_attribute(attribute:"patch_publication_date", value:"2020/09/02");
  script_set_attribute(attribute:"plugin_publication_date", value:"2020/09/25");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios_xr");
  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_ios_xr_version.nasl", "cisco_enum_smu.nasl");
  script_require_keys("Host/Cisco/IOS-XR/Version", "Settings/ParanoidReport");

  exit(0);
}

include('ccf.inc');

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

if (report_paranoia < 2) audit(AUDIT_PARANOID);

model = get_kb_item('CISCO/model');
if (empty_or_null(model))
  model = product_info['model'];
model = toupper(model);

if (model =~ "8[0-9]{3}") // 8000 Series Routers
{
  vuln_ranges = [
    { 'min_ver' : '5', 'fix_ver' : '7.0.12' },
    { 'min_ver' : '7.2', 'fix_ver' : '7.2.1' }
  ];
}
else if ("NCS4K" >< model || model =~ "NCS4[0-9]{3}") // Network Convergence System 4000 Series
{
  vuln_ranges = [
    { 'min_ver' : '0', 'fix_ver' : '6.6.3' }
  ];
  smus['6.5.29'] = 'CSCvs12604';
}
else if (
     'XRV9K' >< model || model =~ "XRV9[0-9]{3}" || "XRV 9" >< model // IOS XRv 9000 Router
  || 'NCS540' >< model || 'NCS560' >< model // Network Convergence System 540/560 Routers
  || 'NCS55' >< model || model =~ "NCS55[0-9]{2}" // Network Convergence System 5500 Series
  || 'NCS6K' >< model || model =~ "NCS6[0-9]{3}") // Network Convergence System 6000 Series
{
  vuln_ranges = [
    { 'min_ver' : '5', 'fix_ver' : '6.6.3' },
    { 'min_ver' : '7.0', 'fix_ver' : '7.0.2' },
    { 'min_ver' : '7.1', 'fix_ver' : '7.1.1' }
  ];
}
else audit(AUDIT_HOST_NOT, 'an affected model');

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

cisco::check_and_report(
  product_info:product_info,
  reporting:reporting,
  vuln_ranges:vuln_ranges,
  smus:smus
);