code | #TRUSTED a4972bf814d10290e69452923167cd624ee91bba432980e549fe6d5ff88b41c1bc43a8ab017be4ea84af276e2e742bd11a90dc93a914e7f7b7887d6e3c3c3cc38f8183c8b47168d81b0f1c8cdc6502cf78d3bf7d8a3db0842adbf73217d325d72259570f2dd00855a19b7a31f63c205308d4e704dbae6e24e6f8eb07dbfb3253cac0966bf694fb3c8918ec63e121857168dc110d75cfd3b579bc3b7eae6841511b419769780c4552c476054a654df2179bb33fecb577ba98951dc4b68ebe181a81d41be69b45206113729267f79fb1e1f91493b24479d3cd043d05bee4838dc56d0ef238e17a92015fd6628b755993241244ca2787abb923fe28fab4fd7726a6a616bf5b75b2d0f2d489aa5ee075b39d4de32efcf51169db20410348c3579256cae0550f40c3417453b8173c1275454735c31924c8d28b9ff3743eb9ea56edf82556d65bff93decffe7280f0db91f1ce45e3020d3aeba94e935a3f06b31e1631f7ee38fe2f67e333f2fe2677e33a792736ea168baa7857b24ba4f12ed468905ab60572884160f51d5f80455f0aa44270475e5486927f1c419657b4136bbeb77089e31446f2430f29cc135ba4b02b923ed5c96ba9039b9230f626873942fbb618bb4e0b5dfbaf2daa6aaaa4b76a8e11946c3666ed6009c7130d7410078de16a8187bd78e1605b291012dadf2e5d5c2fb0c39f6c96875b255b32a0e9a2f27c937b
#
# (C) Tenable Network Security, Inc.
#
include('compat.inc');
if (description)
{
script_id(132318);
script_version("1.4");
script_cvs_date("Date: 2019/12/23");
script_cve_id("CVE-2019-1605");
script_bugtraq_id(107313);
script_xref(name:"CISCO-BUG-ID", value:"CSCvh77526");
script_xref(name:"CISCO-BUG-ID", value:"CSCvi99224");
script_xref(name:"CISCO-BUG-ID", value:"CSCvi99225");
script_xref(name:"CISCO-BUG-ID", value:"CSCvi99227");
script_xref(name:"CISCO-BUG-ID", value:"CSCvi99228");
script_xref(name:"CISCO-SA", value:"cisco-sa-20190306-nx-os-api-ex");
script_name(english:"Cisco NX-OS Software NX-API Arbitrary Code Execution Vulnerability");
script_summary(english:"Checks the version of Cisco NX-OS Software");
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 NX-OS Software is affected by a vulnerability in the NX-API feature of
Cisco NX-OS Software that could allow an authenticated, local attacker to execute arbitrary code as root. The
vulnerability is due to incorrect input validation in the NX-API feature. An attacker could exploit this vulnerability
by sending a crafted HTTP or HTTPS request to an internal service on an affected device that has the NX-API feature
enabled. A successful exploit could allow the attacker to cause a buffer overflow and execute arbitrary code as root.
Note: The NX-API feature is disabled by default.
Please see the included Cisco BIDs and Cisco Security Advisory for more information");
# https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190306-nxos-api-ex
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?4326b1dc");
script_set_attribute(attribute:"see_also", value:"http://tools.cisco.com/security/center/viewErp.x?alertId=ERP-70757");
script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvh77526");
script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvi99224");
script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvi99225");
script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvi99227");
script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvi99228");
script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in Cisco bug ID CSCvh77526, CSCvi99224, CSCvi99225, CSCvi99227, and
CSCvi99228");
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-2019-1605");
script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
script_cwe_id(20);
script_set_attribute(attribute:"vuln_publication_date", value:"2019/03/06");
script_set_attribute(attribute:"patch_publication_date", value:"2019/03/06");
script_set_attribute(attribute:"plugin_publication_date", value:"2019/12/20");
script_set_attribute(attribute:"plugin_type", value:"combined");
script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:nx-os");
script_end_attributes();
script_category(ACT_GATHER_INFO);
script_family(english:"CISCO");
script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("cisco_nxos_version.nasl");
script_require_keys("Host/Cisco/NX-OS/Device", "Host/Cisco/NX-OS/Model", "Host/Cisco/NX-OS/Version");
exit(0);
}
include('audit.inc');
include('cisco_workarounds.inc');
include('ccf.inc');
product_info = cisco::get_product_info(name:'Cisco NX-OS Software');
cbi = '';
if ('MDS' >< product_info.device && product_info.model =~ '^90[0-9][0-9]')
cbi = 'CSCvi99225';
else if ('Nexus' >< product_info.device)
{
if (product_info.model =~ '^[39]0[0-9][0-9]')
cbi = 'CSCvh77526';
else if (product_info.model =~ '^(36|95)[0-9][0-9]')
cbi = 'CSCvi99224';
else if (product_info.model =~ '^7[07][0-9][0-9]')
cbi = 'CSCvi99225';
else if (product_info.model =~ '^35[0-9][0-9]')
cbi = 'CSCvi99227';
else if (product_info.model =~ '^(20|5[56]|60)[0-9][0-9]')
cbi = 'CSCvi99228';
else
audit(AUDIT_HOST_NOT, 'affected');
}
else
audit(AUDIT_HOST_NOT, 'affected');
version_list=make_list(
'7.3(2)D1(3a)',
'7.3(2)D1(3)',
'7.3(2)D1(2)',
'7.3(2)D1(1)',
'7.3(1)N1(1)',
'7.3(1)DY(1)',
'7.3(1)D1(1)',
'7.3(0)N1(1)',
'7.3(0)DY(1)',
'7.3(0)DX(1)',
'7.3(0)D1(1)',
'7.2(2)D1(2)',
'7.2(2)D1(1)',
'7.2(1)D1(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(2)A1(2d)',
'6.0(2)A1(1f)',
'6.0(2)A1(1e)',
'6.0(2)A1(1d)',
'6.0(2)A1(1c)',
'6.0(2)A1(1b)',
'6.0(2)A1(1a)',
'6.0(2)A1(1)',
'5.0(3)U5(1j)',
'5.0(3)U5(1i)',
'5.0(3)U5(1h)',
'5.0(3)U5(1g)',
'5.0(3)U5(1f)',
'5.0(3)U5(1e)',
'5.0(3)U5(1d)',
'5.0(3)U5(1c)',
'5.0(3)U5(1b)',
'5.0(3)U5(1a)',
'5.0(3)U5(1)',
'5.0(3)U4(1)',
'5.0(3)U3(2b)',
'5.0(3)U3(2a)',
'5.0(3)U3(2)',
'5.0(3)U3(1)',
'5.0(3)U2(2d)',
'5.0(3)U2(2c)',
'5.0(3)U2(2b)',
'5.0(3)U2(2a)',
'5.0(3)U2(2)',
'5.0(3)U2(1)',
'5.0(3)U1(2a)',
'5.0(3)U1(2)',
'5.0(3)U1(1d)',
'5.0(3)U1(1c)',
'5.0(3)U1(1b)',
'5.0(3)U1(1a)',
'5.0(3)U1(1)',
'5.0(3)A1(2a)',
'5.0(3)A1(2)',
'5.0(3)A1(1)'
);
workarounds = make_list(CISCO_WORKAROUNDS['nxos_nxapi']);
workaround_params = make_list();
reporting = make_array(
'port' , 0,
'severity' , SECURITY_HOLE,
'version' , product_info['version'],
'bug_id' , cbi
);
cisco::check_and_report(product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_versions:version_list);
|