| Abstract: | This document defines an XMPP protocol extension that enables XMPP entities to interact with spim filters by marking unsolicited or suspicious XMPP stanzas. |
| Author: | Evgeniy Khramtsov |
| Copyright: | © 1999 - 2011 XMPP Standards Foundation. SEE LEGAL NOTICES. |
| Status: | Deferred |
| Type: | Standards Track |
| Version: | 0.1 |
| Last Updated: | 2010-10-04 |
WARNING: Consideration of this document has been Deferred by the XMPP Standards Foundation. Implementation of the protocol described herein is not recommended.
1. Introduction
2. Requirements
3. Glossary
4. Use Cases
4.1. Spim Marker
4.2. Spim Report
5. Business Rules
6. Determining Support
7. Security Considerations
7.1. CAPTCHA challenges
7.2. Fake <mark/> element
7.3. Fake <report/> element
7.4. Multiple fake <report/> elements
7.4.1. Single filtering entity
7.4.2. Several filtering entities
7.5. Fake IQ-set report
8. IANA Considerations
9. XMPP Registrar Considerations
9.1. Protocol Namespaces
10. XML Schema
10.1. urn:xmpp:spim-marker:0
10.2. urn:xmpp:spim-report:0
11. Acknowledgements
Appendices
A: Document Information
B: Author Information
C: Legal Notices
D: Relation to XMPP
E: Discussion Venue
F: Requirements Conformance
G: Notes
H: Revision History
There are various spim protection methods exist in XMPP: Privacy Lists [1], CAPTCHA Forms [2], Simple Communications Blocking [3], Incident Reporting [4] and Entity Reputation [5]. But they may not be sufficient enough:
An implementation compliant with this document MUST support spim markers as described in Spim Marker use case. Support for spim reports, as described in Spim Report use case, is RECOMMENDED.
The following terms are used throughout this document:
The filtering entity marks abusive stanza by adding <mark/> child element qualified by the 'urn:xmpp:spim-marker:0' namespace. The element MUST possess the 'filter' attribute whose value MUST be a full jid of the filtering entity. The <mark/> element MAY contain character data which SHOULD be a human-readable description of the reason to mark. The filtering entity MUST NOT add more than one <mark/> element and MUST delete all other <mark/> elements matching itself before adding a new one. The filtering entity MAY remove any <mark/> elements matching itself even if it doesn't add a new one.
Example 1. User's Server Marked Abusive Message
<message from='robot@abuser.com/zombie'
to='innocent@victim.com/laptop'
id='spam1'>
<body>Love pills - 75% OFF</body>
<mark xmlns='urn:xmpp:spim-marker:0'
filter='victim.com'/>
Unsolicited advertising
</mark>
</message>
Example 2. Several Services Marked Abusive Message
<message from='robot@abuser.com/zombie'
to='innocent@victim.com/laptop'
id='spam1'>
<subject>You won $1,000,000!</subject>
<body>Visit http://www.abuser.com/</body>
<mark xmlns='urn:xmpp:spim-marker:0'
filter='dnsbl-filter.victim.com'>
Blocked by too many DNSBLs
</mark>
<mark xmlns='urn:xmpp:spim-marker:0'
filter='bayes-filter.victim.com'/>
</message>
Processing rules of marked stanzas taken by the receiving entity are beyond the scope of this document. One possible solution is to put such stanzas silently in so-called "SPAM" folder.
If the filtering entity wishes to receive abuse report for the stanza, it MUST add <report/> child element qualified by the 'urn:xmpp:spim-report:0' namespace and MUST possess the 'key' and the 'filter' attributes. A value of the 'key' attribute is arbitrary, but SHOULD have at least 128 bits of randomness. The 'key' attribute is needed to match the corresponding complaint (if any) with the sender. The value of the 'filter' attribute MUST be a full jid of the filtering entity. The filtering entity MUST NOT add more than one <report/> element and MUST delete all other <report/> elements matching itself before adding a new one. The filtering entity MAY remove any <report/> elements matching itself even if it doesn't add a new one.
Example 3. Multiple Filters Wishes to Receive Abuse Report
<presence type='subscribe'
from='robot@abuser.com'
to='innocent@victim.com'
id='spam2'>
<report xmlns='urn:xmpp:spim-report:0'
key='571c9641d8442920'
filter='filter.victim.com'/>
<report xmlns='urn:xmpp:spim-report:0'
key='b258acbcb4bb8e66ac'
filter='victim.com'/>
</presence>
The receiving entity MAY complain by sending an IQ-set containing the <query/> child element qualified by the 'urn:xmpp:spim-report:0' namespace. A value of the 'filter' attribute MUST be copied in the 'to' attribute of the IQ-set stanza. The element MUST possess 'key' attribute copied from the original stanza.
The receiving entity MUST ignore any <report/> elements generated by untrusted filtering entities. If there are more than one <report/> element matching the same filtering entity, all of them MUST be ignored.
Example 4. Receiver Sends Complaint
<iq type='set'
from='innocent@victim.com/laptop'
to='filter.victim.com'
id='complaint1'>
<query xmlns='urn:xmpp:spim-report:0'
key='571c9641d8442920'/>
</iq>
<iq type='set'
from='innocent@victim.com/laptop'
to='victim.com'
id='complaint2'>
<query xmlns='urn:xmpp:spim-report:0'
key='b258acbcb4bb8e66ac'/>
</iq>
The filtering entity MUST respond with an empty IQ-result stanza upon successful completion of the request:
Example 5. Complaint Was Accepted
<iq type='result'
from='filter.victim.com'
to='innocent@victim.com/laptop'
id='complaint1'/>
<iq type='result'
from='victim.com'
to='innocent@victim.com/laptop'
id='complaint2'/>
A filtering entity SHOULD only add <mark/> or <report/> elements and a receiving entity SHOULD only process those elements if the corresponding stanza envolves an interaction with a human user: subscription requests, messages, conference invites, voice calls, etc. For example, it doesn't make a lot of sense to mark Software Information [13] stanzas.
To avoid obvious false positives and user confusions, a filtering entity SHOULD NOT add <mark/> or <report/> elements to a stanza and a receiving entity SHOULD ignore <mark/> and <report/> elements of a stanza if:
If an entity supports the spim markers, it MUST report that by including a service discovery feature of "urn:xmpp:spim-marker:0" in response to a Service Discovery [14] information request. If an entity supports the spim reports, it MUST report that by including a service discovery feature of "urn:xmpp:spim-report:0" in response to a Service Discovery [15] information request:
Example 6. Service Discovery Information Request
<iq type='get'
from='juliet@capulet.lit/balcony'
to='capulet.lit'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
Example 7. Service Discovery Information Response
<iq type='result'
from='capulet.lit'
to='juliet@capulet.lit/balcony'
id='disco1'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='urn:xmpp:spim-marker:0'/>
<feature var='urn:xmpp:spim-report:0'/>
...
</query>
</iq>
Care should be taken if a receiving entity chooses to generate a CAPTCHA challenge (CAPTCHA Forms [16]) in response to a marked stanza. A spim recognition system rarely has more than 5-10% of false positives. Thus, producing CAPTCHA images or audio/video samples is likely a waste of system resources and also may overload the receiving entity at high rate of spim stanzas.
A rogue server may add fake <mark/> elements to compromise filtering entities: a user may decide to remove such entities from the trusted list because, for example, he or she thinks they produce too many false positives. To avoid such situation, a filtering entity MUST remove any <mark/> elements matching itself before adding new <mark/> element as described in Spim Marker use case. Also, a filtering entity MAY remove any <mark/> elements matching itself even if it doesn't add a new one.
An attacker may add fake <report/> element. For example, it may do that for checking an activity of the user. To avoid such situation, a receiving entity MUST send spim reports to the trusted filtering entities only as desribed in Spim Report use case.
An attacker may add thousands of fake <report/> elements matching the single trusted filtering entity in one stanza. A poorly written receiving entity may generate a complaint for all of them. As an effect, a distributed DoS attack on the filtering entity is performed if there are multiple receiving entities envolved. To avoid such situation, a receiving entity MUST ignore multiple <report/> elements matching the same filtering entity as desribed in Spim Report use case.
In its turn, a filtering entity MUST remove any <report/> elements matching itself before adding new <report/> element as described in Spim Report use case. Thus, it is guaranteed that the element will not be ignored by the receiving entity.
An attacker may gain an information about user's trusted filtering entities. In this case he or she may add the <report/> element per every such entity in one stanza. If there are too many filtering entities in the list, a user may generate enormous traffic when generating spim reports. Although this attack is not very effective, a client software MUST not generate spim reports without user's acknowledgement.
An attacker may try to mark an innocent user as a spimmer by producing several IQ-set stanzas qualified by "urn:xmpp:spim-report:0" containing different value of the 'key' attribute each (so-called "dictionary attack"). As a protection, sanity checks MUST be performed when processing such reports. For example, if a filtering entity doesn't store any information about a receiving entity, the value of the 'key' attribute SHOULD have at least 128 bits of randomness.
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [17].
This specification defines the following XML namespaces:
Upon advancement of this specification from a status of Experimental to a status of Draft, the XMPP Registrar [18] shall add the foregoing namespace to the registry located at <http://xmpp.org/registrar/namespaces.html>, as described in Section 4 of XMPP Registrar Function [19].
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:spim-marker:0'
xmlns='urn:xmpp:spim-marker:0'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-xxxx: http://www.xmpp.org/extensions/xep-xxxx.html
</xs:documentation>
</xs:annotation>
<xs:element name='mark'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute
name='filter'
type='xs:string'
use='required'/>
<xs:attribute
name='reason'
type='xs:string'
use='optional'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:spim-report:0'
xmlns='urn:xmpp:spim-report:0'
elementFormDefault='qualified'>
<xs:annotation>
<xs:documentation>
The protocol documented by this schema is defined in
XEP-xxxx: http://www.xmpp.org/extensions/xep-xxxx.html
</xs:documentation>
</xs:annotation>
<xs:element name='query'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute
name='key'
type='xs:string'
use='required'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name='report'>
<xs:complexType>
<xs:simpleContent>
<xs:extension base='xs:string'>
<xs:attribute
name='filter'
type='xs:string'
use='required'/>
<xs:attribute
name='key'
type='xs:string'
use='required'/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:schema>
Thanks to Sergei Golovan for the feedback.
Series: XEP
Number: 0287
Publisher: XMPP Standards Foundation
Status:
Deferred
Type:
Standards Track
Version: 0.1
Last Updated: 2010-10-04
Approving Body: XMPP Council
Dependencies: XMPP Core, XEP-0001, XEP-0030
Supersedes: None
Superseded By: None
Short Name: NOT_YET_ASSIGNED
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
ekhramtsov@process-one.net
JabberID:
xram@jabber.ru
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 3920) and XMPP IM (RFC 3921) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <standards@xmpp.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <editor@xmpp.org>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
1. XEP-0016: Privacy Lists <http://xmpp.org/extensions/xep-0016.html>.
2. XEP-0158: CAPTCHA Forms <http://xmpp.org/extensions/xep-0158.html>.
3. XEP-0191: Simple Communications Blocking <http://xmpp.org/extensions/xep-0191.html>.
4. XEP-0268: Incident Reporting <http://xmpp.org/extensions/xep-0268.html>.
5. XEP-0275: Entity Reputation <http://xmpp.org/extensions/xep-0275.html>.
6. XEP-0016: Privacy Lists <http://xmpp.org/extensions/xep-0016.html>.
7. XEP-0191: Simple Communications Blocking <http://xmpp.org/extensions/xep-0191.html>.
8. XEP-0158: CAPTCHA Forms <http://xmpp.org/extensions/xep-0158.html>.
9. XEP-0268: Incident Reporting <http://xmpp.org/extensions/xep-0268.html>.
10. XEP-0275: Entity Reputation <http://xmpp.org/extensions/xep-0275.html>.
11. XEP-0159: SPIM-Blocking Control <http://xmpp.org/extensions/xep-0159.html>.
12. XEP-0045: Multi-User Chat <http://xmpp.org/extensions/xep-0045.html>.
13. XEP-0232: Software Information <http://xmpp.org/extensions/xep-0232.html>.
14. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
15. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
16. XEP-0158: CAPTCHA Forms <http://xmpp.org/extensions/xep-0158.html>.
17. The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see <http://www.iana.org/>.
18. The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see <http://xmpp.org/registrar/>.
19. XEP-0053: XMPP Registrar Function <http://xmpp.org/extensions/xep-0053.html>.
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/
Initial published version.
(psa)Initial version.
(evk)END