We began by first conducting a cursory search to determine if sufficient vulnerabilities exist to conduct the survey of NAT and hole-punching security failures. Then, using broad search terms, we gathered over 300 documented vulnerabilities representing exposures within both consumer gateways and many commercial implementations
2 Duplicate entries, resulting from reliance on two database, were removed and a CVE vulnerability description review was undertaken to validate relevance of each result. When relevance could not be obtained through the vulnerability description alone, review of the supporting documents were conducted to determine final selection or rejection. In total, we identified 82 vulnerabilities directly related to NAT and 165 vulnerabilities related to hole-punching methods for our analysis.
6.2 Taxonomy Category Classifications
6.2.1 Classification Based on Target Relation (T).
Target relation classifications define the main relationship of the assessed protocol to an attack outcome. Within this category, we identify and define three distinct classifications: failures related to protocol implementation, failures aided by protocol use, and for NAT, a third category of tangential failures occurring in other systems resulting from the use of NAT.
Protocol Implementation (T-1) flaws are underlying weaknesses in implementation that are directly associated with either NAT or hole-punching methods. In our analysis, 60% of identified security vulnerabilities for hole-punching methods fall within this category, while 40% of NAT vulnerabilities are directly related to implementation within a system.
Protocol Aided (T-2) flaws are second-order security exposures that occur elsewhere within a device or network resulting from the use or operation of the assessed methods. When categorizing protocol aided security events, we focus on the final security exposure resulting from identified security weakness. For example, one deployment of UPnP within the Linksys WRT54G gateway allowed remote attacker’s to arbitrarily forward ports on the system due to no implementation of an origination validation process for a “addPortmapping” request [
20]. Protocol aided flaws represent the remaining 40% of identified flaws surrounding hole-punching methods while only representing 7.3% of NAT flaws.
Tangential (T-3) are flaws in other systems that occur through incorrect handling or processing resulting from the assessed method. This identification only occurred within the NAT environment, often exposing a system through incorrect use of public/private addressing or improper access control for NAT’d systems. Tangential flaws comprised 54% of all security flaws related to NAT.
6.2.2 Classification Based on Network Location (NL).
Network location categorizes an attack based on the vantage from where a successful exploitation can occur. Classification of network location is directly obtained from each CVE and are used to conduct overall trend analysis in Section
7.
Adjacent (NL-1) attacks originate from within the network boundary in either the same subnet, collision, or broadcast domain. A common example scenario would be a WiFi broadcast domain such as a coffee shop or other shared access environment. Attacks requiring network adjacency make up 9.7% of hole-punching and 3.7% of NAT vantages.
Remote (NL-2) attacks originate from an external network, typically one or more network hops away. Remote attacks require use of the OSI Network layer for execution. Across both assessed methods, remote vantages represent the most common exploitable vantage, representing 82.4% and 87.8% of occurrences for hole-punching and NAT, respectively. We suspect these classifications within the NVD over-rely on the “remote” classification of attacks due to term usage ambiguity, which we discuss further in Section
7.3.
Local/System (NL-3) attacks require direct access to the target device to successfully execute. These type of attacks commonly exhibit a flaw in code or resource management that cannot be exploited through remote interaction. Together, local/system access represent 7.8% and 8.5% of security flaws for hole-punching and NAT, respectively.
6.2.3 Classification Based on Security Weakness (SW).
are defined by the primary failure of a system or protocol that leads to an exposure. Within the National Vulnerability Database, vulnerabilities are assigned a weakness enumeration value corresponding to one of hundreds of possible weaknesses. In cases where multiple overlapping definitions occur, we have consolidated them into a single category to focus on the broader security concern (e.g., CWE-119 “Improper Restriction of Operations withing the Bounds of a Memory Buffer,” CWE-120 “Buffer Copy Without Checking Size of Input,” and CWE-121 “Stack-based Buffer Overflow” are classified as a single “Improper Buffer Restriction”).
Additionally, security flaws may build upon one another, resulting in a sequence of exposures that lead to an eventual compromise. As an example, weak input validation may lead to a buffer overflow condition that results in the ability to perform a code execution attack. For our categorization process, we focus on the initial flaw as the primary security weakness for our categorization as it is the root vector.
Improper Restriction of Buffer (SW-1) occurs when an operation extends beyond its assigned bounds within memory. Buffer overflows are the most common type of security weakness found in hole-punching methods, resulting in nearly one quarter of all exploitation effects. In contrast to hole-punching mechanisms, weaknesses within NAT resulting in buffer overflows are the least common security weakness, occurring in less than 3% of reported security flaws in our assessment.
Input Validation (SW-2) failures improperly check user inputs against expected values or length. While improper input validation is a common vector for buffer overflows, we differentiate this categorization when the input validation failure is the primary avenue or method to initiate an exposure resulting from a user-provided input. Input validation security weaknesses are common to both assessed methods, occurring in 17.7% of hole-punching and 17.1% of NAT weaknesses.
Permissions, Privileges, and Access Control (SW-3) are a broad categorization of many security weaknesses that fail to restrict access or device interaction to an authorized scope, resulting in exposure of a device, controls, or data. This categorization has the second highest rate of occurrence within hole-punching methods, accounting for 20.7% of assessed weaknesses. This occurrence drops significantly within NAT, accounting for only 4.9% of assessed security weaknesses.
Resource Management (SW-4) weaknesses result in uncontrolled utilization or improper bounding of a system resource. For example, NAT implementation within versions of the Cisco IOS resulted in memory leaks via malformed SIP packets attempting to traverse a gateway [
21]. Resource management flaws occur in 22% of assessed vulnerabilities for NAT and 10.4% of hole-punching weaknesses.
Improper Credential Authorization, Bypass, Protection (SW-5) flaws are the result of an attacker obtaining elevated access to a system through improper presentation and acceptance of credentials by a system, or by bypassing authorization mechanisms that restrict user access. Authentication flaws occur in 12.2% of hole-punching and 4.9% of NAT assessed security weaknesses.
System Configuration (SW-6) weaknesses are those in which the default configuration of a device fails to present a secure operational baseline. As an example, this categorization could result from configurations where services intended for use on an internal network are improperly configured to operate on the untrusted side of the network, which occurred in the commonly referenced “Unplug, Don’t Play” Rapid 7 assessment of consumer gateway security [
77]. System configuration flaws occurred in 8.5% of hole-punching and 2.4% of NAT assessed weaknesses.
Coding Error (SW-7) encompasses the many potential methods in which a program may fail where a more specific categorization is not present, such as with an off-by-one calculation error. Coding errors present a small, but unique, subset of weakness classification, representing 4.8% and 7.5% of assessed weaknesses within hole-punching and NAT.
Clear-text Transmission of Sensitive Information (SW-8) presents just one example (0.6%) within the hole-punching categorization. Here, a device presented administrative credentials to any adjacent user performing a UPnP “X_getAccess” SOAP request to the IGD [
27].
Improper Resource Validation/Handling (SW-9) occurs within systems that fail to properly check or account for varying responses to processing inputs. For example, the Windows implementation of NAT in Server 2012 did not properly validate memory addresses when processing ICMP packets, resulting in a denial of service condition [
22]. This type of weakness is commonly found within the NAT processing environment, where packet processing implementations fail to account for address translation, commonly resulting in unintended exposure of devices and networked systems. This flaw is the most common security weaknesses within NAT, representing 23.2% of assessed weaknesses. There were no resulting weaknesses identified for this category within the hole-punching classification.
6.2.4 Classification Based on Primary Effect (PE).
Primary effects result from the exploitation of a system weakness. They represent the final goal an attacker would seek to achieve.
Denial of Service (PE-1) occurs when a device is no longer able to service legitimate requests. Common methods include system crashes due to buffer overflows, resource exhaustion, or configuration changes resulting in a service outage. Denial of service is the most common outcome for both hole-punching and NAT effects representing 29.1% and 64.6% of assessed effects.
Code/ Command Execution (PE-2) is one of the most critical vulnerabilities as it allows an attacker to change the behavior of a system. Devices, such as VeraEdge, have demonstrated attacks in which the UPnP service accepts un-sanitized URLs, enabling code execution via a buffer overflow. A number of buffer overflow flaws in UPnP alone allow attackers to execute code on a local device [
77]. This is the second most common effect within hole-punching vulnerabilities, representing 17.6% of vulnerability outcomes. Only 6.1% of NAT vulnerabilities experience this effect.
Authentication Bypass/Privilege Escalation (PE-3) are effects that provide an attacker some level of access to a targeted system. These effects are commonly found within the hole-punching category as many of the methods provide avenues for an attacker to interact with and exploit the targeted device by bypassing authentication controls. 13.9% of hole-punching effects provide some level of privilege escalation or bypass. In contrast, only one instance of NAT allowed for an attacker to obtain elevated privileges based on an application improperly relying on a gateway address for device identification, resulting in all NAT’d users being provided administrator access [
24].
Data Loss/System Information Exposure (PE-4) is a broad categorization of exposures resulting in an attacker accessing or viewing information reserved for a privileged or restricted scope. The attacker is not able to execute any further direct attack beyond the viewing of exposed privileged information, though the information may enable further efforts such as direct targeting of a device. This effect is the second most common outcome for NAT vulnerabilities, representing 14.6% of assessed exposures. For hole-punching, only 7.9% of vulnerabilities exhibited this outcome.
Security Bypass/System Access (PE-5). Any method in which the primary effect presents access to the system in which an attacker may execute further action are presented under this category. This categorization extends beyond the authentication/privilege bypass methods previously categorized by focusing on system level flaws that enable access to a targeted device. Vulnerabilities exhibiting this effect occur in 11% of NAT and 4.9% of hole-punching classifications.
Connection/Session Hijack (PE-6) occurs when an attacker is able to take over control of an active connection/session. For NAT, two occurrences of a session hijack occur. In the first case, a sip registration service failed to properly require registration when NAT was enabled, allowing a remote user to take over any active session [
25]. In the second case, a Netgear DIR-615 router identified users by their gateway IP for remote access, allowing an attacker to sniff the gateway public IP and take over a session without being prompted for credentials [
26]. For hole-punching, incorrect implementation of the TURN/STUN protocol within WeMo devices allowed an attacker to hijack connections to any other connected WeMo device [
23].
Masquerade (PE-7) differs from a connection hijack in that the attacker is able to establish their own connection under another user or session. This effect again presents itself rarely, representing just a single occurrence across both NAT and hole-punching effects.
Port Forward (PE-8) is unique only to hole-punching methods. Port forwarding is a desirable effect to an attacker as it provides a path for inbound traffic to traverse a perimeter security implementation, such as a firewall or NAT gateway. Port forwarding represents 14.6% of assessed security effects within the hole-punching category.
6.2.5 Classification Based on Primary Exposure (PX).
Primary exposures define the primary type of data or access revealed by an attack. The CVE classification methodology relies on the familiar CIA triad of confidentiality, integrity, and availability when categorizing an exposure, with sub categorizations of none, partial, and complete (None, Low, and High for CVE 3.x). While this methodology provides for a quick assessment of impact across the core tenets of information security, it does little to communicate what exactly is being exposed. Therefore, we expand on this classification, identifying from our dataset four categorizations of exposure that identify what an attacker may ultimately gain.
User Data (PX-1) consists of all data generated by a user and may include items such as payload data in IP communications, metadata such as use statistics, or identification of devices within an environment. One example of this type of data loss would be the public exposure of IP cameras that allowed a remote attacker to eavesdrop via publicly exposed STUN ports [
73].
System Data (PX-2) exposure consists of device information such as type, configuration, or protocol communication traffic that could be used to fingerprint or determine exposure to known vulnerabilities. This information typically provides information that enables follow-on targeting of system components.
Credentials (PX-3) are any event where the primary effect results in the attainment of system or user credentials. Methods to bypass credentials are not classified here as they would provide direct access to system resources or control.
System Controls/Resources (PX-4) are those in which any unauthorized user is presented with access to a device or protocol control or resource. Attacks in which malicious users are afforded this type of exposure typically result in changes to operational state or configuration in ways that are beneficial to the attacker. This may include methods to further goals, such as with code injection, or as simply an end means, such as corruption of resources.
6.2.6 Classification Based on Exposure Impact (XI).
Exposure impact communicates, in broad terms, the potential impact to a user, device, or network resulting from an attacker successfully exploiting a weakness. There are two classification methodologies present in the NVD, the CVE 2.x methodology and the CVE 3.x methodology. The 2.x methodology classifies an impact as either a Low, Medium, or High threat while the 3.x expands this classification to include None and Critical categories. The 3.x methodology was first introduced in 2016, limiting applicability across all of our assessed vulnerabilities. However, the NVD continues to provide 2.x scoring along with the newer 3.x deployment, allowing for direct comparison of vulnerabilities and trends. For our impact classification, we rely on the 2.x categorization of impacts provided by the NVD, to allow for direct comparison across all vulnerabilities.
Low (IX-1) represents a CVE impact scoring of 3.9 or less. When reviewing NAT and hole-punching methods, a total of four NAT and eleven hole-punching impact scores fell in this categorization, representing 4.8% and 6.6% of the total assessed vulnerabilities.
Medium (IX-2) represents an impact score ranging from 4.0 to 6.9. A total of 31 NAT and 69 hole-punching methods received a Medium score, representing 37.8% and 41.8% of the total vulnerabilities assessed.
High (IX-3) represent the greatest impact categorization covering scores between 7.0 and 10.0. A total of 47 (57.3%) and 85 (51.5%) examples fall within this categorization for NAT and hole-punching, respectively, representing both the largest share of events and greatest threat to a user or network.