Vulnerabilities > CVE-2017-3849 - Improper Input Validation vulnerability in Cisco IOS and IOS XE

047910
CVSS 6.1 - MEDIUM
Attack vector
ADJACENT_NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
COMPLETE
low complexity
cisco
CWE-20
nessus

Summary

A vulnerability in the Autonomic Networking Infrastructure (ANI) registrar feature of Cisco IOS Software (possibly 15.2 through 15.6) and Cisco IOS XE Software (possibly 3.7 through 3.18, and 16) could allow an unauthenticated, adjacent attacker to cause a denial of service (DoS) condition. The vulnerability is due to incomplete input validation on certain crafted packets. An attacker could exploit this vulnerability by sending a crafted autonomic network channel discovery packet to a device that has all the following characteristics: (1) running a Cisco IOS Software or Cisco IOS XE Software release that supports the ANI feature; (2) configured as an autonomic registrar; (3) has a whitelist configured. An exploit could allow the attacker to cause the affected device to reload. Note: Autonomic networking should be configured with a whitelist. Do not remove the whitelist as a workaround. Cisco Bug IDs: CSCvc42717.

Vulnerable Configurations

Part Description Count
OS
Cisco
161

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

Nessus

  • NASL familyCISCO
    NASL idCISCO-SA-20170320-ANI-IOS.NASL
    descriptionAccording to its self-reported version, the Cisco IOS software running on the remote device is affected by a denial of service vulnerability in the Autonomic Networking Infrastructure (ANI) registrar feature due to incomplete input validation of certain crafted packets. An unauthenticated, adjacent attacker can exploit this issue, via specially crafted autonomic network channel discovery packets, to cause the device to reload. Note that this issue only affect devices with ANI enabled that are configured as an autonomic registrar and that have a whitelist configured.
    last seen2020-06-01
    modified2020-06-02
    plugin id97943
    published2017-03-24
    reporterThis script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/97943
    titleCisco IOS ANI Registrar DoS (cisco-sa-20170320-ani)
    code
    #TRUSTED af6698cdcf055d543e800dd64a346cfa3e3c3ac0a9992db375ff14a715235697e979e64be9102bb9e3d35c16756fb6ae911b399102c301ae0b5b76e0d3b78ce8fe45efa62e3a902ac0486c71b329ec74b9912989caad8b0725791758d2adc959adb6141311ed19c0b1979bc42f66c1726e0a70c91085ff1ce88a1189b8e128e875737a7e973ce8fdf64d31f42e44b68240d763bc886d847b0896fe24a8ddba569e37c4cf8704a4586e5703addf7a35f6d03f4888dee72062b5d0745d52bf2e637ef2eb4e5cacb9eae129b0069046025261dfb43bb3d8ffe1e3d7637d62b14fb099914d05f8e98ddce558eadcb7c9f37a843ff94f1796a285ef8b72ee1f0cf178de735200c09824d2ef341a4cbf02d40ad6c03b4b137ec5977d9c8f0e50dc340ef21c7c4e6f84d23886b92ec8355bc4e4b4f88734b42bd0cbad2cbd02c9e6ba04311edda2e925ff09e1993ea9a54865e0c7275c5b62deb4ad88c90b556351f97e7d90eff3622e1b719e0f7011dfd906553635913501b65d81e52a66bdc9ac8d262386b7aac3aa271d2fdaf7c56e41ccb049c2bb31f9d6c1cced3da8a70f9e8798cbdc9e9e61b2812255f887ceec2c87871c9371dc79678b6fb4b9257f21b5fd1f1b649742c754c2a648ff771ffb86c22dce5ebe05cd99cec68c3f468b9feccf06a80e6c68aa83c60721bc1506a1cfbd94c48d5f53cf21654f30050ffd10440cc4
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(97943);
      script_version("1.8");
      script_cvs_date("Date: 2019/11/13");
    
      script_cve_id("CVE-2017-3849");
      script_bugtraq_id(96972);
      script_xref(name:"CISCO-BUG-ID", value:"CSCvc42717");
      script_xref(name:"CISCO-SA", value:"cisco-sa-20170320-ani");
    
      script_name(english:"Cisco IOS ANI Registrar DoS (cisco-sa-20170320-ani)");
      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 a denial of service vulnerability
    in the Autonomic Networking Infrastructure (ANI) registrar feature
    due to incomplete input validation of certain crafted packets. An
    unauthenticated, adjacent attacker can exploit this issue, via
    specially crafted autonomic network channel discovery packets, to
    cause the device to reload.
    
    Note that this issue only affect devices with ANI enabled that are
    configured as an autonomic registrar and that have a whitelist
    configured.");
      # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170320-ani
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?206d164a");
      script_set_attribute(attribute:"solution", value:
    "Apply the relevant patch referenced in Cisco Security Advisory
    cisco-sa-20170320-ani.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:L/Au:N/C:N/I:N/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2017/03/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2017/03/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/03/24");
    
      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) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      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");
    
    affected_versions = [
      '15.3(3)S',
      '15.3(3)S1',
      '15.3(3)S2',
      '15.3(3)S3',
      '15.3(3)S6',
      '15.3(3)S4',
      '15.3(3)S5',
      '15.3(3)S8',
      '15.3(3)S9',
      '15.2(3)E',
      '15.2(4)E',
      '15.2(3)E1',
      '15.2(3)E2',
      '15.2(3)E3',
      '15.2(4)E1',
      '15.2(4)E2',
      '15.2(5)E',
      '15.2(4)E3',
      '15.2(5a)E',
      '15.2(5)E1',
      '15.2(5b)E',
      '15.4(1)S',
      '15.4(3)S',
      '15.4(1)S1',
      '15.4(1)S2',
      '15.4(2)S1',
      '15.4(1)S3',
      '15.4(3)S1',
      '15.4(2)S2',
      '15.4(3)S2',
      '15.4(3)S3',
      '15.4(1)S4',
      '15.4(2)S3',
      '15.4(2)S4',
      '15.4(3)S4',
      '15.4(3)S5',
      '15.4(3)S6',
      '15.4(3)S6a',
      '15.5(1)S',
      '15.5(2)S',
      '15.5(1)S1',
      '15.5(3)S',
      '15.5(1)S2',
      '15.5(1)S3',
      '15.5(2)S1',
      '15.5(2)S2',
      '15.5(3)S1',
      '15.5(3)S1a',
      '15.5(2)S3',
      '15.5(3)S2',
      '15.5(3)S0a',
      '15.5(3)S3',
      '15.5(1)S4',
      '15.5(2)S4',
      '15.5(3)S4',
      '15.5(3)S5',
      '15.5(3)SN',
      '15.6(1)S',
      '15.6(2)S',
      '15.6(2)S1',
      '15.6(1)S1',
      '15.6(1)S2',
      '15.6(2)S2',
      '15.6(1)S3',
      '15.6(1)T',
      '15.6(2)T',
      '15.6(1)T0a',
      '15.6(1)T1',
      '15.6(2)T1',
      '15.6(1)T2',
      '15.6(2)T2',
      '15.6(2)SP',
      '15.6(2)SP1',
      '15.6(2)SN',
      '15.6(3)M',
      '15.6(3)M1',
      '15.6(3)M0a'
    ];
    
    foreach affected_version (affected_versions)
      if (ver == affected_version)
        flag++;
    
    # Check that ANI is running
    if (flag && get_kb_item("Host/local_checks_enabled"))
    {
      flag = 0;
      buf = cisco_command_kb_item("Host/Cisco/Config/show_run_autonomic","show run | include autonomic");
      if (check_cisco_result(buf))
      {
        if (
          ( !empty_or_null(buf) ) &&
          ( "no autonomic" >!< buf )
        ) flag = 1;
      }
      else if (cisco_needs_enable(buf))
      {
        flag = 1;
        override = 1;
      }
    }
    
    if (flag) security_report_cisco(severity:SECURITY_WARNING, port:0, version:ver, bug_id:'CSCvc42717', override:override);
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyCISCO
    NASL idCISCO-SA-20170320-ANI-IOSXE.NASL
    descriptionAccording to its self-reported version, the Cisco IOS XE software running on the remote device is affected by a denial of service vulnerability in the Autonomic Networking Infrastructure (ANI) registrar feature due to incomplete input validation of certain crafted packets. An unauthenticated, adjacent attacker can exploit this issue, via specially crafted autonomic network channel discovery packets, to cause the device to reload. Note that this issue only affect devices with ANI enabled that are configured as an autonomic registrar and that have a whitelist configured.
    last seen2020-06-01
    modified2020-06-02
    plugin id97944
    published2017-03-24
    reporterThis script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/97944
    titleCisco IOS XE ANI Registrar DoS (cisco-sa-20170320-ani)
    code
    #TRUSTED 6ff089bd24e5135689e3ee61fa57f920b72c73f948a8a57d3d5358a079770b9728aa3d566774160a7fd1aebea05889b8f203bafe0694ca3ed97be67ca7324732ae6d2b614f9f5036102fb15978c05aab4c901c7e55fa932a9d61ab85b4e3cd78cacaf11a141b2b7bbef6a36291d1c6bba6b854d124aa8d8ce55d507eea5ca6bf2eed2ff34a37c823d1d5876a9bc1b5997a29079e124f91e090732451c5d8709397f16624036858a86e25d5f2ac575a52068f998ddcd79a24b8802426d8fc5c9f9c3864fdd7929ca133b63180d9e90b7f981f1b63d7ed37cfc66cf4f6ab4d06a2632b41e14b8d651f0fd9f76a4cd6932ea89f21f81d964a33dd80954421560007c081af957f404c1b5b17596e9124695f8fd115848a977b28ae94e674b18f3273f5d55a013bb1bd3ae440f44276b8f2aa55e183fec9d19a072b2e4ebafc556a1ee7d3e212b5e9a740ae915bd5ed1043b3e07c5a445a738bbaa2c3c506f739ec78d7ed6de123cb332e7359a10118b15c022615472bcc347f9607be75820d9027f1ae3267a3eeee4d3e6da46e26ff48f2df6a4e36a0d5da262528c893bad24fcc0fdbca72c37b1054d5c30c455ce247e956aaeef157d2267351abcb84cb62fd354b2fff582da371390989350919a31db849f03f5e707dff32cb629b292d5ac23983380bee5d7c47144fe37810a3f7fb140bb1d781259fbcbb573703697837f3023e
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(97944);
      script_version("1.8");
      script_cvs_date("Date: 2019/11/13");
    
      script_cve_id("CVE-2017-3849");
      script_bugtraq_id(96972);
      script_xref(name:"CISCO-BUG-ID", value:"CSCvc42717");
      script_xref(name:"CISCO-SA", value:"cisco-sa-20170320-ani");
    
      script_name(english:"Cisco IOS XE ANI Registrar DoS (cisco-sa-20170320-ani)");
      script_summary(english:"Checks the IOS XE 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 XE software
    running on the remote device is affected by a denial of service
    vulnerability in the Autonomic Networking Infrastructure (ANI)
    registrar feature due to incomplete input validation of certain
    crafted packets. An unauthenticated, adjacent attacker can exploit
    this issue, via specially crafted autonomic network channel discovery
    packets, to cause the device to reload.
    
    Note that this issue only affect devices with ANI enabled that are
    configured as an autonomic registrar and that have a whitelist
    configured.");
      # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170320-ani
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?206d164a");
      script_set_attribute(attribute:"solution", value:
    "Apply the relevant patch referenced in Cisco Security Advisory
    cisco-sa-20170320-ani.");
      script_set_cvss_base_vector("CVSS2#AV:A/AC:L/Au:N/C:N/I:N/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:A/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2017/03/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2017/03/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/03/24");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios_xe");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CISCO");
    
      script_copyright(english:"This script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("cisco_ios_xe_version.nasl");
      script_require_keys("Host/Cisco/IOS-XE/Version");
    
      exit(0);
    }
    
    include("audit.inc");
    include("cisco_func.inc");
    include("cisco_kb_cmd_func.inc");
    
    ver = get_kb_item_or_exit("Host/Cisco/IOS-XE/Version");
    
    flag = 0;
    override = 0;
    
    affected_versions = [
      '3.10.0S',
      '3.10.1S',
      '3.10.2S',
      '3.10.3S',
      '3.10.4S',
      '3.10.5S',
      '3.10.6S',
      '3.10.2tS',
      '3.10.7S',
      '3.10.1xbS',
      '3.10.8S',
      '3.10.8aS',
      '3.11.1S',
      '3.11.2S',
      '3.11.0S',
      '3.11.3S',
      '3.11.4S',
      '3.12.1S',
      '3.12.2S',
      '3.12.3S',
      '3.12.0aS',
      '3.12.4S',
      '3.13.0S',
      '3.13.1S',
      '3.13.2S',
      '3.13.3S',
      '3.13.4S',
      '3.13.5S',
      '3.13.2aS',
      '3.13.0aS',
      '3.13.5aS',
      '3.13.6S',
      '3.13.6aS',
      '3.14.0S',
      '3.14.1S',
      '3.14.2S',
      '3.14.3S',
      '3.14.4S',
      '3.15.0S',
      '3.15.1S',
      '3.15.2S',
      '3.15.1cS',
      '3.15.3S',
      '3.15.4S',
      '3.7.0E',
      '3.7.1E',
      '3.7.2E',
      '3.7.3E',
      '3.7.4E',
      '3.7.5E',
      '3.16.0S',
      '3.16.1S',
      '3.16.1aS',
      '3.16.2S',
      '3.16.0cS',
      '3.16.3S',
      '3.16.2bS',
      '3.16.3aS',
      '3.16.4S',
      '3.16.4aS',
      '3.16.4bS',
      '3.16.5S',
      '3.16.4dS',
      '3.17.0S',
      '3.17.1S',
      '3.17.2S ',
      '3.17.1aS',
      '3.17.3S',
      '3.8.0E',
      '3.8.1E',
      '3.8.2E',
      '3.8.3E',
      '3.18.0aS',
      '3.18.0S',
      '3.18.1S',
      '3.18.2S',
      '3.18.3vS',
      '3.18.0SP',
      '3.18.1SP',
      '3.18.1aSP',
      '3.18.1bSP',
      '3.18.1cSP',
      '3.9.0E',
      '3.9.1E'
    ];
    
    foreach affected_version (affected_versions)
      if (ver == affected_version)
        flag++;
    
    # Check that ANI is running
    if (flag && get_kb_item("Host/local_checks_enabled"))
    {
      flag = 0;
      buf = cisco_command_kb_item("Host/Cisco/Config/show_run_autonomic","show run | include autonomic");
      if (check_cisco_result(buf))
      {
        if (
          ( !empty_or_null(buf) ) &&
          ( "no autonomic" >!< buf )
        ) flag = 1;
      }
      else if (cisco_needs_enable(buf))
      {
        flag = 1;
        override = 1;
      }
    }
    
    if (flag) security_report_cisco(severity:SECURITY_WARNING, port:0, version:ver, bug_id:'CSCvc42717', override:override);
    else audit(AUDIT_HOST_NOT, "affected");