draft-ietf-v6ops-tunnel-security-concerns-04.txt   rfc6169.txt 
IPv6 Operations Working Group S. Krishnan Internet Engineering Task Force (IETF) S. Krishnan
Internet-Draft Ericsson Request for Comments: 6169 Ericsson
Intended status: Informational D. Thaler Category: Informational D. Thaler
Expires: April 28, 2011 Microsoft ISSN: 2070-1721 Microsoft
J. Hoagland J. Hoagland
Symantec Symantec
October 25, 2010 April 2011
Security Concerns With IP Tunneling Security Concerns with IP Tunneling
draft-ietf-v6ops-tunnel-security-concerns-04
Abstract Abstract
A number of security concerns with IP tunnels are documented in this A number of security concerns with IP tunnels are documented in this
memo. The intended audience of this document includes network memo. The intended audience of this document includes network
administrators and future protocol developers. The primary intent of administrators and future protocol developers. The primary intent of
this document is to raise the awareness level regarding the security this document is to raise the awareness level regarding the security
issues with IP tunnels as deployed today. issues with IP tunnels as deployed and propose strategies for the
mitigation of those issues.
Status of this Memo
This Internet-Draft is submitted in full conformance with the Status of This Memo
provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering This document is not an Internet Standards Track specification; it is
Task Force (IETF). Note that other groups may also distribute published for informational purposes.
working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months This document is a product of the Internet Engineering Task Force
and may be updated, replaced, or obsoleted by other documents at any (IETF). It represents the consensus of the IETF community. It has
time. It is inappropriate to use Internet-Drafts as reference received public review and has been approved for publication by the
material or to cite them other than as "work in progress." Internet Engineering Steering Group (IESG). Not all documents
approved by the IESG are a candidate for any level of Internet
Standard; see Section 2 of RFC 5741.
This Internet-Draft will expire on April 28, 2011. Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
http://www.rfc-editor.org/info/rfc6169.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 22 skipping to change at page 2, line 22
modifications of such material outside the IETF Standards Process. modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other it for publication as an RFC or to translate it into languages other
than English. than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction ....................................................2
2. Tunnels May Bypass Security . . . . . . . . . . . . . . . . . 3 2. Tunnels May Bypass Security .....................................3
2.1. Network Security Bypass . . . . . . . . . . . . . . . . . 3 2.1. Network Security Bypass ....................................3
2.2. IP Ingress and Egress Filtering Bypass . . . . . . . . . . 5 2.2. IP Ingress and Egress Filtering Bypass .....................5
2.3. Source Routing After the Tunnel Client . . . . . . . . . . 6 2.3. Source Routing after the Tunnel Client .....................6
3. Challenges in Inspecting and Filtering Content of Tunneled 3. Challenges in Inspecting and Filtering Content of
Data Packets . . . . . . . . . . . . . . . . . . . . . . . . . 6 Tunneled Data Packets ...........................................7
3.1. Inefficiency of Selective Network Filtering of All 3.1. Inefficiency of Selective Network Filtering of All
Tunneled Packets . . . . . . . . . . . . . . . . . . . . . 7 Tunneled Packets ...........................................7
3.2. Problems with deep packet inspection of tunneled data 3.2. Problems with Deep Packet Inspection of Tunneled
packets . . . . . . . . . . . . . . . . . . . . . . . . . 8 Data Packets ...............................................8
4. Increased Exposure Due to Tunneling . . . . . . . . . . . . . 9 4. Increased Exposure Due to Tunneling .............................9
4.1. NAT Holes Increase Attack Surface . . . . . . . . . . . . 9 4.1. NAT Holes Increase Attack Surface ..........................9
4.2. Exposure of a NAT Hole . . . . . . . . . . . . . . . . . . 11 4.2. Exposure of a NAT Hole ....................................11
4.3. Public Tunnels Widen Holes in Restricted NATs . . . . . . 12 4.3. Public Tunnels Widen Holes in Restricted NATs .............12
5. Tunnel Address Concerns . . . . . . . . . . . . . . . . . . . 12 5. Tunnel Address Concerns ........................................13
5.1. Feasibility of Guessing Tunnel Addresses . . . . . . . . . 12 5.1. Feasibility of Guessing Tunnel Addresses ..................13
5.2. Profiling Targets Based on Tunnel Address . . . . . . . . 13 5.2. Profiling Targets Based on Tunnel Address .................14
6. Additional Security Concerns . . . . . . . . . . . . . . . . . 14 6. Additional Security Concerns ...................................15
6.1. Attacks Facilitated By Changing Tunnel Server Setting . . 14 6.1. Attacks Facilitated by Changing Tunnel Server Setting .....15
7. Mechanisms to secure the use of tunnels . . . . . . . . . . . 16 7. Mechanisms to Secure the Use of Tunnels ........................17
8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 17 8. Acknowledgments ................................................18
9. Security Considerations . . . . . . . . . . . . . . . . . . . 17 9. Security Considerations ........................................18
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 10. Informative References ........................................18
11. Informative References . . . . . . . . . . . . . . . . . . . . 17
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 19
1. Introduction 1. Introduction
With NAT devices becoming increasingly more prevalent, there have With NAT devices becoming increasingly more prevalent, there have
recently been many tunneling protocols developed that go through NAT recently been many tunneling protocols developed that go through NAT
devices or firewalls by tunneling over UDP or TCP. For example, devices or firewalls by tunneling over UDP or TCP. For example,
Teredo [RFC4380], L2TPv2 [RFC2661], and L2TPv3 [RFC3931] all tunnel Teredo [RFC4380], Layer Two Tunneling Protocol Version 2 (L2TPv2)
IP packets over UDP. Similarly, many SSL VPN solutions that tunnel [RFC2661], and Layer Two Tunneling Protocol Version 3 (L2TPv3)
IP packets over HTTP (and hence over TCP) are deployed today. [RFC3931] all tunnel IP packets over UDP. Similarly, many Secure
Socket Layer (SSL) VPN solutions that tunnel IP packets over HTTP
(and hence over TCP) are deployed today.
This document discusses security concerns with tunneling IP packets, This document discusses security concerns with tunneling IP packets
and includes recommendations where relevant. and includes recommendations where relevant.
The primary intent of this document is to help improve security The primary intent of this document is to help improve security
deployments using tunnel protocols. In addition, the document aims deployments using tunnel protocols. In addition, the document aims
to provide information that can be used in any new or updated tunnel to provide information that can be used in any new or updated tunnel
protocol specification. The intended audience of this document protocol specification. The intended audience of this document
includes network administrators and future protocol developers. includes network administrators and future protocol developers.
2. Tunnels May Bypass Security 2. Tunnels May Bypass Security
2.1. Network Security Bypass 2.1. Network Security Bypass
2.1.1. Problem 2.1.1. Problem
Tunneled IP traffic may not receive the intended level of inspection Tunneled IP traffic may not receive the intended level of inspection
or policy application by network-based security devices unless such or policy application by network-based security devices unless such
devices are specifically tunnel-aware. This reduces defense in depth devices are specifically tunnel aware. This reduces defense in depth
and may cause security gaps. This applies to all network-located and may cause security gaps. This applies to all network-located
devices and to any end-host based firewalls whose existing hooking devices and to any end-host-based firewalls whose existing hooking
mechanism(s) would not show them the IP packet stream after the mechanism(s) would not show them the IP packet stream after the
tunnel client does decapsulation or before it does encapsulation. tunnel client does decapsulation or before it does encapsulation.
2.1.2. Discussion 2.1.2. Discussion
Evasion by tunneling is often a problem for network-based security Evasion by tunneling is often a problem for network-based security
devices such as network firewalls, intrusion detection and prevention devices such as network firewalls, intrusion detection and prevention
systems, and router controls. To provide such functionality in the systems, and router controls. To provide such functionality in the
presence of tunnels, the developer of such devices must add support presence of tunnels, the developer of such devices must add support
for parsing each new protocol. There is typically a significant lag for parsing each new protocol. There is typically a significant lag
between when the security developer recognizes that a tunnel will be between when the security developer recognizes that a tunnel will be
used (or will be remotely usable) to a significant degree and when used (or will be remotely usable) to a significant degree and when
the parsing can be implemented in a product update, the update tested the parsing can be implemented in a product update, the update can be
and released, and customers begin using the update. Late changes in tested and released, and customers can begin using the update. Late
the protocol specification or in the way it is implemented can cause changes in the protocol specification or in the way it is implemented
additional delays. This becomes a significant security concern when can cause additional delays. This becomes a significant security
a delay in applied coverage is occurring frequently. One way to cut concern when a delay in applied coverage is occurring frequently.
down on this lag is for security developers to follow the progress of
new IETF protocols but this will still not account for any new One way to cut down on this lag is for security developers to follow
proprietary protocols. the progress of new IETF protocols, but this will still not account
for any new proprietary protocols.
For example, for L2TP or Teredo, an unaware network security device For example, for L2TP or Teredo, an unaware network security device
would inspect or regulate the outer IP and the IP-based UDP layer as would inspect or regulate the outer IP and the IP-based UDP layer as
normal, but it would not recognize that there is an additional IP normal, but it would not recognize that there is an additional IP
layer contained inside the UDP payload to which it needs to apply the layer contained inside the UDP payload to which it needs to apply the
same controls as it would to a native packet. (Of course, if the same controls as it would to a native packet. (Of course, if the
device discards the packet due to something in the IP or UDP header, device discards the packet due to something in the IP or UDP header,
such as referring to an unknown protocol, the embedded packet is no such as referring to an unknown protocol, the embedded packet is no
longer a concern.) In addition, if the tunnel does encryption, the longer a concern.) In addition, if the tunnel does encryption, the
network-based security device may not be able to do much, just as if network-based security device may not be able to do much, just as if
IPsec end-to-end encryption were used without tunneling. IPsec end-to-end encryption were used without tunneling.
Network security controls being not applied must be a concern to Network security controls not being applied must be a concern to
those that set them up, since those controls are supposed to provide those that set them up, since those controls are supposed to provide
an additional layer of defense against external attackers. If an additional layer of defense against external attackers. If
network controls are being bypassed due to the use of tunneling, the network controls are being bypassed due to the use of tunneling, the
strength of the defense (i.e. the number of layers of defense) is strength of the defense (i.e., the number of layers of defense) is
reduced. Since security administrators may have a significantly reduced. Since security administrators may have a significantly
reduced level of confidence without this layer, this becomes a reduced level of confidence without this layer, this becomes a
concern to them. concern to them.
One implication of the security control bypass is that defense in One implication of the security control bypass is that defense in
depth has been reduced, perhaps down to zero unless a local firewall depth has been reduced, perhaps down to zero unless a local firewall
is in use as recommended in [RFC4380]. However, even if there are is in use as recommended in [RFC4380]. However, even if there are
host-based security controls that recognize tunnels, security host-based security controls that recognize tunnels and all controls
administrators may not have configured them with full security that were maintained by the network are available on the host,
control parity, even if all controls that were maintained by the security administrators may not have configured them with full
network are available on the host. Thus there may be gaps in desired security control parity. Thus, there may be gaps in desired
coverage. coverage.
Compounding this is that, unlike what would be the case for native Compounding this is that, unlike what would be the case for native
IP, some network administrators will not even be aware that their IP, some network administrators will not even be aware that their
hosts are globally reachable, if the tunnel provides connectivity to/ hosts are globally reachable if the tunnel provides connectivity
from the Internet; for example, they may not be expecting this for to/from the Internet; for example, they may not be expecting this for
hosts behind a stateful firewall. In addition, Section 3.2 discusses hosts behind a stateful firewall. In addition, Section 3.2 discusses
how it may not be efficient to find all tunneled traffic for network how it may not be efficient to find all tunneled traffic for network
devices to examine. devices to examine.
2.1.3. Recommendations 2.1.3. Recommendations
Security administrators who do not consider tunneling an acceptable Security administrators who do not consider tunneling an acceptable
risk should disable tunnel functionality either on the end-nodes risk should disable tunnel functionality either on the end nodes
(hosts) or on the network nodes at the perimeter of their network. (hosts) or on the network nodes at the perimeter of their network.
However, there may be an awareness gap. Thus, due to the possible However, there may be an awareness gap. Thus, due to the possible
negative security consequences, tunneling functionality should be negative security consequences, tunneling functionality should be
easy to disable on the host and through a central management facility easy to disable on the host and through a central management facility
if one is provided. if one is provided.
To minimize security exposure due to tunnels, we recommend that a To minimize security exposure due to tunnels, we recommend that a
tunnel be an interface of last resort, independent of IP version. tunnel be an interface of last resort, independent of IP version.
Specifically, we suggest that when both native and tunneled access to Specifically, we suggest that when both native and tunneled access to
a remote host is available, that the native access be used in a remote host is available, the native access be used in preference
preference to tunneled access except when the tunnel endpoint is to tunneled access except when the tunnel endpoint is known to not
known to not bypass security (e.g., an IPsec tunnel to a gateway bypass security (e.g., an IPsec tunnel to a gateway provided by the
provided by the security administrator of the network). This should security administrator of the network). This should also promote
also promote greater efficiency and reliability. greater efficiency and reliability.
Note that although Rule 7 of [RFC3484] section 6 will prefer native Note that although Rule 7 of [RFC3484], Section 6 will prefer native
connectivity over tunnels, this rule is only a tie-breaker when a connectivity over tunnels, this rule is only a tie-breaker when a
choice is not made by earlier rules; hence tunneling mechanisms that choice is not made by earlier rules; hence, tunneling mechanisms that
are tied to a particular range of IP address space will be decided are tied to a particular range of IP address space will be decided
based on the prefix precedence. For example, using the prefix policy based on the prefix precedence. For example, using the prefix policy
mechanism of [RFC3484] section 2.1, Teredo might have a precedence of mechanism of [RFC3484], Section 2.1, Teredo might have a precedence
5 so that native IPv4 is preferred over Teredo. of 5 so that native IPv4 is preferred over Teredo.
2.2. IP Ingress and Egress Filtering Bypass 2.2. IP Ingress and Egress Filtering Bypass
2.2.1. Problem 2.2.1. Problem
IP addresses inside tunnels are not subject to ingress and egress IP addresses inside tunnels are not subject to ingress and egress
filtering in the network they tunnel over, unless extraordinary filtering in the network they tunnel over, unless extraordinary
measures are taken. Only the tunnel endpoints can do such filtering. measures are taken. Only the tunnel endpoints can do such filtering.
2.2.2. Discussion 2.2.2. Discussion
Ingress filtering (sanity-checking incoming destination addresses) Ingress filtering (sanity-checking incoming destination addresses)
and egress filtering (sanity-checking outgoing source addresses) are and egress filtering (sanity-checking outgoing source addresses) are
done to mitigate attacks and to make it easier to identify the source done to mitigate attacks and to make it easier to identify the source
of a packet and are considered to be a good practice. e.g. ingress of a packet and are considered to be a good practice. For example,
filtering at the network perimeter should not allow packets with a ingress filtering at the network perimeter should not allow packets
source address that belongs to the network to enter the network from with a source address that belongs to the network to enter the
the outside the network. This function is most naturally (and in the network from outside the network. This function is most naturally
general case, by requirement) done at network boundaries. Tunneled (and in the general case, by requirement) done at network boundaries.
IP traffic bypassing this network control is a specific case of Tunneled IP traffic bypassing this network control is a specific case
Section 2.1, but is illustrative. of Section 2.1, but is illustrative.
2.2.3. Recommendations 2.2.3. Recommendations
Tunnel servers can apply ingress and egress controls to tunneled IP Tunnel servers can apply ingress and egress controls to tunneled IP
addresses passing through them to and from tunnel clients. addresses passing through them to and from tunnel clients.
Tunnel clients could make an effort to conduct ingress and egress Tunnel clients could make an effort to conduct ingress and egress
filtering. filtering.
Implementations of protocols that embed an IPv4 address in a tunneled Implementations of protocols that embed an IPv4 address in a tunneled
IPv6 address directly between peers should perform filtering based on IPv6 address directly between peers should perform filtering based on
checking the correspondence. checking the correspondence.
Implementations of protocols that accept tunneled packets directly Implementations of protocols that accept tunneled packets directly
from a server, relay or protocol peer do filtering the same way as it from a server, relay, or protocol peer do filtering the same way as
would be done on a native link with traffic from a router. it would be done on a native link with traffic from a router.
Some protocols such as 6to4 [RFC3056], Teredo, and ISATAP [RFC5214] Some protocols such as 6to4 [RFC3056], Teredo, and the Intra-Site
allow both other hosts and a router over a common tunnel. To perform Automatic Tunnel Addressing Protocol (ISATAP) [RFC5214] allow both
host-based filtering with such protocols a host would need to know other hosts and a router over a common tunnel. To perform host-based
the outer IP address of each router from which it could receive filtering with such protocols, a host would need to know the outer IP
traffic, so that packets from hosts beyond the router will be address of each router from which it could receive traffic, so that
accepted even though the source address would not embed the router's packets from hosts beyond the router will be accepted even though the
IP address. Router addresses might be learned via Secure Neighbor source address would not embed the router's IP address. Router
Discovery (SEND) [RFC3971] or some other mechanism (e.g., [RFC5214] addresses might be learned via SEcure Neighbor Discovery (SEND)
section 8.3.2). [RFC3971] or some other mechanism (e.g., [RFC5214], Section 8.3.2).
2.3. Source Routing After the Tunnel Client 2.3. Source Routing after the Tunnel Client
2.3.1. Problem 2.3.1. Problem
If the encapsulated IP packet specifies source routing beyond the If the encapsulated IP packet specifies source routing beyond the
recipient tunnel client, the host may forward the IP packet to the recipient tunnel client, the host may forward the IP packet to the
specified next hop. This may be unexpected and contrary to specified next hop. This may be unexpected and contrary to
administrator wishes and may have bypassed network-based source administrator wishes and may have bypassed network-based source-
routing controls. routing controls.
2.3.2. Discussion 2.3.2. Discussion
A detailed discussion of issues related to source routing can be A detailed discussion of issues related to source routing can be
found in [RFC5095] and [SECA-IP]. found in [RFC5095] and [SECA-IP].
2.3.3. Recommendations 2.3.3. Recommendations
Tunnel clients should by default discard tunneled IP packets that Tunnel clients should by default discard tunneled IP packets that
specify additional routing, as recommended in [RFC5095] and specify additional routing, as recommended in [RFC5095] and
[SECA-IP], though they may also allow the user to configure what [SECA-IP], though they may also allow the user to configure what
source routing types are allowed. All pre-existing source routing source-routing types are allowed. All pre-existing source-routing
controls should be upgraded to apply these controls to tunneled IP controls should be upgraded to apply these controls to tunneled IP
packets as well. packets as well.
3. Challenges in Inspecting and Filtering Content of Tunneled Data 3. Challenges in Inspecting and Filtering Content of Tunneled Data
Packets Packets
3.1. Inefficiency of Selective Network Filtering of All Tunneled 3.1. Inefficiency of Selective Network Filtering of All Tunneled
Packets Packets
3.1.1. Problem 3.1.1. Problem
There is no mechanism to both efficiently and immediately filter all There is no mechanism that both efficiently and immediately filters
tunneled packets (other than the obviously faulty method of filtering all tunneled packets (other than the obviously faulty method of
all packets). This limits the ability to prevent tunnel use on a filtering all packets). This limits the ability to prevent tunnel
network. use on a network.
3.1.2. Discussion 3.1.2. Discussion
Given concerns about tunnel security or a network's lack of Given concerns about tunnel security or a network's lack of
preparedness for tunnels, a network administrator may wish to simply preparedness for tunnels, a network administrator may wish to simply
block all use of tunnels that bypass security policies. He or she block all use of tunnels that bypass security policies. He or she
may wish to do so using network controls; this could be either due to may wish to do so using network controls; this could be either due to
not having the capability to disable tunneling on all hosts attached not having the capability to disable tunneling on all hosts attached
to the network or due to wanting an extra layer of prevention. to the network or due to wanting an extra layer of prevention.
skipping to change at page 7, line 40 skipping to change at page 7, line 43
blocking is applied on the outside of the client's NAT device, the blocking is applied on the outside of the client's NAT device, the
NAT device will retain the port mapping for the client. In some NAT device will retain the port mapping for the client. In some
cases, however, blocking all traffic to a given outbound port (e.g., cases, however, blocking all traffic to a given outbound port (e.g.,
port 80) may interfere with non-tunneled traffic so this should be port 80) may interfere with non-tunneled traffic so this should be
used with caution. used with caution.
Another simple alternative, if the tunnel server addresses are well- Another simple alternative, if the tunnel server addresses are well-
known, is to filter out all traffic to/from such addresses. known, is to filter out all traffic to/from such addresses.
The other approach is to find all packets to block in the same way as The other approach is to find all packets to block in the same way as
would be done for inspecting all packets (Section 3.2). However; would be done for inspecting all packets (Section 3.2). However,
this faces the difficulties in terms of efficiency of filtering, as this presents difficulties in terms of efficiency of filtering, as is
is discussed there. discussed in Section 3.2.
3.1.3. Recommendations 3.1.3. Recommendations
Developers of protocols that tunnel over UDP or TCP (including HTTP) Developers of protocols that tunnel over UDP or TCP (including HTTP)
to reach the Internet should disable their protocols in networks that to reach the Internet should disable their protocols in networks that
wish to enforce security policies on the user traffic. (Windows, for wish to enforce security policies on the user traffic. (Windows, for
example, disables Teredo by default if it detects that it is within example, disables Teredo by default if it detects that it is within
an enterprise network that contains a Windows domain controller.) an enterprise network that contains a Windows domain controller.)
Administrators of such networks may wish to filter all tunneled Administrators of such networks may wish to filter all tunneled
traffic at the boundaries of their networks. It is sufficient to traffic at the boundaries of their networks. It is sufficient to
filter out the tunneled connection requests (if they can be filter out the tunneled connection requests (if they can be
identified) to stop further tunneled traffic. The easiest mechanism identified) to stop further tunneled traffic. The easiest mechanism
for this would be to filter out outgoing traffic sent to the for this would be to filter out outgoing traffic sent to the
destination port defined by the tunneling protocol, and incoming destination port defined by the tunneling protocol and incoming
traffic with that source port. Similarly, in certain cases, it is traffic with that source port. Similarly, in certain cases, it is
also possible to use the IP protocol field to identify and filter also possible to use the IP protocol field to identify and filter
tunneled packets. e.g. 6to4 [RFC3056] is a tunneling mechanism that tunneled packets. For example, 6to4 [RFC3056] is a tunneling
uses the IPv4 packets to carry encapsulated IPv6 packets, and can be mechanism that uses IPv4 packets to carry encapsulated IPv6 packets
identified by the IPv4 protocol type 41. and can be identified by the IPv4 protocol type 41.
3.2. Problems with deep packet inspection of tunneled data packets 3.2. Problems with Deep Packet Inspection of Tunneled Data Packets
3.2.1. Problem 3.2.1. Problem
There is no efficient mechanism for network-based devices, which are There is no efficient mechanism for network-based devices, which are
not the tunnel endpoint, to inspect the contents of all tunneled data not the tunnel endpoint, to inspect the contents of all tunneled data
packets, the way they can for native packets. This makes it packets the way they can for native packets. This makes it difficult
difficult to apply the same controls as they do to native IP. to apply the same controls as they do to native IP.
3.2.2. Discussion 3.2.2. Discussion
Some tunnel protocols are easy to identify, such as if all data Some tunnel protocols are easy to identify, such as if all data
packets are encapsulated using a well-known UDP or TCP port that is packets are encapsulated using a well-known UDP or TCP port that is
unique to the protocol. unique to the protocol.
Other protocols, however, either use dynamic ports for data traffic, Other protocols, however, either use dynamic ports for data traffic
or else share ports with other protocols (e.g., tunnels over HTTP). or else share ports with other protocols (e.g., tunnels over HTTP).
The implication of this is that network-based devices that wish to The implication of this is that network-based devices that wish to
passively inspect (and perhaps selectively apply policy to) all passively inspect (and perhaps selectively apply policy to) all
encapsulated traffic must inspect all TCP or UDP packets (or at least encapsulated traffic must inspect all TCP or UDP packets (or at least
all packets not part of a session that is known not to be a tunnel). all packets not part of a session that is known not to be a tunnel).
This is imperfect since a heuristic must then be applied to determine This is imperfect since a heuristic must then be applied to determine
if a packet is indeed part of a tunnel. This may be too slow to make if a packet is indeed part of a tunnel. This may be too slow to make
use of in practice, especially if it means that all TCP or UDP use of in practice, especially if it means that all TCP or UDP
packets must be taken off of the device's "fast path". packets must be taken off of the device's "fast path".
One heuristic that can be used on packets to determine if they are One heuristic that can be used on packets to determine if they are
tunnel-related or not is as follows. For each known tunnel protocol, tunnel-related or not is as follows. For each known tunnel protocol,
attempt parsing the packet as if it were a packet of that protocol, attempt parsing the packet as if it were a packet of that protocol
destined to the local host (i.e., where the local host has the destined to the local host (i.e., where the local host has the
destination address in the inner IP header, if any). If all syntax destination address in the inner IP header, if any). If all syntax
checks pass, up to and including the inner IP header (if the tunnel checks pass, up to and including the inner IP header (if the tunnel
doesn't use encryption), then treat the packet as if it is a tunneled does not use encryption), then treat the packet as if it were a
packet of that protocol. tunneled packet of that protocol.
It is possible that non-tunnel packets will match as tunneled using It is possible that non-tunneled packets will be treated as if they
this heuristic, but tunneled packets (of the known types of tunnels) were tunneled packets using this heuristic, but tunneled packets (of
should not escape inspection, absent implementation bugs. the known types of tunnels) should not escape inspection, absent
implementation bugs.
For some protocols, it may be possible to monitor setup exchanges to For some protocols, it may be possible to monitor setup exchanges to
know to expect that data will be exchanged on certain ports later. know to expect that data will be exchanged on certain ports later.
(Note that this does not necessarily apply to Teredo, for example, (Note that this does not necessarily apply to Teredo, for example,
since communicating with another Teredo client behind a cone NAT since communicating with another Teredo client behind a cone NAT
[RFC5389] device does not require such signaling. In such cases this [RFC5389] device does not require such signaling. In such cases this
control will not work. However, deprecation of the cone bit as control will not work. However, deprecation of the cone bit as
discussed in [RFC5991] means this technique may indeed work with discussed in [RFC5991] means this technique may indeed work with
updated Teredo implementations.) updated Teredo implementations.)
3.2.3. Recommendations 3.2.3. Recommendations
As illustrated above, it should be clear that inspecting the contents As illustrated above, it should be clear that inspecting the contents
of tunneled data packets is highly complex and often impractical. of tunneled data packets is highly complex and often impractical.
For this reason, if a network wishes to monitor IP traffic, tunneling For this reason, if a network wishes to monitor IP traffic, tunneling
across, as opposed to tunneling to, the security boundary is not across, as opposed to tunneling to, the security boundary is not
recommended. For example, to provide an IPv6 transition solution, recommended. For example, to provide an IPv6 transition solution,
the network should provide native IPv6 connectivity or a tunnel the network should provide native IPv6 connectivity or a tunnel
solution (e.g., ISATAP or 6over4) that encapsulates data packets solution (e.g., ISATAP or 6over4 [RFC2529]) that encapsulates data
between hosts and a router within the network. packets between hosts and a router within the network.
4. Increased Exposure Due to Tunneling 4. Increased Exposure Due to Tunneling
4.1. NAT Holes Increase Attack Surface 4.1. NAT Holes Increase Attack Surface
4.1.1. Problem 4.1.1. Problem
If the tunnel allows inbound access from the public Internet, the If the tunnel allows inbound access from the public Internet, the
opening created in a NAT device due to a tunnel client increases its opening created in a NAT device due to a tunnel client increases its
Internet attack surface area. If vulnerabilities are present, this Internet attack surface area. If vulnerabilities are present, this
increased exposure can be used by attackers and their programs. increased exposure can be used by attackers and their programs.
If the tunnel allows inbound access only from a private network If the tunnel allows inbound access only from a private network
(e.g., a remote network to which one has VPN'ed), the opening created (e.g., a remote network to which one has VPNed), the opening created
in the NAT device still increases its attack surface area, although in the NAT device still increases its attack surface area, although
not as much as in the public Internet case. not as much as in the public Internet case.
4.1.2. Discussion 4.1.2. Discussion
When a tunnel is active, a mapped port is maintained on the NAT When a tunnel is active, a mapped port is maintained on the NAT
device through which remote hosts can send packets and perhaps device through which remote hosts can send packets and perhaps
establish connections. The following sequence is intended to sketch establish connections. The following sequence is intended to sketch
out the processing on the tunnel client host that can be reached out the processing on the tunnel client host that can be reached
through this mapped port; the actual processing for a given host may through this mapped port; the actual processing for a given host may
skipping to change at page 10, line 23 skipping to change at page 10, line 37
5. Tunnel client processing 5. Tunnel client processing
6. (Inner) IP host firewall processing 6. (Inner) IP host firewall processing
7. (Inner) IP processing by stack 7. (Inner) IP processing by stack
8. Various upper layer processing may follow 8. Various upper layer processing may follow
The inner firewall (and other security) processing may or may not be The inner firewall (and other security) processing may or may not be
present, but if it is, some of the inner IP processing may be present, but if it is, some of the inner IP processing may be
filtered. (For example, [RFC4380] section 7.1 recommends that an filtered. (For example, [RFC4380], Section 7.1 recommends that an
IPv6 host firewall be used on all Teredo clients.) IPv6 host firewall be used on all Teredo clients.)
(By the virtue of the tunnel being active, we can infer that the (By the virtue of the tunnel being active, we can infer that the
inner host firewall is unlikely to do any filtering based on the inner host firewall is unlikely to do any filtering based on the
outer IP.) Any of this processing may expose vulnerabilities an outer IP.) Any of this processing may expose vulnerabilities an
attacker can exploit; similarly these may expose information to an attacker can exploit; similarly, these may expose information to an
attacker. Thus, even if firewall filtering is in place (as is attacker. Thus, even if firewall filtering is in place (as is
prudent) and filters all incoming packets, the exposed area is larger prudent) and filters all incoming packets, the exposed area is larger
than if a native IP Internet connection were in place, due to the than if a native IP Internet connection were in place, due to the
processing that takes place before the inner IP is reached processing that takes place before the inner IP is reached
(specifically, the UDP/TCP processing, the tunnel client processing, (specifically, the UDP/TCP processing, the tunnel client processing,
and additional IP processing, especially if one is IPv4 and the other and additional IP processing, especially if one is IPv4 and the other
is IPv6). is IPv6).
One possibility is that a layer 3 targeted worm makes use of a One possibility is that a layer 3 (L3) targeted worm makes use of a
vulnerability in the exposed processing. The main benefit tunneling vulnerability in the exposed processing. The main benefit tunneling
provides to worms is enabling L3 reachability to the end host. Even provides to worms is enabling L3 reachability to the end host. Even
a thoroughly firewalled host could be subject to a worm that spreads a thoroughly firewalled host could be subject to a worm that spreads
with a single UDP packet if the right remote code vulnerability is with a single UDP packet if the right remote code vulnerability is
present. present.
4.1.3. Recommendations 4.1.3. Recommendation
This problem seems inherent in tunneling being active on a host, so This problem seems inherent in tunneling being active on a host, so
the solution seems to be to minimize tunneling use. the solution seems to be to minimize tunneling use.
For example, it can be active only when it is really needed and only For example, tunneling can be active only when it is really needed
for as long as needed. So, the tunnel interface can be initially not and only for as long as needed. So, the tunnel interface can be
configured and only used when it is entirely the last resort. The initially not configured and only used when it is entirely the last
interface should then be deactivated (ideally, automatically) again resort. The interface should then be deactivated (ideally,
as soon as possible. Note however that the hole will remain in the automatically) again as soon as possible. Note, however, that the
NAT device for some amount of time after this, so some processing of hole will remain in the NAT device for some amount of time after
incoming packets is inevitable unless the client's native IP address this, so some processing of incoming packets is inevitable unless the
behind the NAT device is changed. client's native IP address behind the NAT device is changed.
4.2. Exposure of a NAT Hole 4.2. Exposure of a NAT Hole
4.2.1. Problem 4.2.1. Problem
Attackers are more likely to know about a tunnel client's NAT hole Attackers are more likely to know about a tunnel client's NAT hole
than a typical hole in the NAT device. If they know about the hole, than a typical hole in the NAT device. If they know about the hole,
they could try to use it. they could try to use it.
4.2.2. Discussion 4.2.2. Discussion
There are at least three reasons why an attacker may be more likely There are at least three reasons why an attacker may be more likely
to learn of the tunnel client's exposed port than a typical NAT to learn of the tunnel client's exposed port than a typical NAT
exposed port: exposed port:
1. The NAT mapping for a tunnel is typically held open for a 1. The NAT mapping for a tunnel is typically held open for a
significant period of time, and kept stable. This increases the significant period of time and kept stable. This increases the
chance of it being discovered. chance of it being discovered.
2. In some protocols (e.g., Teredo), the external IP address and 2. In some protocols (e.g., Teredo), the external IP address and
port are contained in the client's address that is used end-to- port are contained in the client's address that is used end-to-
end and possibly even advertised in a name resolution system. end and possibly even advertised in a name resolution system.
While the tunnel protocol itself might only distribute this While the tunnel protocol itself might only distribute this
address in IP headers, peers, routers, and other on-path nodes address in IP headers, peers, routers, and other on-path nodes
still see the client's IP address. Although this point does not still see the client's IP address. Although this point does not
apply directly to protocols (e.g., L2TP) that do not construct apply directly to protocols that do not construct the inner IP
the inner IP address based on the outer IP address, the inner IP address based on the outer IP address (e.g., L2TP), the inner IP
address is still known to peers, routers, etc. and can still be address is still known to peers, routers, etc., and can still be
reached by attackers without knowing the external IP address or reached by attackers without their knowing the external IP
port. address or port.
3. The tunnel protocol often contains more messages that are 3. Sending packets over a tunnel often results in more message
exchanged and with more parties (e.g., due to a longer path exchanges due to the tunneling protocol, as well as messages
length) than without using the tunnel, offering more chance for being seen by more parties (e.g., due to a longer path length),
than sending packets natively, offering more chances for
visibility into the port and address in use. visibility into the port and address in use.
4.2.3. Recommendations 4.2.3. Recommendation
The recommendations from Section 4.1 seem to apply here as well: The recommendation from Section 4.1 seems to apply here as well:
minimize tunnel use. minimize tunnel use.
4.3. Public Tunnels Widen Holes in Restricted NATs 4.3. Public Tunnels Widen Holes in Restricted NATs
4.3.1. Problem 4.3.1. Problem
Tunnels that allow inbound connectivity from the Internet (e.g., Tunnels that allow inbound connectivity from the Internet (e.g.,
Teredo, tunnel brokers, etc) essentially disable the filtering Teredo, tunnel brokers, etc.) essentially disable the filtering
behavior of the NAT for all tunnel client ports. This eliminates NAT behavior of the NAT for all tunnel client ports. This eliminates NAT
devices filtering for such ports and may eliminate the need for an devices filtering for such ports and may eliminate the need for an
attacker to spoof an address. attacker to spoof an address.
4.3.2. Discussion 4.3.2. Discussion
NATs that implement Address-Dependent or Address and Port-Dependent NATs that implement Address-Dependent or Address and Port-Dependent
Filtering [RFC4787] limit the source of incoming packets to just Filtering [RFC4787] limit the source of incoming packets to just
those that are a previous destination. This poses a problem for those that are a previous destination. This poses a problem for
tunnels that intend to allow inbound connectivity from the Internet. tunnels that intend to allow inbound connectivity from the Internet.
Various protocols (e.g., Teredo, STUN [RFC5389], etc.) provide a Various protocols (e.g., Teredo, Session Traversal Utilities for NAT
facility for peers, upon request, to become a previous destination. (STUN) [RFC5389], etc.) provide a facility for peers, upon request,
This works by sending a "bubble" packet via a server, which is passed to become a previous destination. This works by sending a "bubble"
to the client, and then sent by the client (through the NAT) to the packet via a server, which is passed to the client and then sent by
originator. the client (through the NAT) to the originator.
This removes any NAT-based barrier to attackers sending packets in This removes any NAT-based barrier to attackers sending packets in
through the client's service port. In particular, an attacker would through the client's service port. In particular, an attacker would
no longer need to either be an actual previous destination or to no longer need to either be an actual previous destination or forge
forge its addresses as a previous destination. When forging, the its addresses as a previous destination. When forging, the attacker
attacker would have had to learn of a previous destination and then would have had to learn of a previous destination and then would face
would face more challenges in seeing any returned traffic. more challenges in seeing any returned traffic.
4.3.3. Recommendations 4.3.3. Recommendations
If the tunnel can provide connectivity to the Internet, the tunnel If the tunnel can provide connectivity to the Internet, the tunnel
client should run a host firewall on the tunnel interface. Also, client should run a host firewall on the tunnel interface. Also,
minimizing public tunnel use (see Section 4.1.3) would lower the minimizing public tunnel use (see Section 4.1.3) would lower the
attack opportunity related to this exposure. attack opportunity related to this exposure.
5. Tunnel Address Concerns 5. Tunnel Address Concerns
5.1. Feasibility of Guessing Tunnel Addresses 5.1. Feasibility of Guessing Tunnel Addresses
5.1.1. Problem 5.1.1. Problem
For some types of tunneling protocols, it may be feasible to guess IP For some types of tunneling protocols, it may be feasible to guess IP
addresses assigned to tunnels, either when looking for a specific addresses assigned to tunnels, either when looking for a specific
client or when looking for an arbitrary client. This is in contrast client or when looking for an arbitrary client. This is in contrast
to native IPv6 addresses in general, but is no worse than for native to native IPv6 addresses in general but is no worse than for native
IPv4 addresses today. IPv4 addresses today.
For example, some protocols (e.g., 6to4 and Teredo) use well-defined For example, some protocols (e.g., 6to4 and Teredo) use well-defined
address ranges. As another example, using well-known public servers address ranges. As another example, using well-known public servers
for Teredo or tunnel brokers also implies using a well known address for Teredo or tunnel brokers also implies using a well-known address
range. range.
5.1.2. Discussion
Several tunnel protocols use endpoint addresses that can be
algorithmically derived from some known values. These addresses are
structured, and the fields contained in them can be fairly
predictable. This reduces the search space for an attacker and
reduces the resistance of the address to scanning attacks.
5.1.3. Recommendations
It is recommended that tunnel protocol developers use tunnel endpoint
addresses that are not easily guessable. When the tunnel endpoint
addresses are structured and fairly guessable, it is recommended that
the implementation use any unused fields in the address to provide
additional entropy to the address in order to reduce the address-
scanning risks. For example, this could be done by setting these
unused fields to some random values.
5.2. Profiling Targets Based on Tunnel Address 5.2. Profiling Targets Based on Tunnel Address
5.2.1. Problem 5.2.1. Problem
An attacker encountering an address associated with a particular An attacker encountering an address associated with a particular
tunneling protocol or well-known tunnel server has the opportunity to tunneling protocol or well-known tunnel server has the opportunity to
infer certain relevant pieces of information that can be used to infer certain relevant pieces of information that can be used to
profile the host before sending any packets. This can reduce the profile the host before sending any packets. This can reduce the
attacker's footprint and increase the attacker's efficiency. attacker's footprint and increase the attacker's efficiency.
5.2.2. Discussion 5.2.2. Discussion
The tunnel address reveals some information about the nature of the The tunnel address reveals some information about the nature of the
client. client:
o That a host has a tunnel address associated with a given protocol o That a host has a tunnel address associated with a given protocol
means that the client is running on some platform for which there means that the client is running on some platform for which there
exists a tunnel client implementation of that protocol. In exists a tunnel client implementation of that protocol. In
addition, if some platforms have that protocol installed by addition, if some platforms have that protocol installed by
default and where the host's default rules for using it make it default and if the host's default rules for using it make it
susceptible to being in use, then it is more likely to be running susceptible to being in use, then the protocol is more likely to
on such a platform than on one where it is not used by default. be running on such a platform than on one where it is not used by
For example, as of this writing, seeing a Teredo address suggests default. For example, as of this writing, seeing a Teredo address
that the host it is on is probably running Windows. suggests that the host it is on is probably running Windows.
o Similarly, the use of an address associated with a particular o Similarly, the use of an address associated with a particular
tunnel server also suggests some information. Tunnel client tunnel server also suggests some information. Tunnel client
software is often deployed, installed, and/or configured using software is often deployed, installed, and/or configured using
some degree of automation. It seems likely that the majority of some degree of automation. It seems likely that the majority of
the time the tunnel server that results from the initial the time, the tunnel server that results from the initial
configuration will go unchanged from the initial setting. configuration will go unchanged from the initial setting.
Moreover, the server that is configured for use may be associated Moreover, the server that is configured for use may be associated
with a particular means of installation, which often suggests the with a particular means of installation, which often suggests the
platform. For example, if the server field in a Teredo address is platform. For example, if the server field in a Teredo address is
one of the IPv4 addressees to which teredo.ipv6.microsoft.com one of the IPv4 addresses to which teredo.ipv6.microsoft.com
resolves, it suggests that the host is running Windows. resolves, the host is likely running Windows.
o The external IPv4 address of a NAT device can of course be readily o The external IPv4 address of a NAT device can, of course, be
associated with a particular organization or at least an ISP, and readily associated with a particular organization or at least an
hence putting this address in an IPv6 address reveals this ISP; hence, putting this address in an IPv6 address reveals this
information. However, this is no different than using a native IP information. However, this is no different than using a native IP
address, and hence is not new with tunneling. address and is therefore not new with tunneling.
o It is also possible that external client port numbers may be more o It is also possible that external client port numbers may be more
often associated with particular client software or the platform often associated with particular client software or the platform
on which it is running. The usefulness of this for platform on which it is running. The usefulness of this for platform
determination is, however, reduced by the different NAT port determination is, however, reduced by the different NAT port
number assignment behaviors. In addition, the same observations number assignment behaviors. In addition, the same observations
would apply to use of UDP or TCP over native IP as well, and hence would apply to use of UDP or TCP over native IP as well; hence,
this is not new with tunneling. this is not new with tunneling.
The platform, tunnel client software, or organization information can The platform, tunnel client software, or organization information can
be used by an attacker to target attacks more carefully. For be used by an attacker to target attacks more carefully. For
example, an attacker may decide to attack an address only if it is example, an attacker may decide to attack an address only if it is
likely to be associated with a particular platform or tunnel client likely to be associated with a particular platform or tunnel client
software with a known vulnerability. (This is similar to the ability software with a known vulnerability. (This is similar to the ability
to guess some platforms based on the OUI in the EUI-64 portion of an to guess some platforms based on the Organizationally Unique
IPv6 address generated from a MAC address, since some platforms are Identifier (OUI) in the Extended Unique Identifier (EUI)-64 portion
commonly used with interface cards from particular vendors.) of an IPv6 address generated from a Media Access Control (MAC)
address, since some platforms are commonly used with interface cards
from particular vendors.)
5.2.3. Recommendations 5.2.3. Recommendations
If installation programs randomized the server setting, that would If installation programs randomize the server setting, they would
reduce the extent to which they can be profiled. Similarly, reduce the extent to which they can be profiled. Similarly,
administrators can choose to change the default setting to reduce the administrators can choose to change the default setting to reduce the
degree to which they can be profiled ahead of time. degree to which they can be profiled ahead of time.
Randomizing the tunnel client port in use would mitigate any Randomizing the tunnel client port in use would mitigate any
profiling that can be done based on the external port, especially if profiling that can be done based on the external port, especially if
multiple different tunnel clients did this. Further discussion on multiple tunnel clients did this. Further discussion on randomizing
randomizing ports can be found at [TSV-PORT]. ports can be found at [RFC6056].
It is recommended that tunnel protocols minimize the propagation of It is recommended that tunnel protocols minimize the propagation of
knowledge about whether the NAT is a cone NAT. knowledge about whether the NAT is a cone NAT.
6. Additional Security Concerns 6. Additional Security Concerns
6.1. Attacks Facilitated By Changing Tunnel Server Setting 6.1. Attacks Facilitated by Changing Tunnel Server Setting
6.1.1. Problem 6.1.1. Problem
If an attacker could either change a tunnel client's server setting If an attacker could change either a tunnel client's server setting
or change the IP addresses to which a configured host name resolves or the IP addresses to which a configured host name resolves (e.g.,
(e.g., by intercepting DNS queries) AND the tunnel is not by intercepting DNS queries) AND if the tunnel is not authenticated,
authenticated, it would let the attacker become a man in the middle. the attacker would become a man in the middle. This would allow them
This would allow them to at least monitor peer communication and at to at least monitor peer communication and at worst to impersonate
worst to impersonate the remote peer. the remote peer.
6.1.2. Discussion 6.1.2. Discussion
A client's server has good visibility into the client's communication A client's server has good visibility into the client's communication
with IP peers. If the server were switched to one that records this with IP peers. If the server were switched to one that records this
information and makes it available to third parties (e.g., information and makes it available to third parties (e.g.,
advertisers, competitors, spouses, etc.) then sensitive information advertisers, competitors, spouses, etc.), then sensitive information
would be disclosed, especially if the client's host prefers the would be disclosed, especially if the client's host prefers the
tunnel over native IP. Assuming the server provides good service, tunnel over native IP. Assuming the server provides good service,
the user would not have reason to suspect the change. the user would not have reason to suspect the change.
Full interception of IP traffic could also be arranged (including Full interception of IP traffic could also be arranged (including
pharming) which would allow any number of deception or monitoring pharming), which would allow any number of deception or monitoring
attacks including phishing. We illustrate this with an example attacks, including phishing. We illustrate this with an example
phishing attack scenario. phishing attack scenario.
It is often assumed that the tunnel server is a trusted entity. It It is often assumed that the tunnel server is a trusted entity. It
may be possible for malware or a malicious user to quietly change the may be possible for malware or a malicious user to quietly change the
client's tunnel server setting and have the user be unaware their client's tunnel server setting and have the user be unaware that
trust has been misplaced for an indefinite period of time. However, their trust has been misplaced for an indefinite period of time.
malware or a malicious user can do much worse than this, so this is However, malware or a malicious user can do much worse than this, so
not a significant concern. Hence it is only important that an this is not a significant concern. Hence, it is only important that
attacker on the network cannot change the client's server setting. an attacker on the network cannot change the client's server setting.
1. A phisher sets up a malicious tunnel server (or tampers with a 1. A phisher sets up a malicious tunnel server (or tampers with a
legitimate one). This server, for the most part, provides legitimate one). This server, for the most part, provides
correct service. correct service.
2. An attacker, by some means, switches the host's tunnel server 2. An attacker, by some means, switches the host's tunnel server
setting, or spoofs a DNS reply, to point to the above server. If setting or spoofs a DNS reply to point to the above server. If
neither DNS nor the tunnel setup is secured (i.e., if the client neither DNS nor the tunnel setup is secured (i.e., if the client
does not authenticate the information), then the attacker's does not authenticate the information), then the attacker's
tunnel server is seen as legitimate. tunnel server is seen as legitimate.
3. A user on the victim host types their bank's URL into his/her 3. A user on the victim host types their bank's URL into his/her
browser. browser.
4. The bank's hostname resolves to one or more IP addresses and the 4. The bank's hostname resolves to one or more IP addresses, and the
tunnel is selected for socket connection for whatever reason tunnel is selected for socket connection for whatever reason
(e.g., the tunnel provides IPv6 connectivity and the bank has an (e.g., the tunnel provides IPv6 connectivity, and the bank has an
IPv6 address). IPv6 address).
5. The tunnel client uses the server for help in connecting to the 5. The tunnel client uses the server for help in connecting to the
bank's IP address. Some tunneling protocols use a separate bank's IP address. Some tunneling protocols use a separate
channel for signaling vs data, but this still allows the server channel for signaling versus data, but this still allows the
to place itself in the data path by an appropriate signal to the server to place itself in the data path by an appropriate signal
client. For example, in Teredo, the client sends a ping request to the client. For example, in Teredo, the client sends a ping
through a server which is expected to come back through a data request through a server, which is expected to come back through
relay, and a malicious server can simply send it back itself to a data relay, and a malicious server can simply send it back
indicate that is a data relay for the communication. itself to indicate that is a data relay for the communication.
6. The rest works pretty much like any normal phishing transaction, 6. The rest works pretty much like any normal phishing transaction,
except that the attacker acts as a tunnel server (or data relay, except that the attacker acts as a tunnel server (or data relay,
for protocols such as Teredo) and a host with the bank's IP for protocols such as Teredo) and a host with the bank's IP
address. address.
This pharming type attack is not unique to tunneling. Switching DNS This pharming-type attack is not unique to tunneling. Switching DNS
server settings to a malicious DNS server or DNS cache poisoning in a server settings to a malicious DNS server or DNS cache poisoning in a
recursive DNS resolver could have a similar effect. recursive DNS resolver could have a similar effect.
6.1.3. Recommendations 6.1.3. Recommendations
In general, anti-phishing and anti-fraud provisions should help with In general, anti-phishing and anti-fraud provisions should help with
aspects of this, as well as software that specifically monitors for aspects of this, as well as software that specifically monitors for
tunnel server changes. tunnel server changes.
Perhaps the best way to mitigate tunnel-specific attacks is to have Perhaps the best way to mitigate tunnel-specific attacks is to have
the client either authenticate the tunnel server, or at least the the client authenticate either the tunnel server or at least the
means by which the tunnel server's IP address is determined. For means by which the tunnel server's IP address is determined. For
example, SSL VPNs use https URLs and hence authenticate the server as example, SSL VPNs use https URLs and hence authenticate the server as
being the expected one. Another mechanism, when IPv6 Router being the expected one. When IPv6 Router Advertisements are sent
Advertisements are sent over the tunnel is to use SEcure Neighbor over the tunnel, another mechanism is to use SEcure Neighbor
Discovery (SEND) [RFC3971] to verify that the client trusts the Discovery (SEND) [RFC3971] to verify that the client trusts the
server. server.
On the host, it should require an appropriate level of privilege in On the host, it should require an appropriate level of privilege in
order to change the tunnel server setting (as well as other non- order to change the tunnel server setting (as well as other non-
tunnel-specific settings such as the DNS server setting, etc.). tunnel-specific settings such as the DNS server setting, etc.).
Making it easy to see the current tunnel server setting (e.g., not Making it easy to see the current tunnel server setting (e.g., not
requiring privilege for this) should help detection of changes. requiring privilege for this) should help detection of changes.
The scope of the attack can also be reduced by limiting tunneling use The scope of the attack can also be reduced by limiting tunneling use
in general but especially in preferring native IPv4 to tunneled IPv6; in general but especially in preferring native IPv4 to tunneled IPv6
this is because it is reasonable to expect that banks and similar web when connecting to peers who are accessible over IPv4, as doing so
sites will continue to be accessible over IPv4 for as long as a helps mitigate attacks that are facilitated by changing the tunnel
significant fraction of their customers are still IPv4-only. Please server setting. Please refer to Section 3 of [TUNNEL-LOOPS] for a
refer to Section 3 of [TUNNEL-LOOPS] for a detailed description and detailed description and mitigation measures for a class of attacks
mitigation measures for a class of attacks based on IPv6 automatic based on IPv6 automatic tunnels.
tunnels.
7. Mechanisms to secure the use of tunnels 7. Mechanisms to Secure the Use of Tunnels
This document described several security issues with tunnels. This This document described several security issues with tunnels. This
does not mean that tunnels need to be avoided at any cost. On the does not mean that tunnels need to be avoided at any cost. On the
contrary, tunnels can be very useful if deployed, operated and used contrary, tunnels can be very useful if deployed, operated, and used
properly. The threats against IP tunnels are documented here. If properly. The threats against IP tunnels are documented here. If
the threats can be mitigated, network administrators can efficiently the threats can be mitigated, network administrators can efficiently
and securely use tunnels in their network. Several measures can be and securely use tunnels in their network. Several measures can be
taken in order to secure the operation of IPv6 tunnels: taken in order to secure the operation of IPv6 tunnels:
o Operating on-premise tunnel servers/relays so that the tunneled o Operating on-premise tunnel servers/relays so that the tunneled
traffic does not cross border routers. traffic does not cross border routers.
o Setting up internal routing to steer traffic to these servers/ o Setting up internal routing to steer traffic to these servers/
relays relays
o Setting up of firewalls [RFC2979] to allow known and controllable o Setting up of firewalls [RFC2979] to allow known and controllable
tunneling mechanisms and disallow unknown tunnels. tunneling mechanisms and disallow unknown tunnels.
8. Acknowledgments 8. Acknowledgments
The authors would like to thank Remi Denis-Courmont, Fred Templin, The authors would like to thank Remi Denis-Courmont, Fred Templin,
Jordi Palet Martinez, James Woodyatt, Christian Huitema, Brian Jordi Palet Martinez, James Woodyatt, Christian Huitema, Brian
Carpenter, Nathan Ward, Kurt Zeilenga, Joel Halpern, Erik Kline, Carpenter, Nathan Ward, Kurt Zeilenga, Joel Halpern, Erik Kline,
Alfred Hoenes and Fernando Gont for reviewing earlier versions of the Alfred Hoenes, and Fernando Gont for reviewing earlier versions of
document and providing comments to make this document better. the document and providing comments to make this document better.
9. Security Considerations 9. Security Considerations
This entire document discusses security concerns with tunnels. This entire document discusses security concerns with tunnels.
10. IANA Considerations 10. Informative References
This document does not require any IANA action.
11. Informative References
[RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and
E. Lear, "Address Allocation for Private Internets",
BCP 5, RFC 1918, February 1996.
[RFC2529] Carpenter, B. and C. Jung, "Transmission of IPv6 over IPv4 [RFC2529] Carpenter, B. and C. Jung, "Transmission of IPv6 over IPv4
Domains without Explicit Tunnels", RFC 2529, March 1999. Domains without Explicit Tunnels", RFC 2529, March 1999.
[RFC2661] Townsley, W., Valencia, A., Rubens, A., Pall, G., Zorn, [RFC2661] Townsley, W., Valencia, A., Rubens, A., Pall, G., Zorn,
G., and B. Palter, "Layer Two Tunneling Protocol "L2TP"", G., and B. Palter, "Layer Two Tunneling Protocol "L2TP"",
RFC 2661, August 1999. RFC 2661, August 1999.
[RFC2979] Freed, N., "Behavior of and Requirements for Internet [RFC2979] Freed, N., "Behavior of and Requirements for Internet
Firewalls", RFC 2979, October 2000. Firewalls", RFC 2979, October 2000.
[RFC3056] Carpenter, B. and K. Moore, "Connection of IPv6 Domains [RFC3056] Carpenter, B. and K. Moore, "Connection of IPv6 Domains
via IPv4 Clouds", RFC 3056, February 2001. via IPv4 Clouds", RFC 3056, February 2001.
[RFC3484] Draves, R., "Default Address Selection for Internet [RFC3484] Draves, R., "Default Address Selection for Internet
Protocol version 6 (IPv6)", RFC 3484, February 2003. Protocol version 6 (IPv6)", RFC 3484, February 2003.
[RFC3931] Lau, J., Townsley, M., and I. Goyret, "Layer Two Tunneling [RFC3931] Lau, J., Ed., Townsley, M., Ed., and I. Goyret, Ed.,
Protocol - Version 3 (L2TPv3)", RFC 3931, March 2005. "Layer Two Tunneling Protocol - Version 3 (L2TPv3)", RFC
3931, March 2005.
[RFC3971] Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure [RFC3971] Arkko, J., Ed., Kempf, J., Zill, B., and P. Nikander,
Neighbor Discovery (SEND)", RFC 3971, March 2005. "SEcure Neighbor Discovery (SEND)", RFC 3971, March 2005.
[RFC4380] Huitema, C., "Teredo: Tunneling IPv6 over UDP through [RFC4380] Huitema, C., "Teredo: Tunneling IPv6 over UDP through
Network Address Translations (NATs)", RFC 4380, Network Address Translations (NATs)", RFC 4380, February
February 2006. 2006.
[RFC4787] Audet, F. and C. Jennings, "Network Address Translation [RFC4787] Audet, F., Ed., and C. Jennings, "Network Address
(NAT) Behavioral Requirements for Unicast UDP", BCP 127, Translation (NAT) Behavioral Requirements for Unicast
RFC 4787, January 2007. UDP", BCP 127, RFC 4787, January 2007.
[RFC5095] Abley, J., Savola, P., and G. Neville-Neil, "Deprecation [RFC5095] Abley, J., Savola, P., and G. Neville-Neil, "Deprecation
of Type 0 Routing Headers in IPv6", RFC 5095, of Type 0 Routing Headers in IPv6", RFC 5095, December
December 2007. 2007.
[RFC5214] Templin, F., Gleeson, T., and D. Thaler, "Intra-Site [RFC5214] Templin, F., Gleeson, T., and D. Thaler, "Intra-Site
Automatic Tunnel Addressing Protocol (ISATAP)", RFC 5214, Automatic Tunnel Addressing Protocol (ISATAP)", RFC 5214,
March 2008. March 2008.
[RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing,
"Session Traversal Utilities for NAT (STUN)", RFC 5389, "Session Traversal Utilities for NAT (STUN)", RFC 5389,
October 2008. October 2008.
[RFC5991] Thaler, D., Krishnan, S., and J. Hoagland, "Teredo [RFC5991] Thaler, D., Krishnan, S., and J. Hoagland, "Teredo
Security Updates", RFC 5991, September 2010. Security Updates", RFC 5991, September 2010.
[SECA-IP] Gont, F., "Security Assessment of the Internet Protocol [RFC6056] Larsen, M. and F. Gont, "Recommendations for Transport-
version 4", draft-ietf-opsec-ip-security-03 (work in Protocol Port Randomization", BCP 156, RFC 6056, January
progress), April 2010. 2011.
[TSV-PORT] [SECA-IP] Gont, F., "Security Assessment of the Internet Protocol
Larsen, M. and F. Gont, "Transport Protocol Port version 4", Work in Progress, April 2011.
Randomization Recommendations",
draft-ietf-tsvwg-port-randomization-09 (work in progress),
August 2010.
[TUNNEL-LOOPS] [TUNNEL-LOOPS]
Nakibly, G. and F. Templin, "Routing Loop Attack using Nakibly, G. and F. Templin, "Routing Loop Attack using
IPv6 Automatic Tunnels: Problem Statement and Proposed IPv6 Automatic Tunnels: Problem Statement and Proposed
Mitigations", draft-ietf-v6ops-tunnel-loops-00 (work in Mitigations", Work in Progress, March 2011.
progress), September 2010.
Authors' Addresses Authors' Addresses
Suresh Krishnan Suresh Krishnan
Ericsson Ericsson
8400 Decarie Blvd. 8400 Decarie Blvd.
Town of Mount Royal, QC Town of Mount Royal, QC
Canada Canada
Phone: +1 514 345 7900 x42871 Phone: +1 514 345 7900 x42871
Email: suresh.krishnan@ericsson.com EMail: suresh.krishnan@ericsson.com
Dave Thaler Dave Thaler
Microsoft Corporation Microsoft Corporation
One Microsoft Way One Microsoft Way
Redmond, WA 98052 Redmond, WA 98052
USA USA
Phone: +1 425 703 8835 Phone: +1 425 703 8835
Email: dthaler@microsoft.com EMail: dthaler@microsoft.com
James Hoagland James Hoagland
Symantec Corporation Symantec Corporation
350 Ellis St. 350 Ellis St.
Mountain View, CA 94043 Mountain View, CA 94043
US USA
Email: Jim_Hoagland@symantec.com EMail: Jim_Hoagland@symantec.com
URI: http://symantec.com/ URI: http://symantec.com/
 End of changes. 97 change blocks. 
253 lines changed or deleted 263 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/