Guest

Identifying and Mitigating Exploitation of the IKEv1 Information Disclosure Vulnerability in Multiple Cisco Products

Cisco Response

This document is a companion to the PSIRT Security Advisory IKEv1 Information Disclosure Vulnerability in Multiple Cisco Products and provides identification and mitigation techniques that administrators can deploy on Cisco network devices.

Vulnerability Characteristics

Cisco IOS Software, IOS-XE Software, and IOS-XR Software contains a vulnerability when processing a specially crafted IP version 4 (IPv4) or IP version 6 (IPv6) packet. This vulnerability can be exploited remotely without authentication and without end-user interaction. Successful exploitation of this vulnerability could allow information disclosure, which enables an attacker to learn information about the affected device and network.

The attack vectors for exploitation are through IPv4 and IPv6 packets using the following protocols and ports:

  • IKE using UDP port 500
  • GDOI using UDP port 848
  • IKE NAT-T using UDP port 4500
  • GDOI NAT-T using UDP port 4848

This vulnerability has been assigned Common Vulnerabilities and Exposures (CVE) identifier CVE-2016-6415.

Vulnerability Overview

Information about vulnerable, unaffected, and fixed software is available in the Cisco Security Advisory, which is available at the following link: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20160916-ikev1.

Mitigation Technique Overview

Cisco devices provide several countermeasures for these vulnerabilities. Administrators are advised to consider these protection methods to be general security best practices for infrastructure devices and the traffic that transits the network. This section of the document provides an overview of these techniques.

Cisco IOS Software can provide effective means of exploit prevention using infrastructure access control lists (iACLs).

This protection mechanism filters and drops packets that are attempting to exploit these vulnerabilities.

Effective exploit prevention can also be provided by the Cisco ASA 5500 and 5500-X Series Adaptive Security Appliance, Cisco Catalyst 6500 Series ASA Services Module (ASASM), and the Firewall Services Module (FWSM) for Cisco Catalyst 6500 Series Switches and Cisco 7600 Series Routers using transit access control lists (tACLs).

Cisco IOS NetFlow and Flexible NetFlow records can provide visibility into network-based exploitation attempts.

Effective use of Cisco Intrusion Prevention System (IPS) event actions provides visibility into and protection against attacks that attempt to exploit these vulnerabilities.

Effective use of Cisco Sourcefire Next-Generation Intrusion Prevention System event actions provides visibility into and protection against attacks that attempt to exploit these vulnerabilities.

Risk Management

Organizations are advised to follow their standard risk evaluation and mitigation processes to determine the potential impact of this vulnerability. Triage refers to sorting projects and prioritizing efforts that are most likely to be successful. Cisco has provided documents that can help organizations develop a risk-based triage capability for their information security teams. Risk Triage for Security Vulnerability Announcements and Risk Triage and Prototyping can help organizations develop repeatable security evaluation and response processes.

Device-Specific Mitigation and Identification

Caution:The effectiveness of any mitigation technique depends on specific customer situations such as product mix, network topology, traffic behavior, and organizational mission. As with any configuration change, evaluate the impact of this configuration prior to applying the change.

Specific information about mitigation and identification is available for these devices:

Cisco IOS Routers and Switches

Mitigation: Infrastructure Access Control Lists

To protect infrastructure devices and minimize the risk, impact, and effectiveness of direct infrastructure attacks, administrators are advised to deploy infrastructure access control lists (iACLs) to perform policy enforcement of traffic sent to infrastructure equipment. Administrators can construct an iACL by explicitly permitting only authorized traffic sent to infrastructure devices in accordance with existing security policies and configurations. For the maximum protection of infrastructure devices, deployed iACLs should be applied in the ingress direction on all interfaces to which an IP address has been configured. An iACL workaround cannot provide complete protection against these vulnerabilities when the attack originates from a trusted source address. An iACL workaround cannot be used when the peer VPN device addresses are unknown in advance of the iACL deployment, such as the case with a remote access VPN.

The iACL policy denies unauthorized IKE and GDOI IPv4 and IPv6 packets on UDP ports 500, 848, 4500, 4848 that are sent to affected devices. In the following example, 192.168.60.0/24 and 2001:DB8:1:60::/64 represent the IP address space that is used by the affected devices, and the hosts at 192.168.100.1 and 2001:DB8::100:1 are considered trusted sources that require access to the affected devices. Care should be taken to allow required traffic for routing and administrative access prior to denying all unauthorized traffic. Whenever possible, infrastructure address space should be distinct from the address space used for user and services segments. Using this addressing methodology will assist with the construction and deployment of iACLs.

Additional information about iACLs is in Protecting Your Core: Infrastructure Protection Access Control Lists.

ip access-list extended Infrastructure-ACL-Policy
  !
  !-- Include explicit permit statements for trusted sources that
  !-- require access on the vulnerable UDP ports
  !
  permit udp host 192.168.100.1 192.168.60.0 0.0.0.255 eq 500
  permit udp host 192.168.100.1 192.168.60.0 0.0.0.255 eq 848
  permit udp host 192.168.100.1 192.168.60.0 0.0.0.255 eq 4500
  permit udp host 192.168.100.1 192.168.60.0 0.0.0.255 eq 4848
  !
  !-- The following vulnerability-specific access control entries
  !-- (ACEs) can aid in identification of attacks
  !
  deny udp any 192.168.60.0 0.0.0.255 eq 500
  deny udp any 192.168.60.0 0.0.0.255 eq 848
  deny udp any 192.168.60.0 0.0.0.255 eq 4500
  deny udp any 192.168.60.0 0.0.0.255 eq 4848
  !
  !-- Explicit deny ACE for traffic sent to addresses configured within
  !-- the infrastructure address space
  !
  deny ip any 192.168.60.0 0.0.0.255  
  !
  !-- Permit or deny all other Layer 3 and Layer 4 traffic in accordance
  !-- with existing security policies and configurations
  !
!
!-- Create the corresponding IPv6 iACL 
!
ipv6  access-list IPv6-Infrastructure-ACL-Policy
  !
  !-- Include explicit permit statements for trusted sources that
  !-- require access on the vulnerable UDP ports
  !
  permit udp host 2001:DB8::100:1 2001:DB8:1:60::/64 eq 500
  permit udp host 2001:DB8::100:1 2001:DB8:1:60::/64 eq 848
  permit udp host 2001:DB8::100:1 2001:DB8:1:60::/64 eq 4500
  permit udp host 2001:DB8::100:1 2001:DB8:1:60::/64 eq 4848
  !
  !-- The following vulnerability-specific access control entries
  !-- (ACEs) can aid in identification of attacks to global and
  !-- link-local addresses
  !
  deny udp any 2001:DB8:1:60::/64 eq 500
  deny udp any 2001:DB8:1:60::/64 eq 848
  deny udp any 2001:DB8:1:60::/64 eq 4500
  deny udp any 2001:DB8:1:60::/64 eq 4848
  !
  !-- Permit other required traffic to the infrastructure address
  !-- range and allow IPv6 neighbor discovery packets, which
  !-- include neighbor solicitation packets and neighbor
  !-- advertisement packets
  !
  permit icmp any any nd-ns
  permit icmp any any nd-na
  ! 
!-- Explicit deny for all other IPv6 traffic to the global !-- infrastructure address range !

deny ipv6 any 2001:DB8:1:60::/64 !
!-- Permit or deny all other Layer 3 and Layer 4 traffic !-- in accordance with existing security policies and configurations !
! !-- Apply iACLs to interfaces in the ingress direction ! interface GigabitEthernet0/0 ip access-group Infrastructure-ACL-Policy in ipv6 traffic-filter IPv6-Infrastructure-ACL-Policy in

Note that filtering with an interface access list will elicit the transmission of ICMP unreachable messages back to the source of the filtered traffic. Generating these messages could have the undesired effect of increasing CPU utilization on the device. In Cisco IOS Software, ICMP unreachable generation is limited to one packet every 500 milliseconds by default. ICMP unreachable message generation can be disabled using the interface configuration commands no ip unreachables no ipv6 unreachables. ICMP unreachable rate limiting can be changed from the default using the global configuration commands ip icmp rate-limit unreachable interval-in-ms and ipv6 icmp error-interval interval-in-ms.

For information on how to use the IOS command line interface to gauge the effectiveness of the iACL, please refer to the Cisco Security Intelligence Operations white paper Identifying the Effectiveness of Security Mitigations Using Cisco IOS Software.

Identification: IPv4 and IPv6 Traffic Flow Identification Using Cisco IOS NetFlow and Flexible NetFlow

Administrators can configure Cisco IOS NetFlow and Cisco IOS Flexible NetFlow on Cisco IOS routers and switches to aid in the identification of IPv4 and IPv6 traffic flows that may be attempts to exploit these vulnerabilities. Administrators are advised to investigate flows to determine whether they are attempts to exploit these vulnerabilities or whether they are legitimate traffic flows. Administrators can also configure filters to highlight traffic on individual ports to identify traffic flows that may be attempts to exploit the vulnerabilities mentioned in this document. For additional information, see the Cisco IOS NetFlow and Cisco IOS Flexible NetFlow section of the paper Identifying the Effectiveness of Security Mitigations Using Cisco IOS Software.

Cisco ASA, Cisco ASASM, and Cisco FWSM Firewalls

Mitigation: Transit Access Control Lists

To protect the network from traffic that enters the network at ingress access points, which may include Internet connection points, partner and supplier connection points, or VPN connection points, administrators are advised to deploy tACLs to perform policy enforcement. Administrators can construct a tACL by explicitly permitting only authorized traffic to enter the network at ingress access points or permitting authorized traffic to transit the network in accordance with existing security policies and configurations. A tACL workaround cannot provide complete protection against these vulnerabilities when the attack originates from a trusted source address. An iACL workaround cannot be used when the peer VPN device addresses are unknown in advance of the iACL deployment, such as the case with a remote access VPN.

The tACL policy denies unauthorized IKE and GDOI IPv4 and IPv6 packets on UDP ports 500, 848, 4500, and 4848 that are sent to affected devices. In the following example, 192.168.60.0/24 and 2001:DB8:1:60::/64 represent the IP address space that is used by the affected devices, and the hosts at 192.168.100.1 and 2001:DB8::100:1 are considered trusted sources that require access to the affected devices. Care should be taken to allow required traffic for routing and administrative access prior to denying all unauthorized traffic.

Additional information about tACLs is in Transit Access Control Lists: Filtering at Your Edge.

!
!-- Include explicit permit statements for trusted sources
!-- that require access on the vulnerable UDP ports
!
access-list tACL-Policy extended permit udp host 192.168.100.1 
     192.168.60.0 255.255.255.0 eq 500
access-list tACL-Policy extended permit udp host 192.168.100.1 
     192.168.60.0 255.255.255.0 eq 848
access-list tACL-Policy extended permit udp host 192.168.100.1 
     192.168.60.0 255.255.255.0 eq 4500
access-list tACL-Policy extended permit udp host 192.168.100.1 
     192.168.60.0 255.255.255.0 eq 4848
!
!-- The following vulnerability-specific access control entries
!-- (ACEs) can aid in identification of attacks
!
access-list tACL-Policy extended deny udp any 192.168.60.0 255.255.255.0 eq 500
access-list tACL-Policy extended deny udp any 192.168.60.0 255.255.255.0 eq 848
access-list tACL-Policy extended deny udp any 192.168.60.0 255.255.255.0 eq 4500
access-list tACL-Policy extended deny udp any 192.168.60.0 255.255.255.0 eq 4848
!
!-- Permit or deny all other Layer 3 and Layer 4 traffic in accordance
!-- with existing security policies and configurations
!
!-- Explicit deny for all other IP traffic
!
access-list tACL-Policy extended deny ip any any
!
!-- Create the corresponding IPv6 tACL
!
!-- Include explicit permit statements for trusted sources that
!-- require access on the vulnerable UDP ports
!
ipv6 access-list IPv6-tACL-Policy permit udp host 2001:DB8::100:1
          2001:db8:1:60::/64 eq 500
ipv6 access-list IPv6-tACL-Policy permit udp host 2001:DB8::100:1
          2001:db8:1:60::/64 eq 848
ipv6 access-list IPv6-tACL-Policy permit udp host 2001:DB8::100:1
          2001:db8:1:60::/64 eq 4500
ipv6 access-list IPv6-tACL-Policy permit udp host 2001:DB8::100:1
          2001:db8:1:60::/64 eq 4848
!
!--  The following vulnerability-specific access control entries
!--  (ACEs) can aid in identification of attacks
!
ipv6 access-list IPv6-tACL-Policy deny udp any 2001:db8:1:60::/64 eq 500
ipv6 access-list IPv6-tACL-Policy deny udp any 2001:db8:1:60::/64 eq 848
ipv6 access-list IPv6-tACL-Policy deny udp any 2001:db8:1:60::/64 eq 4500
ipv6 access-list IPv6-tACL-Policy deny udp any 2001:db8:1:60::/64 eq 4848
!
!--  Permit or deny all other Layer 3 and Layer 4 traffic in accordance
!--  with existing security policies and configurations
!
!--  Explicit deny for all other IP traffic
!
ipv6 access-list IPv6-tACL-Policy deny ip any any
!
!--  Apply tACLs to interfaces in the ingress direction
!
access-group tACL-Policy in interface outside
access-group IPv6-tACL-Policy in interface outside

For information on using the Cisco Firewall command line interface to gauge the effectiveness of transit access control lists, please refer to the Cisco Security Intelligence Operations white paper Identification of Security Exploits with Cisco ASA, Cisco ASASM, and Cisco FWSM Firewalls.

Starting in Cisco Adaptive Security Appliance (ASA) Software Release 9.0, access control lists (ACLs) namely unified ACLs, support IPv4 and IPv6 addresses. A mix of IPv4 and IPv6 addresses can be specified for the source and destination of the ACL. The any4 and any6 keywords were added to represent IPv4-only and IPv6-only traffic, respectively.

The IPv4 and IPv6 access list entries (ACEs) presented in the IPv4 and IPv6 ACLs of this section could also be incorporated in one unified ACL.

For more information about unified ACLs, refer to the Extended Access Control Lists section of the Cisco ASA configuration guide.

Cisco Intrusion Prevention System

Mitigation: Cisco IPS Signature Table

Administrators can use the Cisco IPS appliances and services modules to provide threat detection and help prevent attempts to exploit several of the vulnerabilities described in this document. The following table provides an overview of CVE identifiers and the respective Cisco IPS signatures that will trigger events on potential attempts to exploit these vulnerabilities.

CVE ID Signature Release Signature ID Signature Name Enabled Severity Fidelity*
CVE-2016-6415 S942 7699/0 Cisco Device Internet Key Exchange Private Key Extraction Yes High 75

* Fidelity is also referred to as Signature Fidelity Rating (SFR) and is the relative measure of the accuracy of the signature (predefined). The value ranges from 0 through 100 and is set by Cisco Systems, Inc.

Administrators can configure Cisco IPS sensors to perform an event action when an attack is detected. The configured event action performs preventive or deterrent controls to help protect against an attack that is attempting to exploit the vulnerabilities listed in the preceding table.

Cisco IPS sensors are most effective when deployed in inline protection mode combined with the use of an event action. Automatic Threat Prevention for Cisco IPS 7.x and 6.xsensors that are deployed in inline protection mode provides threat prevention against an attack that is attempting to exploit the vulnerability that is described in this document. Threat prevention is achieved through a default override that performs an event action for triggered signatures with a riskRatingValue greater than 90.

For additional information about the risk rating and threat rating calculation, reference Risk Rating and Threat Rating: Simplify IPS Policy Management.

For information on using Cisco Security Manager to view the activity from a Cisco IPS sensor, see Identification of Malicious Traffic Using Cisco Security Manager white paper.

Sourcefire Signature Information

The following Sourcefire Snort signatures are available for the vulnerabilities discussed in this document.

CVE ID GID:SID
CVE-2016-6415 1:40220
CVE-2016-6415 1:40221
CVE-2016-6415 1:40222

For information about using Sourcefire Snort and Sourcefire Next Generation IPS, reference Sourcefire Next-Generation Security.

THIS DOCUMENT IS PROVIDED ON AN "AS IS" BASIS AND DOES NOT IMPLY ANY KIND OF GUARANTEE OR WARRANTY, INCLUDING THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. YOUR USE OF THE INFORMATION ON THE DOCUMENT OR MATERIALS LINKED FROM THE DOCUMENT IS AT YOUR OWN RISK. CISCO RESERVES THE RIGHT TO CHANGE OR UPDATE THIS DOCUMENT AT ANY TIME.

Complete information on reporting security vulnerabilities in Cisco products, obtaining assistance with security incidents, and registering to receive security information from Cisco, is available on Cisco's worldwide website at http://www.cisco.com/web/about/security/psirt/security_vulnerability_policy.html. This includes instructions for press inquiries regarding Cisco security notices. All Cisco security advisories are available at http://www.cisco.com/go/psirt.

Last updated: September 21, 2016