No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0165.xml 15KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Best Practices to Discourage JID Mimicking</title>
  10. <abstract>This document recommends best practices to discourage mimicking of Jabber IDs.</abstract>
  12. <number>0165</number>
  13. <status>Deferred</status>
  14. <type>Informational</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. <spec>XMPP IM</spec>
  20. <spec>XEP-0172</spec>
  21. </dependencies>
  22. <supersedes/>
  23. <supersededby/>
  24. <shortname>N/A</shortname>
  25. &stpeter;
  26. <revision>
  27. <version>0.6</version>
  28. <date>2007-12-13</date>
  29. <initials>psa</initials>
  30. <remark><p>Added security consideration about storage of handle in the roster.</p></remark>
  31. </revision>
  32. <revision>
  33. <version>0.5</version>
  34. <date>2007-07-11</date>
  35. <initials>psa</initials>
  36. <remark><p>Updated to reflect changes to XEP-0189 syntax; completed editorial review.</p></remark>
  37. </revision>
  38. <revision>
  39. <version>0.4</version>
  40. <date>2006-12-20</date>
  41. <initials>psa</initials>
  42. <remark><p>Explicitly limited scope to address mimicking rather than address forging; updated to use XEP-0189 syntax for keys.</p></remark>
  43. </revision>
  44. <revision>
  45. <version>0.3</version>
  46. <date>2006-06-10</date>
  47. <initials>psa</initials>
  48. <remark><p>Further clarified security considerations as well as the relationship between referrals and presence subscriptions; updated to use proposed syntax for fingerprints.</p></remark>
  49. </revision>
  50. <revision>
  51. <version>0.2</version>
  52. <date>2006-03-28</date>
  53. <initials>psa</initials>
  54. <remark><p>Updated to use XEP-0172 syntax for nicknames.</p></remark>
  55. </revision>
  56. <revision>
  57. <version>0.1</version>
  58. <date>2005-11-16</date>
  59. <initials>psa</initials>
  60. <remark><p>Initial version.</p></remark>
  61. </revision>
  62. <revision>
  63. <version>0.0.2</version>
  64. <date>2005-11-14</date>
  65. <initials>psa</initials>
  66. <remark><p>Further defined petname practices; specified how to include nicknames and fingerprints.</p></remark>
  67. </revision>
  68. <revision>
  69. <version>0.0.1</version>
  70. <date>2005-09-28</date>
  71. <initials>psa</initials>
  72. <remark><p>Initial version.</p></remark>
  73. </revision>
  74. </header>
  75. <section1 topic='Introduction' anchor='intro'>
  76. <p>There are two forms of address spoofing: forging and mimicking.</p>
  77. <p>In the context of Jabber/XMPP technologies, an address is <em>forged</em> when an entity is able to generate an XML stanza whose 'from' address does not correspond to the account credentials with which the entity authenticated onto the network -- for example, if an entity that authenticated as "" is able to send XML stanzas from "" or "".</p>
  78. <p>Address forging is difficult in Jabber/XMPP systems given the requirement for sending servers to stamp 'from' addresses and for receiving servers to verify sending domains via server dialback or server-to-server authentication (see &xmppcore;). Difficult, but not impossible: a rogue server could forge JIDs at the sending domain by ignoring the stamping requirement and could even forge JIDs at other domains by means of a DNS poisoning attack. However, discussion of ways to deal with such rogue servers is out of scope for this document.</p>
  79. <p>An address is <em>mimicked</em> when an entity provides legitimate authentication credentials for and sends XML stanzas from an account whose Jabber ID (JID) appears to a human user to be the same as another JID -- for example, in some clients "" (spelled with the number one as the final character of the node identifier) may appear to be the same as " (spelled with the lower-case version of the letter "L"). <note>This phenomenon is sometimes called "typejacking".</note> A more sophisticated example of address mimicking (which may not render correctly in all browsers) is the following:</p>
  80. <code>
  81. &#5082;&#5026;&#5045;&#5036;&#5026;&#5036;&#5074;@&#5035;&#5034;&#5108;&#5108;&#5036;&#5074;.org</code>
  82. <p>That JID is not an uppercase version of "" in US-ASCII characters, but a fake JID made up mostly of Cherokee characters, namely:</p>
  83. <code>
  84. U+13DA U+13A2 U+13B5 U+13AC U+13A2 U+13AC U+13D2
  85. @
  86. U+13AB U+13AA U+13F4 U+13F4 U+13AC U+13D2 .org</code>
  87. <p>In this example, it is unlikely that the average user could tell the difference between the real JID and the fake JID. <note>Naturally, there is no way to distinguish with full certainty which is the fake JID and which is the real JID. For example, in some communication contexts, the Cherokee JID may be the real JID and the US-ASCII JID may thus appear to be the fake JID.</note></p>
  88. <p>By contrast with address forging, it may be relatively easy to mimic (some) JIDs in Jabber/XMPP systems, especially because JIDs can contain almost any Unicode character. The possibility of address mimicking introduces security vulnerabilities of the kind that have also plagued the World Wide Web, specifically the phenomenon known as phishing. <note>Phishing has been defined by the Financial Services Technology Consortium Counter-Phishing Initiative as "a broadly launched social engineering attack in which an electronic identity is misrepresented in an attempt to trick individuals into revealing personal credentials that can be used fraudulently against them"). To be precise, the current document (1) does not assume that such attacks will be broadly launched and (2) focuses on the misrepresentation of Jabber IDs (not any other identifiers) within the context of Jabber/XMPP systems.</note> To combat those vulnerabilities, this document recommends a set of best practices to minimize the potential impact of address mimicking on the Jabber/XMPP network. <note>This document does not cover handling of non-XMPP addresses, for example HTTP URLs. Jabber/XMPP clients SHOULD handle such addresses in accordance with best practices for the relevant non-XMPP technology.</note></p>
  89. </section1>
  90. <section1 topic='Recommendations' anchor='rec'>
  91. <section2 topic='Presentation of JIDs' anchor='rec-jids'>
  92. <p>Every human user of Jabber/XMPP technologies presumably has a preferred language (or, in some cases, a small set of preferred languages), which an XMPP application SHOULD gather either explicitly from the user or implicitly via the operating system of the user's device. Furthermore, every language has a range of characters normally used to represent that language in textual form. Therefore, an XMPP application SHOULD warn the user when presenting a JID that uses characters outside the normal range of the user's preferred language(s). <note>This recommendation is not intended to discourage communication across language communities; instead, it simply recognizes the existence of such language communities and encourages due caution when presenting unfamiliar character sets to human users.</note></p>
  93. </section2>
  94. <section2 topic='The Roster as a Petname System' anchor='rec-petname'>
  95. <p>As explained in &petnames;, no one naming or address scheme can provide names that are simultaneously global, memorable, and unique. However, certain <em>combinations</em> of names and addresses can provide all three properties, and such combinations are commonly called "petname systems". In particular, the information contained in a user's roster (see &xmppim;) can be combined with information provided by a user's contacts to construct a petname system. Consider the following combination of names:</p>
  96. <ol>
  97. <li><p>The JID "" is globally unique on the Jabber/XMPP network, but it is not necessarily memorable.</p></li>
  98. <li><p>The nickname "psa" (asserted by the user associated with the address "") is globally memorable but not necessarily unique; see &xep0172; for more information about user-asserted nicknames.</p></li>
  99. <li><p>The handle or petname "that protocol dude" (assigned by a contact who adds "" to her contact list) is privately memorable and unique <note>If not shared or leaked, it may even be securely unique.</note> but is by no means global since it has meaning only to the person who assigns it; for consistency with <cite>XEP-0172</cite> and &xmppim; we refer to this as a "handle". <note>In <cite>RFC 6121</cite> this was referred to as an "alias".</note></p></li>
  100. </ol>
  101. <p>A client SHOULD require an end user to assign a handle for every contact added to the person's roster, which SHOULD be stored in the roster as the value of the &lt;item/&gt; element's 'name' attribute (see the <link url='#security'>Security Considerations</link> section of this document for further discussion). A client SHOULD then present that handle instead of or in addition to the contact's JID or nickname (e.g., in the user's roster and in chat interfaces). This will help to discourage mimicked addresses from being presented as equivalent to the address that is being mimicked.</p>
  102. </section2>
  103. <section2 topic='Associating Security Credentials with Roster Items' anchor='rec-secure'>
  104. <p>Although a Jabber ID can be considered globally unique, the petname system in which it is embedded can be strengthened by associating that JID with a key that can be used for signing and encryption (such as an OpenPGP key, X.509 certificate, or RSA key), preferably a key that encapsulates the associated XMPP address. A client SHOULD associate a key with the user of that client, and SHOULD generate such a key if the user does not have one.</p>
  105. <p>Unfortunately, cryptographic identities such as keys, certificates, and fingerprints are even less memorable than JIDs, which makes assigning a handle even more important. Therefore, if a contact provides such a cryptographic identity, a client MUST reliably associate it with the contact in a user's roster (including, as mentioned, a handle for each contact) in order to further strengthen the petname system.</p>
  106. </section2>
  107. <section2 topic='Referrals' anchor='rec-referrals'>
  108. <p>In order to strengthen the web of interaction and trust between Jabber/XMPP users, it is helpful for them to share roster items. In particular, when a user wants to subscribe to the presence of a potential contact, the user SHOULD seek a referral from a third person who knows both the user and the contact. Such a referral consists of a roster item sent from the third person to the potential contact, encapsulated using the &xep0144; protocol:</p>
  109. <example caption='A Basic Referral'><![CDATA[
  110. <message from='' to=''>
  111. <x xmlns=''>
  112. <item jid='' name='Peter Saint-Andre'/>
  113. </x>
  114. </message>
  115. ]]></example>
  116. <p>Here, the 'name' attribute encapsulates what in petname systems is known as an "alleged name", that is, the name for an entity proposed by a third party.</p>
  117. <p>Such a referral SHOULD also include the user's nick as understood by the third person (encapsulated in the format defined in XEP-0172) and fingerprint of the user as understood by the third person (encapsulated in the format defined in &xep0189;):</p>
  118. <example caption='Referral With Nickname and Public Key'><![CDATA[
  119. <message from='' to=''>
  120. <x xmlns=''>
  121. <item jid='' name='Peter Saint-Andre'>
  122. <nick xmlns=''>psa</nick>
  123. <KeyInfo xmlns=''>
  124. <KeyName>stpeterRSAkey1</KeyName>
  125. ...
  126. </KeyInfo>
  127. <KeyInfo xmlns=''>
  128. <KeyName>stpeterX509cert1</KeyName>
  129. ...
  130. </KeyInfo>
  131. </item>
  132. </x>
  133. </message>
  134. ]]></example>
  135. <p>The third person MUST NOT simply copy the key as communicated by the user but instead MUST validate it against the public key of the user.</p>
  136. </section2>
  137. <section2 topic='Subscription Requests' anchor='rec-subscriptions'>
  138. <p>We have seen that, at a minimum, three names or address types are needed to provide a petname system for XMPP: a JID, a nickname, and a handle (preferably strengthened by inclusion of a fingerprint derived from a key). However, at present a subscription request contains only the JID of the sender:</p>
  139. <example caption='A Basic Subscription Request'><![CDATA[
  140. <presence from='' to='' type='subscribe'/>
  141. ]]></example>
  142. <p>Naturally, based on the JID, it is possible to pull information about the sender from a persistent data store such as an LDAP database, &xep0054; node, or future profile system (see &xep0154;). However, to speed interactions, this document recommends that when a client sends a subscription request, it SHOULD include the preferred nickname of the sender (encapsulated via the format specified in <cite>XEP-0172</cite>) and the sender's key or keys.</p>
  143. <example caption='Subscription Request With Nickname and Key'><![CDATA[
  144. <presence from='' to='' type='subscribe'>
  145. <nick xmlns=''>psa</nick>
  146. <KeyInfo xmlns=''>
  147. <KeyName>stpeterRSAkey1</KeyName>
  148. ...
  149. </KeyInfo>
  150. <KeyInfo xmlns=''>
  151. <KeyName>stpeterX509cert1</KeyName>
  152. ...
  153. </KeyInfo>
  154. </presence>
  155. ]]></example>
  156. <p>If one or more referrals have been received, the user or client MUST check the key or keys provided in the subscription request against the key or keys provided in the referral or referrals.</p>
  157. </section2>
  158. </section1>
  159. <section1 topic='Security Considerations' anchor='security'>
  160. <p>A client should not allow a user to assign as a handle the alleged name received in a referral.</p>
  161. <p>In order for a user-assigned handle to strengthen the security of the petname system, the user must not shared the handle with other individuals. If the handle is stored in the user's roster, the handle may be compromised since roster storage is not necessarily a secure medium (e.g., the handle could be read by a server administrator). If the server is not trusted by the user, the client should store the handle locally on the user's device rather than in the roster.</p>
  162. <p>A user should not place more trust in a referral than he or she places in the person who sends it.</p>
  163. </section1>
  164. <section1 topic='IANA Considerations' anchor='iana'>
  165. <p>This document requires no interaction with &IANA;.</p>
  166. </section1>
  167. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  168. <p>This document requires no interaction with the &REGISTRAR;.</p>
  169. </section1>
  170. </xep>