Cisco IOS NTP Subsystem Unauthorized Access (cisco-sa-20160419-ios)

2016-05-03T00:00:00
ID CISCO-SA-20160419-NTP-IOS.NASL
Type nessus
Reporter Tenable
Modified 2018-08-09T00:00:00

Description

According to its self-reported version, the Cisco IOS software running on the remote device is affected by an unauthorized access vulnerability in the NTP subsystem due to a failure to check the authorization of certain NTP packets. An unauthenticated, remote attacker can exploit this issue, via specially crafted NTP packets, to control the time of the remote device.

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

include("compat.inc");

if (description)
{
  script_id(90861);
  script_version("1.4");
  script_set_attribute(attribute:"plugin_modification_date", value:"2018/08/09");

  script_cve_id("CVE-2016-1384");
  script_xref(name:"CISCO-BUG-ID", value:"CSCux46898");
  script_xref(name:"CISCO-SA", value:"cisco-sa-20160419-ios");

  script_name(english:"Cisco IOS NTP Subsystem Unauthorized Access (cisco-sa-20160419-ios)");
  script_summary(english:"Checks the IOS version.");

  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, the Cisco IOS software running
on the remote device is affected by an unauthorized access
vulnerability in the NTP subsystem due to a failure to check the
authorization of certain NTP packets. An unauthenticated, remote
attacker can exploit this issue, via specially crafted NTP packets, to
control the time of the remote device.");
  # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20160419-ios
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?8965288b");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in Cisco bug ID
CSCux46898.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N");

  script_set_attribute(attribute:"vuln_publication_date", value:"2016/04/19");
  script_set_attribute(attribute:"patch_publication_date", value:"2016/04/19");
  script_set_attribute(attribute:"plugin_publication_date", value:"2016/05/03");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"CISCO");

  script_copyright(english:"This script is Copyright (C) 2016-2018 Tenable Network Security, Inc.");

  script_dependencies("cisco_ios_version.nasl");
  script_require_keys("Host/Cisco/IOS/Version");

  exit(0);
}

include("audit.inc");
include("cisco_func.inc");
include("cisco_kb_cmd_func.inc");

flag = 0;
override = 0;

ver = get_kb_item_or_exit("Host/Cisco/IOS/Version");

# Check for vuln version
# Below are from CVRF
if ( ver == '15.1(1)S' ) flag++;
if ( ver == '15.1(1)S1' ) flag++;
if ( ver == '15.1(1)S2' ) flag++;
if ( ver == '15.1(2)S' ) flag++;
if ( ver == '15.1(2)S1' ) flag++;
if ( ver == '15.1(2)S2' ) flag++;
if ( ver == '15.1(3)S' ) flag++;
if ( ver == '15.1(3)S0a' ) flag++;
if ( ver == '15.1(3)S1' ) flag++;
if ( ver == '15.1(3)S2' ) flag++;
if ( ver == '15.1(3)S3' ) flag++;
if ( ver == '15.1(3)S4' ) flag++;
if ( ver == '15.1(3)S5' ) flag++;
if ( ver == '15.1(3)S5a' ) flag++;
if ( ver == '15.1(3)S6' ) flag++;
if ( ver == '15.5(3)M' ) flag++;
if ( ver == '15.5(3)M0a' ) flag++;
if ( ver == '15.5(3)M1' ) flag++;
if ( ver == '15.5(1)S' ) flag++;
if ( ver == '15.5(1)S1' ) flag++;
if ( ver == '15.5(1)S2' ) flag++;
if ( ver == '15.5(1)S3' ) flag++;
if ( ver == '15.5(1)S4' ) flag++;
if ( ver == '15.5(2)S' ) flag++;
if ( ver == '15.5(2)S1' ) flag++;
if ( ver == '15.5(2)S2' ) flag++;
if ( ver == '15.5(2)S3' ) flag++;
if ( ver == '15.5(3)S' ) flag++;
if ( ver == '15.5(3)S0a' ) flag++;
if ( ver == '15.5(3)S1' ) flag++;
if ( ver == '15.5(3)S1a' ) flag++;
if ( ver == '15.5(3)SN' ) flag++;
if ( ver == '15.5(2)T' ) flag++;

# NTP check
if (flag && get_kb_item("Host/local_checks_enabled"))
{
  buf = cisco_command_kb_item("Host/Cisco/Config/show_ntp_status", "show ntp status");
  # Check for traces of ntp
  if (check_cisco_result(buf))
  {
    if (
      "%NTP is not enabled." >< buf &&
      "system poll" >!< buf &&
      "Clock is" >!< buf
    ) audit(AUDIT_HOST_NOT, "affected because NTP is not enabled");
  }
  else if (cisco_needs_enable(buf)) override = 1;
}

if (flag)
{
  if (report_verbosity > 0)
  {
    report =
      '\n  Cisco bug ID      : CSCux46898' +
      '\n  Installed release : ' + ver +
      '\n';
    security_warning(port:0, extra:report + cisco_caveat(override));
  }
  else security_warning(port:0, extra:cisco_caveat(override));
}
else audit(AUDIT_HOST_NOT, "affected");