idnits 2.17.1 draft-ietf-v6ops-tunnel-security-concerns-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (October 20, 2010) is 4930 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Unused Reference: 'RFC2529' is defined on line 794, but no explicit reference was found in the text -- Obsolete informational reference (is this intentional?): RFC 3484 (Obsoleted by RFC 6724) -- Obsolete informational reference (is this intentional?): RFC 5389 (Obsoleted by RFC 8489) == Outdated reference: A later version (-07) exists of draft-ietf-opsec-ip-security-03 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 IPv6 Operations Working Group S. Krishnan 3 Internet-Draft Ericsson 4 Intended status: Informational D. Thaler 5 Expires: April 23, 2011 Microsoft 6 J. Hoagland 7 Symantec 8 October 20, 2010 10 Security Concerns With IP Tunneling 11 draft-ietf-v6ops-tunnel-security-concerns-03 13 Abstract 15 A number of security concerns with IP tunnels are documented in this 16 memo. The intended audience of this document includes network 17 administrators and future protocol developers. The primary intent of 18 this document is to raise the awareness level regarding the security 19 issues with IP tunnels as deployed today. 21 Status of this Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at http://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on April 23, 2011. 38 Copyright Notice 40 Copyright (c) 2010 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (http://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 This document may contain material from IETF Documents or IETF 54 Contributions published or made publicly available before November 55 10, 2008. The person(s) controlling the copyright in some of this 56 material may not have granted the IETF Trust the right to allow 57 modifications of such material outside the IETF Standards Process. 58 Without obtaining an adequate license from the person(s) controlling 59 the copyright in such materials, this document may not be modified 60 outside the IETF Standards Process, and derivative works of it may 61 not be created outside the IETF Standards Process, except to format 62 it for publication as an RFC or to translate it into languages other 63 than English. 65 Table of Contents 67 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 68 2. Tunnels May Bypass Security . . . . . . . . . . . . . . . . . 3 69 2.1. Network Security Bypass . . . . . . . . . . . . . . . . . 3 70 2.2. IP Ingress and Egress Filtering Bypass . . . . . . . . . . 5 71 2.3. Source Routing After the Tunnel Client . . . . . . . . . . 6 72 3. Challenges in Inspecting and Filtering Content of Tunneled 73 Data Packets . . . . . . . . . . . . . . . . . . . . . . . . . 7 74 3.1. Inefficiency of Selective Network Filtering of All 75 Tunneled Packets . . . . . . . . . . . . . . . . . . . . . 7 76 3.2. Problems with deep packet inspection of tunneled data 77 packets . . . . . . . . . . . . . . . . . . . . . . . . . 8 78 4. Increased Exposure Due to Tunneling . . . . . . . . . . . . . 9 79 4.1. NAT Holes Increase Attack Surface . . . . . . . . . . . . 9 80 4.2. Exposure of a NAT Hole . . . . . . . . . . . . . . . . . . 11 81 4.3. Public Tunnels Widen Holes in Restricted NATs . . . . . . 12 82 5. Tunnel Address Concerns . . . . . . . . . . . . . . . . . . . 12 83 5.1. Feasibility of Guessing Tunnel Addresses . . . . . . . . . 12 84 5.2. Profiling Targets Based on Tunnel Address . . . . . . . . 13 85 6. Additional Security Concerns . . . . . . . . . . . . . . . . . 14 86 6.1. Attacks Facilitated By Changing Tunnel Server Setting . . 14 87 7. Mechanisms to secure the use of tunnels . . . . . . . . . . . 17 88 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 17 89 9. Security Considerations . . . . . . . . . . . . . . . . . . . 17 90 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 91 11. Informative References . . . . . . . . . . . . . . . . . . . . 17 92 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 19 94 1. Introduction 96 With NAT devices becoming increasingly more prevalent, there have 97 recently been many tunneling protocols developed that go through NAT 98 devices or firewalls by tunneling over UDP or TCP. For example, 99 Teredo [RFC4380], L2TPv2 [RFC2661], and L2TPv3 [RFC3931] all tunnel 100 IP packets over UDP. Similarly, many SSL VPN solutions that tunnel 101 IP packets over HTTP (and hence over TCP) are deployed today. 103 This document discusses security concerns with tunneling IP packets, 104 and includes recommendations where relevant. 106 The primary intent of this document is to help improve security 107 deployments using tunnel protocols. In addition, the document aims 108 to provide information that can be used in any new or updated tunnel 109 protocol specification. The intended audience of this document 110 includes network administrators and future protocol developers. 112 2. Tunnels May Bypass Security 114 2.1. Network Security Bypass 116 2.1.1. Problem 118 Tunneled IP traffic may not receive the intended level of inspection 119 or policy application by network-based security devices unless such 120 devices are specifically tunnel-aware. This reduces defense in depth 121 and may cause security gaps. This applies to all network-located 122 devices and to any end-host based firewalls whose existing hooking 123 mechanism(s) would not show them the IP packet stream after the 124 tunnel client does decapsulation or before it does encapsulation. 126 2.1.2. Discussion 128 Evasion by tunneling is often a problem for network-based security 129 devices such as network firewalls, intrusion detection and prevention 130 systems, and router controls. To provide such functionality in the 131 presence of tunnels, the developer of such devices must add support 132 for parsing each new protocol. There is typically a significant lag 133 between when the security developer recognizes that a tunnel will be 134 used (or will be remotely usable) to a significant degree and when 135 the parsing can be implemented in a product update, the update tested 136 and released, and customers begin using the update. Late changes in 137 the protocol specification or in the way it is implemented can cause 138 additional delays. This becomes a significant security concern when 139 a delay in applied coverage is occurring frequently. One way to cut 140 down on this lag is for security developers to follow the progress of 141 new IETF protocols but this will still not account for any new 142 proprietary protocols. 144 For example, for L2TP or Teredo, an unaware network security device 145 would inspect or regulate the outer IP and the IP-based UDP layer as 146 normal, but it would not recognize that there is an additional IP 147 layer contained inside the UDP payload to which it needs to apply the 148 same controls as it would to a native packet. (Of course, if the 149 device discards the packet due to something in the IP or UDP header, 150 such as referring to an unknown protocol, the embedded packet is no 151 longer a concern.) In addition, if the tunnel does encryption, the 152 network-based security device may not be able to do much, just as if 153 IPsec end-to-end encryption were used without tunneling. 155 Network security controls being not applied must be a concern to 156 those that set them up, since those controls are supposed to 157 adequately regulate all traffic. If network controls are being 158 bypassed due to the use of tunneling, the burden of control shifts to 159 the tunnel client. Since security administrators may not always have 160 full control over all the nodes on their network, they sometimes 161 prefer to implement security controls on the network. 163 One implication of the security control bypass is that defense in 164 depth has been reduced, perhaps down to zero unless a 'local 165 firewall' is in use as recommended in [RFC4380]. However, even if 166 there are host-based security controls that recognize tunnels, 167 security administrators may not have configured them with full 168 security control parity, even if all controls that were maintained by 169 the network are available on the host. Thus there may be gaps in 170 desired coverage. 172 Compounding this is that, unlike what would be the case for native 173 IP, some network administrators will not even be aware that their 174 hosts are globally reachable, if the tunnel provides connectivity to/ 175 from the Internet; for example, they may not be expecting this for 176 hosts with [RFC1918] addresses behind a NAT device. In addition, 177 Section 3.2 discusses how it may not be efficient to find all 178 tunneled traffic for network devices to examine. 180 2.1.3. Recommendations 182 Security administrators who do not consider tunneling an acceptable 183 risk should disable tunnel functionality either on the end-nodes 184 (hosts) or on the network nodes at the perimeter of their network. 185 However, there may be an awareness gap. Thus, due to the possible 186 negative security consequences, tunneling functionality should be 187 easy to disable on the host and through a central management facility 188 if one is provided. 190 To minimize security exposure due to tunnels, we recommend that a 191 tunnel be an interface of last resort, independent of IP version. 192 Specifically, we suggest that when both native and tunneled access to 193 a remote host is available, that the native access be used in 194 preference to tunneled access except when the tunnel endpoint is 195 known to not bypass security (e.g., an IPsec tunnel to a gateway 196 provided by the security administrator of the network). This should 197 also promote greater efficiency and reliability. 199 Note that although Rule 7 of [RFC3484] section 6 will prefer native 200 connectivity over tunnels, this rule is only a tie-breaker when a 201 choice is not made by earlier rules; hence tunneling mechanisms that 202 are tied to a particular range of IP address space will be decided 203 based on the prefix precedence. For example, using the prefix policy 204 mechanism of [RFC3484] section 2.1, Teredo might have a precedence of 205 5 so that native IPv4 is preferred over Teredo. 207 2.2. IP Ingress and Egress Filtering Bypass 209 2.2.1. Problem 211 IP addresses inside tunnels are not subject to ingress and egress 212 filtering in the network they tunnel over, unless extraordinary 213 measures are taken. Only the tunnel endpoints can do such filtering. 215 2.2.2. Discussion 217 Ingress filtering (sanity-checking incoming destination addresses) 218 and egress filtering (sanity-checking outgoing source addresses) are 219 done to mitigate attacks and to make it easier to identify the source 220 of a packet and are considered to be a good practice. e.g. ingress 221 filtering at the network perimeter should not allow packets with a 222 source address that belongs to the network to enter the network from 223 the outside the network. This function is most naturally (and in the 224 general case, by requirement) done at network boundaries. Tunneled 225 IP traffic bypassing this network control is a specific case of 226 Section 2.1, but is illustrative. 228 2.2.3. Recommendations 230 The recommendations in Section 2.1.3 can help here. For this problem 231 specifically, there are three locations in which ingress and egress 232 filtering can be done. 234 Network based: Network-based devices (e.g., routers) could be 235 updated to find all tunneled packets and to apply ingress and 236 egress controls equally to tunneled IP addresses. 238 Tunnel server based: Tunnel servers can apply ingress and egress 239 controls to tunneled IP addresses passing through them to and from 240 tunnel clients. 242 Host based: Tunnel clients could make an effort to conduct ingress 243 and egress filtering. 245 Implementations of protocols that embed an IPv4 address in a 246 tunneled IPv6 address directly between peers should perform 247 filtering based on checking the correspondence. 249 Implementations of protocols that accept tunneled packets directly 250 from a server or relay do filtering the same way as it would be 251 done on a native link with traffic from a router. 253 Some protocols such as 6to4 [RFC3056], Teredo, and ISATAP 254 [RFC5214] allow both other hosts and a router over a common 255 tunnel. To perform host-based filtering with such protocols a 256 host would need to know the outer IP address of each router from 257 which it could receive traffic, so that packets from hosts beyond 258 the router will be accepted even though the source address would 259 not embed the router's IP address. Router addresses might be 260 learned via Secure Neighbor Discovery (SEND) [RFC3971] or some 261 other mechanism (e.g., [RFC5214] section 8.3.2). 263 2.3. Source Routing After the Tunnel Client 265 2.3.1. Problem 267 If the encapsulated IP packet specifies source routing beyond the 268 recipient tunnel client, the host may forward the IP packet to the 269 specified next hop. This may be unexpected and contrary to 270 administrator wishes and may have bypassed network-based source 271 routing controls. 273 2.3.2. Discussion 275 A detailed discussion of issues related to source routing can be 276 found in [RFC5095] and [SECA-IP]. 278 2.3.3. Recommendations 280 Tunnel clients should by default discard tunneled IP packets that 281 specify additional routing, as recommended in [RFC5095] and 282 [SECA-IP], though they may also allow the user to configure what 283 source routing types are allowed. All pre-existing source routing 284 controls should be upgraded to apply these controls to tunneled IP 285 packets as well. 287 3. Challenges in Inspecting and Filtering Content of Tunneled Data 288 Packets 290 3.1. Inefficiency of Selective Network Filtering of All Tunneled 291 Packets 293 3.1.1. Problem 295 There is no mechanism to both efficiently and immediately filter all 296 tunneled packets (other than the obviously faulty method of filtering 297 all packets). This limits the ability to prevent tunnel use on a 298 network. 300 3.1.2. Discussion 302 Given concerns about tunnel security or a network's lack of 303 preparedness for tunnels, a network administrator may wish to simply 304 block all use of tunnels that bypass security policies. He or she 305 may wish to do so using network controls; this could be either due to 306 not having the capability to disable tunneling on all hosts attached 307 to the network or due to wanting an extra layer of prevention. 309 One simple method of doing this easily for many tunnel protocols is 310 to block outbound packets to the UDP or TCP port used (e.g., 311 destination UDP port is 3544 for Teredo, UDP port 1701 for L2TP, 312 etc.). This prevents a tunnel client from establishing a new tunnel. 313 However, existing tunnels will not necessarily be affected if the 314 blocked port is used only for initial setup. In addition, if the 315 blocking is applied on the outside of the client's NAT device, the 316 NAT device will retain the port mapping for the client and the client 317 may or may not continue to use the IP address assigned to its tunnel. 318 In some cases, however, blocking all traffic to a given outbound port 319 (e.g., port 80) may interfere with non-tunneled traffic so this 320 should be used with caution. 322 Another simple alternative, if the tunnel server addresses are well- 323 known, is to filter out all traffic to/from such addresses. 325 The other approach is to find all packets to block in the same way as 326 would be done for inspecting all packets (Section 3.2). However; 327 this faces the difficulties in terms of efficiency of filtering, as 328 is discussed there. 330 3.1.3. Recommendations 332 Tunneling over UDP or TCP (including HTTP) to reach the Internet is 333 not recommended for use in networks that wish to enforce security 334 policies on the user traffic. (Windows, for example, disables Teredo 335 by default if it detects that it is within an enterprise network that 336 contains a Windows domain controller.) 338 Administrators of such networks may wish to filter all tunneled 339 traffic at the boundaries of their networks. It is sufficient to 340 filter out the tunneled connection requests (if they can be 341 identified) to stop further tunneled traffic. The easiest mechanism 342 for this would be to filter out outgoing traffic sent to the 343 destination port defined by the tunneling protocol, and incoming 344 traffic with that source port. Similarly, in certain cases, it is 345 also possible to use the IP protocol field to identify and filter 346 tunneled packets. e.g. 6to4 [RFC3056] is a tunneling mechanism that 347 uses the IPv4 packets to carry encapsulated IPv6 packets, and can be 348 identified by the IPv4 protocol type 41. 350 3.2. Problems with deep packet inspection of tunneled data packets 352 3.2.1. Problem 354 There is no efficient mechanism for network-based devices, which are 355 not the tunnel endpoint, to inspect the contents of all tunneled data 356 packets, the way they can for native packets. This makes it 357 difficult to apply the same controls as they do to native IP. 359 3.2.2. Discussion 361 Some tunnel protocols are easy to identify, such as if all data 362 packets are encapsulated using a well-known UDP or TCP port that is 363 unique to the protocol. 365 Other protocols, however, either use dynamic ports for data traffic, 366 or else share ports with other protocols (e.g., tunnels over HTTP). 368 The implication of this is that network-based devices that wish to 369 passively inspect (and perhaps selectively apply policy to) all 370 encapsulated traffic must inspect all TCP or UDP packets (or at least 371 all packets not part of a session that is known not to be a tunnel). 372 This is imperfect since a heuristic must then be applied to determine 373 if a packet is indeed part of a tunnel. This may be too slow to make 374 use of in practice, especially if it means that all TCP or UDP 375 packets must be taken off of the device's "fast path". 377 One heuristic that can be used on packets to determine if they are 378 tunnel-related or not is as follows. For each known tunnel protocol, 379 attempt parsing the packet as if it were a packet of that protocol, 380 destined to the local host (i.e., where the local host has the 381 destination address in the inner IP header, if any). If all syntax 382 checks pass, up to and including the inner IP header (if the tunnel 383 doesn't use encryption), then treat the packet as if it is a tunneled 384 packet of that protocol. 386 It is possible that non-tunnel packets will match as tunneled using 387 this heuristic, but tunneled packets (of the known types of tunnels) 388 should not escape inspection, absent implementation bugs. 390 For some protocols, it may be possible to monitor setup exchanges to 391 know to expect that data will be exchanged on certain ports later. 392 (Note that this does not necessarily apply to Teredo, for example, 393 since communicating with another Teredo client behind a cone NAT 394 [RFC5389] device does not require such signaling. In such cases this 395 control will not work. However, deprecation of the cone bit as 396 discussed in [RFC5991] means this technique may indeed work with 397 updated Teredo implementations.) 399 3.2.3. Recommendations 401 As illustrated above, it should be clear that inspecting the contents 402 of tunneled data packets is highly complex and often impractical. 403 For this reason, if a network wishes to monitor IP traffic, tunneling 404 across, as opposed to tunneling to, the security boundary is not 405 recommended. For example, to provide an IPv6 transition solution, 406 the network should provide native IPv6 connectivity or a tunnel 407 solution (e.g., ISATAP or 6over4) that encapsulates data packets 408 between hosts and a router within the network. 410 4. Increased Exposure Due to Tunneling 412 4.1. NAT Holes Increase Attack Surface 414 4.1.1. Problem 416 If the tunnel allows inbound access from the public Internet, the 417 opening created in a NAT device due to a tunnel client increases its 418 Internet attack surface area. If vulnerabilities are present, this 419 increased exposure can be used by attackers and their programs. 421 If the tunnel allows inbound access only from a private network 422 (e.g., a remote network to which one has VPN'ed), the opening created 423 in the NAT device still increases its attack surface area, although 424 not as much as in the public Internet case. 426 4.1.2. Discussion 428 When a tunnel is active, a mapped port is maintained on the NAT 429 device through which remote hosts can send packets and perhaps 430 establish connections. The following sequence is intended to sketch 431 out the processing on the tunnel client host that can be reached 432 through this mapped port; the actual processing for a given host may 433 be somewhat different. 435 1. Link-layer protocol processing 437 2. (Outer) IP host firewall processing 439 3. (Outer) IP processing by stack 441 4. UDP/TCP processing by stack 443 5. Tunnel client processing 445 6. (Inner) IP host firewall processing 447 7. (Inner) IP processing by stack 449 8. Various upper layer processing may follow 451 The inner firewall (and other security) processing may or may not be 452 present, but if it is, some of the inner IP processing may be 453 filtered. (For example, [RFC4380] section 7.1 recommends that an 454 IPv6 host firewall be used on all Teredo clients.) 456 (By the virtue of the tunnel being active, we can infer that the 457 inner host firewall is unlikely to do any filtering based on the 458 outer IP.) Any of this processing may expose vulnerabilities an 459 attacker can exploit; similarly these may expose information to an 460 attacker. Thus, even if firewall filtering is in place (as is 461 prudent) and filters all incoming packets, the exposed area is larger 462 than if a native IP Internet connection were in place, due to the 463 processing that takes place before the inner IP is reached 464 (specifically, the UDP/TCP processing, the tunnel client processing, 465 and additional IP processing, especially if one is IPv4 and the other 466 is IPv6). 468 One possibility is that a layer 3 targeted worm makes use of a 469 vulnerability in the exposed processing. The main benefit tunneling 470 provides to worms is enabling L3 reachability to the end host. Even 471 a thoroughly firewalled host could be subject to a worm that spreads 472 with a single UDP packet if the right remote code vulnerability is 473 present. 475 4.1.3. Recommendations 477 This problem seems inherent in tunneling being active on a host, so 478 the solution seems to be to minimize tunneling use. 480 For example, it can be active only when it is really needed and only 481 for as long as needed. So, the tunnel interface can be initially not 482 configured and only used when it is entirely the last resort. The 483 interface should then be deactivated (ideally, automatically) again 484 as soon as possible. Note however that the hole will remain in the 485 NAT device for some amount of time after this, so some processing of 486 incoming packets is inevitable unless the client's native IP address 487 behind the NAT device is changed. 489 4.2. Exposure of a NAT Hole 491 4.2.1. Problem 493 Attackers are more likely to know about a tunnel client's NAT hole 494 than a typical hole in the NAT device. If they know about the hole, 495 they could try to use it. 497 4.2.2. Discussion 499 There are at least three reasons why an attacker may be more likely 500 to learn of the tunnel client's exposed port than a typical NAT 501 exposed port: 503 1. The NAT mapping for a tunnel is typically held open for a 504 significant period of time, and kept stable. This increases the 505 chance of it being discovered. 507 2. In some protocols (e.g., Teredo), the external IP address and 508 port are contained in the client's address that is used end-to- 509 end and possibly even advertised in a name resolution system. 510 While the tunnel protocol itself might only distribute this 511 address in IP headers, peers, routers, and other on-path nodes 512 still see the client's IP address. Although this point does not 513 apply directly to protocols (e.g., L2TP) that do not construct 514 the inner IP address based on the outer IP address, the inner IP 515 address is still known to peers, routers, etc. and can still be 516 reached by attackers without knowing the external IP address or 517 port. 519 3. The tunnel protocol often contains more messages that are 520 exchanged and with more parties (e.g., due to a longer path 521 length) than without using the tunnel, offering more chance for 522 visibility into the port and address in use. 524 4.2.3. Recommendations 526 The recommendations from Section 4.1 seem to apply here as well: 527 minimize tunnel use. 529 4.3. Public Tunnels Widen Holes in Restricted NATs 531 4.3.1. Problem 533 Tunnels that allow inbound connectivity from the Internet (e.g., 534 Teredo, tunnel brokers, etc) essentially disable the filtering 535 behavior of the NAT for all tunnel client ports. This eliminates NAT 536 devices filtering for such ports and may eliminate the need for an 537 attacker to spoof an address. 539 4.3.2. Discussion 541 NATs that implement Address-Dependent or Address and Port-Dependent 542 Filtering [RFC4787] limit the source of incoming packets to just 543 those that are a previous destination. This poses a problem for 544 tunnels that intend to allow inbound connectivity from the Internet. 546 Various protocols (e.g., Teredo, STUN [RFC5389], etc.) provide a 547 facility for peers, upon request, to become a previous destination. 548 This works by sending a "bubble" packet via a server, which is passed 549 to the client, and then sent by the client (through the NAT) to the 550 originator. 552 This removes any NAT-based barrier to attackers sending packets in 553 through the client's service port. In particular, an attacker would 554 no longer need to either be an actual previous destination or to 555 forge its addresses as a previous destination. When forging, the 556 attacker would have had to learn of a previous destination and then 557 would face more challenges in seeing any returned traffic. 559 4.3.3. Recommendations 561 Minimizing public tunnel use (see Section 4.1.3) would lower the 562 attack opportunity related to this exposure. 564 5. Tunnel Address Concerns 566 5.1. Feasibility of Guessing Tunnel Addresses 567 5.1.1. Problem 569 For some types of tunneling protocols, it may be feasible to guess IP 570 addresses assigned to tunnels, either when looking for a specific 571 client or when looking for an arbitrary client. This is in contrast 572 to native IPv6 addresses in general, but is no worse than for native 573 IPv4 addresses today. 575 For example, some protocols (e.g., 6to4 and Teredo) use well-defined 576 address ranges. As another example, using well-known public servers 577 for Teredo or tunnel brokers also implies using a well known address 578 range. 580 5.2. Profiling Targets Based on Tunnel Address 582 5.2.1. Problem 584 An attacker encountering an address associated with a particular 585 tunneling protocol or well-known tunnel server has the opportunity to 586 infer certain relevant pieces of information that can be used to 587 profile the host before sending any packets. This can reduce the 588 attacker's footprint and increase the attacker's efficiency. 590 5.2.2. Discussion 592 The tunnel address reveals some information about the nature of the 593 client. 595 o That a host has a tunnel address associated with a given protocol 596 means that the client is running on some platform for which there 597 exists a tunnel client implementation of that protocol. In 598 addition, if some platforms have that protocol installed by 599 default and where the host's default rules for using it make it 600 susceptible to being in use, then it is more likely to be running 601 on such a platform than on one where it is not used by default. 602 For example, as of this writing, seeing a Teredo address suggests 603 that the host it is on is probably running Windows. 605 o Similarly, the use of an address associated with a particular 606 tunnel server also suggests some information. Tunnel client 607 software is often deployed, installed, and/or configured using 608 some degree of automation. It seems likely that the majority of 609 the time the tunnel server that results from the initial 610 configuration will go unchanged from the initial setting. 611 Moreover, the server that is configured for use may be associated 612 with a particular means of installation, which often suggests the 613 platform. For example, if the server field in a Teredo address is 614 one of the IPv4 addressees to which teredo.ipv6.microsoft.com 615 resolves, it suggests that the host is running Windows. 617 o The external IPv4 address of a NAT device can of course be readily 618 associated with a particular organization or at least an ISP, and 619 hence putting this address in an IPv6 address reveals this 620 information. However, this is no different than using a native IP 621 address, and hence is not new with tunneling. 623 o It is also possible that external client port numbers may be more 624 often associated with particular client software or the platform 625 on which it is running. The usefulness of this for platform 626 determination is, however, reduced by the different NAT port 627 number assignment behaviors. In addition, the same observations 628 would apply to use of UDP or TCP over native IP as well, and hence 629 this is not new with tunneling. 631 The platform, tunnel client software, or organization information can 632 be used by an attacker to target attacks more carefully. For 633 example, an attacker may decide to attack an address only if it is 634 likely to be associated with a particular platform or tunnel client 635 software with a known vulnerability. (This is similar to the ability 636 to guess some platforms based on the OUI in the EUI-64 portion of an 637 IPv6 address generated from a MAC address, since some platforms are 638 commonly used with interface cards from particular vendors.) 640 5.2.3. Recommendations 642 If installation programs randomized the server setting, that would 643 reduce the extent to which they can be profiled. Similarly, 644 administrators can choose to change the default setting to reduce the 645 degree to which they can be profiled ahead of time. 647 Randomizing the tunnel client port in use would mitigate any 648 profiling that can be done based on the external port, especially if 649 multiple different tunnel clients did this. Further discussion on 650 randomizing ports can be found at [TSV-PORT]. 652 It is recommended that tunnel protocols minimize the propagation of 653 knowledge about whether the NAT is a cone NAT. 655 6. Additional Security Concerns 657 6.1. Attacks Facilitated By Changing Tunnel Server Setting 658 6.1.1. Problem 660 If an attacker could either change a tunnel client's server setting 661 or change the IP addresses to which a configured host name resolves 662 (e.g., by intercepting DNS queries) AND the tunnel is not 663 authenticated, it would let the attacker become a man in the middle. 664 This would allow them to at least monitor peer communication and at 665 worst to impersonate the remote peer. 667 6.1.2. Discussion 669 A client's server has good visibility into the client's communication 670 with IP peers. If the server were switched to one that records this 671 information and makes it available to third parties (e.g., 672 advertisers, competitors, spouses, etc.) then sensitive information 673 would be disclosed, especially if the client's host prefers the 674 tunnel over native IP. Assuming the server provides good service, 675 the user would not have reason to suspect the change. 677 Full interception of IP traffic could also be arranged (including 678 pharming) which would allow any number of deception or monitoring 679 attacks including phishing. We illustrate this with an example 680 phishing attack scenario. 682 It is often assumed that the tunnel server is a trusted entity. It 683 may be possible for malware or a malicious user to quietly change the 684 client's tunnel server setting and have the user be unaware their 685 trust has been misplaced for an indefinite period of time. However, 686 malware or a malicious user can do much worse than this, so this is 687 not a significant concern. Hence it is only important that an 688 attacker on the network cannot change the client's server setting. 690 1. A phisher sets up a malicious tunnel server (or tampers with a 691 legitimate one). This server, for the most part, provides 692 correct service. 694 2. An attacker, by some means, switches the host's tunnel server 695 setting, or spoofs a DNS reply, to point to the above server. If 696 neither DNS nor the tunnel setup is secured (i.e., if the client 697 does not authenticate the information), then the attacker's 698 tunnel server is seen as legitimate. 700 3. A user on the victim host types their bank's URL into his/her 701 browser. 703 4. The bank's hostname resolves to one or more IP addresses and the 704 tunnel is selected for socket connection for whatever reason 705 (e.g., the tunnel provides IPv6 connectivity and the bank has an 706 IPv6 address). 708 5. The tunnel client uses the server for help in connecting to the 709 bank's IP address. Some tunneling protocols use a separate 710 channel for signaling vs data, but this still allows the server 711 to place itself in the data path by an appropriate signal to the 712 client. For example, in Teredo, the client sends a ping request 713 through a server which is expected to come back through a data 714 relay, and a malicious server can simply send it back itself to 715 indicate that is a data relay for the communication. 717 6. The rest works pretty much like any normal phishing transaction, 718 except that the attacker acts as a tunnel server (or data relay, 719 for protocols such as Teredo) and a host with the bank's IP 720 address. 722 This pharming type attack is not unique to tunneling. Switching DNS 723 server settings to a malicious DNS server or DNS cache poisoning in a 724 recursive DNS resolver could have a similar effect. 726 6.1.3. Recommendations 728 In general, anti-phishing and anti-fraud provisions should help with 729 aspects of this, as well as software that specifically monitors for 730 tunnel server changes. 732 Perhaps the best way to mitigate tunnel-specific attacks is to have 733 the client either authenticate the tunnel server, or at least the 734 means by which the tunnel server's IP address is determined. For 735 example, SSL VPNs use https URLs and hence authenticate the server as 736 being the expected one. Another mechanism, when IPv6 Router 737 Advertisements are sent over the tunnel is to use SEcure Neighbor 738 Discovery (SEND) [RFC3971] to verify that the client trusts the 739 server. 741 On the host, it should require an appropriate level of privilege in 742 order to change the tunnel server setting (as well as other non- 743 tunnel-specific settings such as the DNS server setting, etc.). 744 Making it easy to see the current tunnel server setting (e.g., not 745 requiring privilege for this) should help detection of changes. 747 The scope of the attack can also be reduced by limiting tunneling use 748 in general but especially in preferring native IPv4 to tunneled IPv6; 749 this is because it is reasonable to expect that banks and similar web 750 sites will continue to be accessible over IPv4 for as long as a 751 significant fraction of their customers are still IPv4-only. 753 7. Mechanisms to secure the use of tunnels 755 This document described several security issues with tunnels. This 756 does not mean that tunnels need to be avoided at any cost. On the 757 contrary, tunnels can be very useful if deployed, operated and used 758 properly. The threats against IP tunnels are documented here. If 759 the threats can be mitigated, network administrators can efficiently 760 and securely use tunnels in their network. Several measures can be 761 taken in order to secure the operation of IPv6 tunnels: 763 o Operating on-premise tunnel servers/relays so that the tunneled 764 traffic does not cross border routers. 766 o Setting up internal routing to steer traffic to these servers/ 767 relays 769 o Setting up of firewalls to allow known and controllable tunneling 770 mechanisms and disallow unknown tunnels. 772 8. Acknowledgments 774 The authors would like to thank Remi Denis-Courmont, Fred Templin, 775 Jordi Palet Martinez, James Woodyatt, Christian Huitema, Brian 776 Carpenter, Nathan Ward, Kurt Zeilenga, Joel Halpern, Erik Kline, 777 Alfred Hoenes and Fernando Gont for reviewing earlier versions of the 778 document and providing comments to make this document better. 780 9. Security Considerations 782 This entire document discusses security concerns with tunnels. 784 10. IANA Considerations 786 There are no actions for IANA in this document. 788 11. Informative References 790 [RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and 791 E. Lear, "Address Allocation for Private Internets", 792 BCP 5, RFC 1918, February 1996. 794 [RFC2529] Carpenter, B. and C. Jung, "Transmission of IPv6 over IPv4 795 Domains without Explicit Tunnels", RFC 2529, March 1999. 797 [RFC2661] Townsley, W., Valencia, A., Rubens, A., Pall, G., Zorn, 798 G., and B. Palter, "Layer Two Tunneling Protocol "L2TP"", 799 RFC 2661, August 1999. 801 [RFC3056] Carpenter, B. and K. Moore, "Connection of IPv6 Domains 802 via IPv4 Clouds", RFC 3056, February 2001. 804 [RFC3484] Draves, R., "Default Address Selection for Internet 805 Protocol version 6 (IPv6)", RFC 3484, February 2003. 807 [RFC3931] Lau, J., Townsley, M., and I. Goyret, "Layer Two Tunneling 808 Protocol - Version 3 (L2TPv3)", RFC 3931, March 2005. 810 [RFC3971] Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure 811 Neighbor Discovery (SEND)", RFC 3971, March 2005. 813 [RFC4380] Huitema, C., "Teredo: Tunneling IPv6 over UDP through 814 Network Address Translations (NATs)", RFC 4380, 815 February 2006. 817 [RFC4787] Audet, F. and C. Jennings, "Network Address Translation 818 (NAT) Behavioral Requirements for Unicast UDP", BCP 127, 819 RFC 4787, January 2007. 821 [RFC5095] Abley, J., Savola, P., and G. Neville-Neil, "Deprecation 822 of Type 0 Routing Headers in IPv6", RFC 5095, 823 December 2007. 825 [RFC5214] Templin, F., Gleeson, T., and D. Thaler, "Intra-Site 826 Automatic Tunnel Addressing Protocol (ISATAP)", RFC 5214, 827 March 2008. 829 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 830 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 831 October 2008. 833 [RFC5991] Thaler, D., Krishnan, S., and J. Hoagland, "Teredo 834 Security Updates", RFC 5991, September 2010. 836 [SECA-IP] Gont, F., "Security Assessment of the Internet Protocol 837 version 4", draft-ietf-opsec-ip-security-03 (work in 838 progress), April 2010. 840 [TSV-PORT] 841 Larsen, M. and F. Gont, "Transport Protocol Port 842 Randomization Recommendations", 843 draft-ietf-tsvwg-port-randomization-09 (work in progress), 844 August 2010. 846 Authors' Addresses 848 Suresh Krishnan 849 Ericsson 850 8400 Decarie Blvd. 851 Town of Mount Royal, QC 852 Canada 854 Phone: +1 514 345 7900 x42871 855 Email: suresh.krishnan@ericsson.com 857 Dave Thaler 858 Microsoft Corporation 859 One Microsoft Way 860 Redmond, WA 98052 861 USA 863 Phone: +1 425 703 8835 864 Email: dthaler@microsoft.com 866 James Hoagland 867 Symantec Corporation 868 350 Ellis St. 869 Mountain View, CA 94043 870 US 872 Email: Jim_Hoagland@symantec.com 873 URI: http://symantec.com/