mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-25 02:32:18 -05:00
0.4
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@285 4b5297f7-1745-476d-ba37-a9c6900126ab
This commit is contained in:
parent
6becab97f0
commit
46da96ceb5
74
xep-0165.xml
74
xep-0165.xml
@ -6,8 +6,8 @@
|
|||||||
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
||||||
<xep>
|
<xep>
|
||||||
<header>
|
<header>
|
||||||
<title>Prevention of JID Spoofing</title>
|
<title>Best Practices to Prevent JID Mimicking</title>
|
||||||
<abstract>This document recommends best practices to prevent the spoofing of Jabber IDs.</abstract>
|
<abstract>This document recommends best practices to prevent mimicking of Jabber IDs.</abstract>
|
||||||
&LEGALNOTICE;
|
&LEGALNOTICE;
|
||||||
<number>0165</number>
|
<number>0165</number>
|
||||||
<status>Experimental</status>
|
<status>Experimental</status>
|
||||||
@ -23,6 +23,12 @@
|
|||||||
<supersededby/>
|
<supersededby/>
|
||||||
<shortname>N/A</shortname>
|
<shortname>N/A</shortname>
|
||||||
&stpeter;
|
&stpeter;
|
||||||
|
<revision>
|
||||||
|
<version>0.4</version>
|
||||||
|
<date>2006-12-20</date>
|
||||||
|
<initials>psa</initials>
|
||||||
|
<remark><p>Explicitly limited scope to address mimicking rather than address forging; updated to use XEP-0189 syntax for keys.</p></remark>
|
||||||
|
</revision>
|
||||||
<revision>
|
<revision>
|
||||||
<version>0.3</version>
|
<version>0.3</version>
|
||||||
<date>2006-06-10</date>
|
<date>2006-06-10</date>
|
||||||
@ -56,35 +62,35 @@
|
|||||||
</header>
|
</header>
|
||||||
<section1 topic='Introduction' anchor='intro'>
|
<section1 topic='Introduction' anchor='intro'>
|
||||||
<p>There are two forms of address spoofing: forging and mimicking.</p>
|
<p>There are two forms of address spoofing: forging and mimicking.</p>
|
||||||
<p>In the context of Jabber 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 authenticated as "stpeter@jabber.org" is able to send XML stanzas from "MaineBoy@jabber.org" or "peter@saint-andre.com".</p>
|
<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 "stpeter@jabber.org" is able to send XML stanzas from "MaineBoy@jabber.org" or "peter@saint-andre.com".</p>
|
||||||
<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 "paypa1@jabber.org" (spelled with the number one as the final character of the node identifier) may appear to be the same as "paypal@jabber.org (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>
|
<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 "paypa1@jabber.org" (spelled with the number one as the final character of the node identifier) may appear to be the same as "paypal@jabber.org (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>
|
||||||
<code>
|
<code>
|
||||||
ᏚᎢᎵᎬᎢᎬᏒ@ᎫᎪᏴᏴᎬᏒ.org
|
ᏚᎢᎵᎬᎢᎬᏒ@ᎫᎪᏴᏴᎬᏒ.org</code>
|
||||||
</code>
|
|
||||||
<p>That JID is not an uppercase version of "stpeter@jabber.org" in US-ASCII characters, but a fake JID made up mostly of Cherokee characters, namely:</p>
|
<p>That JID is not an uppercase version of "stpeter@jabber.org" in US-ASCII characters, but a fake JID made up mostly of Cherokee characters, namely:</p>
|
||||||
<code>U+13DA U+13A2 U+13B5 U+13AC U+13A2 U+13AC U+13D2
|
<code>
|
||||||
|
U+13DA U+13A2 U+13B5 U+13AC U+13A2 U+13AC U+13D2
|
||||||
@
|
@
|
||||||
U+13AB U+13AA U+13F4 U+13F4 U+13AC U+13D2 .org</code>
|
U+13AB U+13AA U+13F4 U+13F4 U+13AC U+13D2 .org</code>
|
||||||
<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>
|
<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>
|
||||||
<p>Traditionally, forging of JIDs has been very difficult in Jabber/XMPP systems given the requirement for servers to stamp 'from' addresses and for servers to verify sending domains via server dialback or server-to-server authentication (see &rfc3920;). However, 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 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" (see <link url='http://fstc.org/projects/counter-phishing-phase-1/'>Financial Services Technology Consortium Counter-Phishing Initiative: Phase I</link>). 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></p>
|
<p>Traditionally, forging of JIDs has been very 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 &rfc3920;). 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>
|
||||||
<p>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>
|
<p>By contrast, 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 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" (see <link url='http://fstc.org/projects/counter-phishing-phase-1/'>Financial Services Technology Consortium Counter-Phishing Initiative: Phase I</link>). 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>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Recommendations' anchor='rec'>
|
<section1 topic='Recommendations' anchor='rec'>
|
||||||
<section2 topic='Presentation of JIDs' anchor='rec-jids'>
|
<section2 topic='Presentation of JIDs' anchor='rec-jids'>
|
||||||
<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 user's operating system. 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>
|
<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 user's operating system. 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>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='The Jabber Roster as a Petname System' anchor='rec-petname'>
|
<section2 topic='The Roster as a Petname System' anchor='rec-petname'>
|
||||||
<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". Consider the following combination of names:</p>
|
<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". Consider the following combination of names:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li><p>The JID "stpeter@jabber.org" is globally unique on the Jabber network, but it is not necessarily memorable.</p></li>
|
<li><p>The JID "stpeter@jabber.org" is globally unique on the Jabber/XMPP network, but it is not necessarily memorable.</p></li>
|
||||||
<li><p>The nickname "psa" (asserted by the user associated with the address "stpeter@jabber.org") is globally memorable but not necessarily unique; see &xep0172; for more information about user-asserted nicknames.</p></li>
|
<li><p>The nickname "psa" (asserted by the user associated with the address "stpeter@jabber.org") is globally memorable but not necessarily unique; see &xep0172; for more information about user-asserted nicknames.</p></li>
|
||||||
<li><p>The handle or petname <note>For consistency with other XMPP specifications, wee use the term "alias" rather than "petname".</note> "that JSF dude" (assigned by a contact who adds "stpeter@jabber.org" 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> we refer to this as a "handle".</p></li>
|
<li><p>The handle or petname <note>For consistency with other XMPP specifications, we use the term "handle" rather than "petname"; in <cite>RFC 3921</cite> this was referred to as an "alias" but in <cite>rfc3921bis</cite> the term has been changed to "handle".</note> "that protocol dude" (assigned by a contact who adds "stpeter@jabber.org" 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> we refer to this as a "handle".</p></li>
|
||||||
</ol>
|
</ol>
|
||||||
<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 as the value of the <item/> element's 'name' attribute qualified by the 'jabber:iq:roster' namespace (for details regarding roster syntax, refer to &rfc3921;). 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 prevent mimicked addresses from being presented as equivalent to the address that is being mimicked.</p>
|
<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 as the value of the <item/> element's 'name' attribute qualified by the 'jabber:iq:roster' namespace (for details regarding roster syntax, refer to &rfc3921;). 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 prevent mimicked addresses from being presented as equivalent to the address that is being mimicked.</p>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Associating Security Credentials with Roster Items' anchor='rec-secure'>
|
<section2 topic='Associating Security Credentials with Roster Items' anchor='rec-secure'>
|
||||||
<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 or certificate that can be used for signing and encryption (such as a PGP key or X.509 certificate), preferably a key or certificate that encapsulates the associated XMPP address (e.g., as described in Section 5.1.1 of <cite>RFC 3920</cite>). A client SHOULD associate a key or certificate with the user of that client, and SHOULD generate such a key or certificate if the user does not have one.</p>
|
<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 (e.g., as described in Section 5.1.1 of <cite>RFC 3920</cite>). 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>
|
||||||
<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, an alias for each contact) in order to further strengthen the petname system.</p>
|
<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>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Referrals' anchor='rec-referrals'>
|
<section2 topic='Referrals' anchor='rec-referrals'>
|
||||||
<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>
|
<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>
|
||||||
@ -96,40 +102,54 @@
|
|||||||
</message>
|
</message>
|
||||||
]]></example>
|
]]></example>
|
||||||
<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>
|
<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>
|
||||||
<p>Such a referral SHOULD also include the user's nick as understood by the third person (encapsulated in the format defined in &xep0172;) and fingerprint of the user as understood by the third person (encapsulated in the format defined in the proposal available at <<link url='http://www.jabber.org/jeps/inbox/fingerprint.html'>http://www.jabber.org/jeps/inbox/fingerprint.html</link>>:</p>
|
<p>Such a referral SHOULD also include the user's nick as understood by the third person (encapsulated in the format defined in &xep0172;) and fingerprint of the user as understood by the third person (encapsulated in the format defined in &xep0189;:</p>
|
||||||
<example caption='Referral With Nickname and Fingerprint'><![CDATA[
|
<example caption='Referral With Nickname and Public Key'><![CDATA[
|
||||||
<message from='peter@saint-andre.com' to='MaineBoy@jabber.org'>
|
<message from='peter@saint-andre.com' to='MaineBoy@jabber.org'>
|
||||||
<x xmlns='http://jabber.org/protocol/rosterx'>
|
<x xmlns='http://jabber.org/protocol/rosterx'>
|
||||||
<item jid='stpeter@jabber.org' name='Peter Saint-Andre'/>
|
<item jid='stpeter@jabber.org' name='Peter Saint-Andre'/>
|
||||||
<nick xmlns='http://jabber.org/protocol/nick'>psa</nick>
|
<nick xmlns='http://jabber.org/protocol/nick'>psa</nick>
|
||||||
<print xmlns='http://jabber.org/protocol/fingerprint' hashtype='sha1' keytype='x509'>
|
<pubkeys xmlns='http://www.xmpp.org/extensions/xep-0189.html#ns'>
|
||||||
C3 88 33 27 F3 47 3B 8B 07 71 3E 96 44 A7 EE E2 E0 50 4A 5B
|
<KeyInfo xmlns='http://www.w3.org/2000/09/xmldsig#'>
|
||||||
</print>
|
<KeyName>stpeterRSAkey1</KeyName>
|
||||||
|
...
|
||||||
|
</KeyInfo>
|
||||||
|
<KeyInfo xmlns='http://www.w3.org/2000/09/xmldsig#'>
|
||||||
|
<KeyName>stpeterX509cert1</KeyName>
|
||||||
|
...
|
||||||
|
</KeyInfo>
|
||||||
|
</pubkeys>
|
||||||
</item>
|
</item>
|
||||||
</x>
|
</x>
|
||||||
</message>
|
</message>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>The third person MUST NOT simply copy the fingerprint as communicated by the contact but instead MUST validate the fingerprint against the public key or certificate of the contact.</p>
|
<p>The third person MUST NOT simply copy the key as communicated by the contact but instead MUST validate it against the public key of the contact.</p>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Subscription Requests' anchor='rec-subscriptions'>
|
<section2 topic='Subscription Requests' anchor='rec-subscriptions'>
|
||||||
<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 or certificate). However, at present a subscription request contains only the JID of the sender:</p>
|
<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>
|
||||||
<example caption='A Basic Subscription Request'><![CDATA[
|
<example caption='A Basic Subscription Request'><![CDATA[
|
||||||
<presence from='stpeter@jabber.org to='MaineBoy@jabber.org' type='subscribe'/>
|
<presence from='stpeter@jabber.org to='MaineBoy@jabber.org' type='subscribe'/>
|
||||||
]]></example>
|
]]></example>
|
||||||
<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. 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 fingerprint of the sender's certificate or key.</p>
|
<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. 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>
|
||||||
<example caption='Subscription Request With Nickname and Fingerprint'><![CDATA[
|
<example caption='Subscription Request With Nickname and Key'><![CDATA[
|
||||||
<presence from='stpeter@jabber.org to='MaineBoy@jabber.org' type='subscribe'>
|
<presence from='stpeter@jabber.org to='MaineBoy@jabber.org' type='subscribe'>
|
||||||
<nick xmlns='http://jabber.org/protocol/nick'>psa</nick>
|
<nick xmlns='http://jabber.org/protocol/nick'>psa</nick>
|
||||||
<print xmlns='http://jabber.org/protocol/fingerprint' hashtype='sha1' keytype='x509'>
|
<pubkeys xmlns='http://www.xmpp.org/extensions/xep-0189.html#ns'>
|
||||||
C3 88 33 27 F3 47 3B 8B 07 71 3E 96 44 A7 EE E2 E0 50 4A 5B
|
<KeyInfo xmlns='http://www.w3.org/2000/09/xmldsig#'>
|
||||||
</print>
|
<KeyName>stpeterRSAkey1</KeyName>
|
||||||
|
...
|
||||||
|
</KeyInfo>
|
||||||
|
<KeyInfo xmlns='http://www.w3.org/2000/09/xmldsig#'>
|
||||||
|
<KeyName>stpeterX509cert1</KeyName>
|
||||||
|
...
|
||||||
|
</KeyInfo>
|
||||||
|
</pubkeys>
|
||||||
</presence>
|
</presence>
|
||||||
]]></example>
|
]]></example>
|
||||||
<p>If one or more referrals have been received, the user or client MUST check the fingerprint provided in the subscription request against the fingerprint provided in the referral or referrals.</p>
|
<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>
|
||||||
</section2>
|
</section2>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Security Considerations' anchor='security'>
|
<section1 topic='Security Considerations' anchor='security'>
|
||||||
<p>In order for a user-assigned alias to strengthen the security of the petname system, it MUST NOT be shared with anyone other than the user who assigned it. The user SHOULD NOT assign as an alias the alleded name received in a referral.</p>
|
<p>In order for a user-assigned handle to strengthen the security of the petname system, it MUST NOT be shared with anyone other than the user who assigned it. The user SHOULD NOT assign as a handle the alleded name received in a referral.</p>
|
||||||
<p>A user SHOULD NOT place more trust a referral than he or she places in the person who sends it.</p>
|
<p>A user SHOULD NOT place more trust a referral than he or she places in the person who sends it.</p>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='IANA Considerations' anchor='iana'>
|
<section1 topic='IANA Considerations' anchor='iana'>
|
||||||
|
Loading…
Reference in New Issue
Block a user