IPv6 Operations Working Group D. Thaler Internet-Draft Microsoft Expires: January 14, 2009 S. Krishnan Ericsson J. Hoagland Symantec July 13, 2008 Teredo Security Updates draft-krishnan-v6ops-teredo-update-03.txt Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on January 14, 2009. Abstract The Teredo protocol defines a set of flags that are embedded in every Teredo IPv6 address. This document specifies a set of security updates that modify the use of this flags field, but are backwards compatible. Thaler, et al. Expires January 14, 2009 [Page 1] Internet-Draft Teredo Security Updates July 2008 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Specification . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1. Random Address Flags . . . . . . . . . . . . . . . . . . . 4 3.2. Deprecation of Cone Bit . . . . . . . . . . . . . . . . . . 6 4. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 7 6. Normative References . . . . . . . . . . . . . . . . . . . . . 7 Appendix A. Appendix A: Implementation Status . . . . . . . . . . 7 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 7 Intellectual Property and Copyright Statements . . . . . . . . . . 9 Thaler, et al. Expires January 14, 2009 [Page 2] Internet-Draft Teredo Security Updates July 2008 1. Introduction Teredo [RFC4380] defines a set of flags that are embedded in every Teredo IPv6 address. This document specifies a set of security updates that modify the use of this flags field, but are backwards compatible. The flags field in a Teredo IPv6 address has 13 unused bits out of a total of 16 bits. To guard against address-scanning risks from malicious users, this update randomizes 12 of the 13 unused bits when configuring the Teredo IPv6 address. Even if an attacher were able to determine the external (mapped) IPv4 address and port assigned by a NAT to the Teredo client, the attacker would still need to attack a range of 4,096 IPv6 addresses to determine the actual Teredo IPv6 address of the client. The cone bit in a Teredo IPv6 address indicates whether a peer needs to send Teredo control messages before communicating with a Teredo IPv6 address. Unfortunately, it may also have some value in terms of profiling to the extent that it reveals the security posture of the network. If the cone bit is set, can attacker may decide it is fruitful to port scan the embedded external IPv4 address and others associated with the same organization, looking for open ports. Deprecating the cone bit prevents the a priori revelation of the security posture of the NAT. 2. Terminology This document uses the following terminology, for consistency with [RFC4380]. Cone NAT: A NAT that maps all requests from the same internal IP address and port to the same external IP address and port. Furthermore, any external host can send a packet to the internal host by sending a packet to the mapped external address and port. Indirect Bubble: A Teredo control message that is sent to another Teredo client via the destination's Teredo server, as specified in [RFC4380] section 5.2.4. Local Address/Port: The IPv4 address and UDP port from which a Teredo client sends Teredo packets. The local port is referred to as the Teredo service port in [RFC4380]. The local address of a node may or may not be globally routable because the node can be located behind one or more NATs. Mapped Address/Port: A global IPv4 address and a UDP port that Thaler, et al. Expires January 14, 2009 [Page 3] Internet-Draft Teredo Security Updates July 2008 results from the translation of a node's own local address/port by one or more NATs. The node learns these values through the Teredo protocol specified in [RFC4380]. the mapped address/port can be different for every peer that a node tries to communicate with. Network Address Translation (NAT): The process of converting between IP addresses used within an intranet or other private network and Internet IP addresses. Peer: A Teredo client with which another Teredo Client needs to communicate. Port-Preserving NAT: A NAT that translates a local address/port to a mapped address/port such that the mapped port has the same value as the local port, as long as that same mapped address/port has not already been used for a different local address/port. Public Address: An external global address used by a NAT. Restricted NAT: A NAT where all requests from the same internal IP address and port are mapped to the same external IP address and port. Unlike the cone NAT, an external host can send packets to an internal host (by sending a packet to the external mapped address and port) only if the internal host has first sent a packet to the external host. Teredo Client: A node that has access to the IPv4 Internet and wants to gain access to the IPv6 Internet. Teredo IPv6 Address: An IPv6 address that starts with the prefix 2001:0000:/32 and is formed as specified in [RFC4380] section 2.14. Teredo Server: A node that has a globally routable address on the IPv4 Internet, and is used as a helper to provide IPv6 connectivity to Teredo clients. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. 3. Specification 3.1. Random Address Flags Teredo addresses are structured and some of the fields contained in them are fairly predictable. This can be used to better predict the address. Thaler, et al. Expires January 14, 2009 [Page 4] Internet-Draft Teredo Security Updates July 2008 Teredo prefix: This field is 32 bits and has a single IANA assigned value Server: This field is 32 bits and is set to the server in use. The server to use is usually statically configured on the client. This means that overall entropy of the server field will be low, i.e., that the server will not be hard to predict. Attackers could confine their guessing to the most popular server IP addresses. Flags: The flags field is 16 bits in length, but [RFC4380] provides for only one of these bits (the cone bit) to vary. Client port: This 16 bit field corresponds to the external port number assigned to the client's Teredo service port. Thus the value of this field depends on two factors (the chosen Teredo service port and the NAT port assignment behavior) and therefore it is harder to predict the entropy this field will have. If clients tend to use a predictable port number and NATs are often port-preserving, then the port number can be rather predictable. Client IPv4 address: This 32 bit field corresponds to the external IPv4 address the NAT has assigned for the client port. In principle, this can be any address in the assigned part of the IPv4 unicast address space. However, if an attacker is looking for the address of a specific Teredo client, they will have to have the external IPv4 address pretty well narrowed down. Certain IPv4 address ranges could also become well known for having a higher concentration of Teredo clients, making it easier to find an arbitrary Teredo client. These addresses could correspond to large organizations that allow Teredo such as a university or enterprise or to Internet Service Providers that only provide their customers with RFC 1918 addresses. Optimizations in scanning can also reduce the number of addresses that need to be checked. For example, for addresses behind a cone NAT, it would likely be easy to probe if a specific port number is open on a IPv4 address, prior to trying to form a Teredo address for that address and port. Hence the Flags field specified in [RFC4380] section 4 is updated as follows: 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |C|z|Random1|U|G| Random2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ C: This flag is specified in [RFC4380] and its use is modified in Section 3.2 below. Thaler, et al. Expires January 14, 2009 [Page 5] Internet-Draft Teredo Security Updates July 2008 z: This flag is reserved. It MUST be set to zero when the address is constructed, as specified in [RFC4380]. Random1: MUST be set to a random value. U: This flag is specified in [RFC4380]. G: This flag is specified in [RFC4380]. Random2: MUST be set to a random value. 3.2. Deprecation of Cone Bit The qualification procedure is specified in [RFC4380] section 5.2.1, and is modified as follows. Teredo clients SHOULD completely skip the first phase of the qualification procedure and implement only the second phase where it uses the Teredo link local address with the cone bit set to zero. Consequently, a distinction between cone and restricted NATs can no longer be made. Teredo communication will still succeed, but at the expense of forcing peers to skip step 4 of the sending details specified in [RFC4380]. This will result in the same number of indirect bubbles being sent as if the other end were a peer behind a restricted NAT. Even though the peer behind the cone NAT does not need these indirect bubbles, it replies to these indirect bubbles just like it would to any other indirect bubbles. Skipping step 4 is already allowed for reliability reasons (as specified in [RFC4380] section 5.2.4), and hence this does not break interoperability, but the result of skipping the first phase of qualification is to force that behavior (which is less efficient, but potentially more reliable) to be taken by peers. In addition, clients SHOULD ignore the cone bit in the address of a Teredo peer and treat it as if it were always clear, as specified in [RFC4380] section 5.2.4 (last paragraph). 4. Security Considerations This document specifies updates to [RFC4380] that improve the security of the base Teredo mechanism. The Teredo IPv6 Address format defined in [RFC4380] section 4 makes it relatively easy for a malicious user to conduct an address-scan to determine IPv6 addresses by guessing the external (mapped) IPv4 address and port assigned to the Teredo client. The random address bits guard against address-scanning risks by providing a range of 4096 IPv6 addresses per external IPv4 address/port. As a result, even if a malicious user were able to determine the external (mapped) Thaler, et al. Expires January 14, 2009 [Page 6] Internet-Draft Teredo Security Updates July 2008 IPv4 address and port assigned to the Teredo client, the malicious user would still need to attack a range of 4,096 IPv6 addresses to determine the actual Teredo IPv6 address of the client. Teredo is NOT RECOMMENDED as a solution for managed networks. Administrators of such networks may wish to filter all Teredo traffic at the boundaries of their networks. 5. IANA Considerations [RFC Editor: please remove this section prior to publication.] This document has no IANA Actions. 6. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC4380] Huitema, C., "Teredo: Tunneling IPv6 over UDP through Network Address Translations (NATs)", RFC 4380, February 2006. Appendix A. Appendix A: Implementation Status Deprecation of the cone bit as specified in this document is implemented in Windows Vista and Windows Server 2008. The random flags specified in this document are implemented in Windows Vista SP1 and Windows Server 2008. All Windows implementations automatically disable Teredo if they detect that they are on a managed network with a domain controller. Thaler, et al. Expires January 14, 2009 [Page 7] Internet-Draft Teredo Security Updates July 2008 Authors' Addresses Dave Thaler Microsoft Corporation One Microsoft Way Redmond, WA 98052 USA Phone: +1 425 703 8835 Email: dthaler@microsoft.com Suresh Krishnan Ericsson 8400 Decarie Blvd. Town of Mount Royal, QC Canada Phone: +1 514 345 7900 x42871 Email: suresh.krishnan@ericsson.com James Hoagland Symantec Corporation 350 Ellis St. Mountain View, CA 94043 US Email: Jim_Hoagland@symantec.com URI: http://symantec.com/ Thaler, et al. Expires January 14, 2009 [Page 8] Internet-Draft Teredo Security Updates July 2008 Full Copyright Statement Copyright (C) The IETF Trust (2008). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Property The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Thaler, et al. Expires January 14, 2009 [Page 9]