| Abstract: | This document specifies an XMPP protocol extension for reporting abusive XMPP stanzas. NOTE: This specification has been superseded by XEP-0268. |
| Author: | Peter Saint-Andre |
| Copyright: | © 1999 - 2013 XMPP Standards Foundation. SEE LEGAL NOTICES. |
| Status: | Deferred |
| Type: | Standards Track |
| Version: | 0.4 |
| Last Updated: | 2007-05-06 |
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. Reporting Abuse
3. Reporting an Abuser
4. Reporting a Rogue Server
5. Stanza Error
6. Stream Error
7. Discovering Support
8. Security Considerations
8.1. False Reports
8.2. Rogue Servers
8.3. Denial of Service Attacks
8.4. Man in the Middle Attacks
9. IANA Considerations
10. XMPP Registrar Considerations
10.1. Protocol Namespaces
10.2. Application-Specific Errors
11. XML Schema
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
NOTE: This specification has been superseded by Incident Reporting [1].
Unfortunately, not all XMPP entities are well-behaved -- they may send spam of various kinds, harrass chat rooms, generate large amounts of traffic, etc. Currently, if an XMPP entity (the "attacker") sends abusive stanzas to another XMPP entity (the "victim"), there is no way for the victim or the victim's server to inform the attacker's server that the attacker is generating abusive traffic. In current practice, the victim's server may have no choice but to terminate the server-to-server connection rather than continue to accept the abusive traffic.
This situation is far from desirable. Therefore, this specification defines several protocol functions that can help to discourage abuse on the XMPP network:
An abuse report shall be sent in an IQ stanza of type "set" containing an <abuse/> element qualified by the 'urn:xmpp:tmp:abuse' namespace (see Protocol Namespaces regarding issuance of one or more permanent namespaces).
<iq from='example.org'
id='rep1'
to='example.com'
type='set'>
<abuse xmlns='urn:xmpp:tmp:abuse'>
<condition>
<muc/>
</condition>
<description xml:lang='en'>This is a test.</description>
<jid>abuser@example.com/foo</jid>
<pointer>http://pastebin.ca/1006003</pointer>
<stanzas>
</stanzas>
</abuse>
</iq>
The children of the <abuse/> element are as follows:
This specification intentionally does not define exactly what constitutes abuse, since "abuse is in the eye of the beholder". However, the following machine-readable conditions are defined as children of the <reason/> element.
| Condition | Definition |
|---|---|
| <gateway/> | Attempting to inappropriately use a gateway on the receiving server (see Gateway Interaction [2]) |
| <muc/> | Attempting to take over or otherwise abuse Multi-User Chat [3] rooms on the receiving server |
| <proxy/> | Attempting to inappropriately use a SOCKS5 Bytestreams [4] proxy, TURN server, or other proxy on the receiving server |
| <pubsub/> | Attempting to inappropriately use a Publish-Subscribe [5] service on the receiving server |
| <service/> | Attempting to inappropriately use any other kind of service on the receiving server |
| <spam/> | Sending spam (unsolicited bulk messages) |
| <stanza-too-big/> | Sending extremely large stanzas |
| <too-many-recipients/> | Sending messages that contain too many recipients (see Extended Stanza Addressing [6]) |
| <too-many-stanzas/> | Sending an extremely large number of stanzas |
| <unacceptable-payload/> | Sending messages that contain unacceptable payloads such as malicious executables |
| <unacceptable-text/> | Sending messages that contain unacceptable human-readable text |
| <undefined-abuse/> | The abuse condition is undefined (should be used with an application-specific condition) |
Note: The foregoing list of conditions is not exhaustive. The list may be augmented or otherwise modified in a future version of this specification as a result of implementation and deployment experience.
An abuse report can be generated by the victim or the victim's server. If the report is generated by the victim's server, the report MUST be sent to the attacker's server. If the report is generated by the victim, the report MUST be sent to the attacker's server and SHOULD also be sent to the victim's server as well (since the victim may not know if the attacker's server is a rogue server).
The following rules and guidelines apply to the act of reporting abuse.
The recipient SHOULD NOT report the abuse stanza to a server or service until it determines that the server or service supports the Abuse Reporting protocol (see the Discovering Support section of this document).
The recipient SHOULD report the abuse to the suspected abuser's server.
If the recipient's home server (i.e., the server with which it has a registered account or other trust relationship) supports the abuse Reporting protocol, the recipient SHOULD also report the offending stanza to its own server.
If the recipient's home server does not support the Abuse Reporting protocol, the recipient SHOULD report the abuse stanza to one or more dedicated abuse reporting services if available.
The recipient SHOULD NOT report the abuse stanza to the suspected abuser.
Example 2. Unsuspecting User Receives Abuse from Evil Bot
<presence from='abuser@example.com'
to='victim@example.org'
type='subscribe'>
<status>
You too can be rich! Find out how at
http://clickhere.info/makemoney
Let's chat to make your dreams
come true!
</status>
</presence>
Example 3. Unsuspecting User Reports Abuse
<iq from='unsuspectinguser@example.org/foo'
to='example.net'
type='set'
id='report1'>
<spim xmlns='urn:xmpp:tmp:abuse'>
<presence from='abuser@example.com'
to='victim@example.net'
type='subscribe'
xmlns='jabber:client'>
<status>
You too can be rich! Find out how at
http://clickhere.info/makemoney
Let's chat to make your dreams
come true!
</status>
</presence>
</spim>
</iq>
Upon receiving the abuse report, the attacker's server MUST proceed as follows.
If the sending server does not understand the abuse reporting protocol, it MUST return a <service-unavailable/> error.
Example 4. Abuse reporting not supported
<iq from='example.com'
id='rep1'
to='example.org'
type='error'>
<error type='cancel'>
<service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
If the JID contained in the abuse report does not exist at the attacker's server, it MUST return an <item-not-found/> error.
<iq from='example.com'
id='rep1'
to='example.org'
type='error'>
<error type='cancel'>
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
</iq>
Otherwise, if the sending server accepts the abuse report, it MUST return an IQ stanza of type "result".
Example 6. Abuse report accepted
<iq from='example.com'
id='rep1'
to='example.org'
type='result'/>
This specification does not define how a sending server shall behave when it receives an abuse report. In general it is expected that the sending server (1) will notify the human administrators of the server in some implementation-specific or deployment-specific fashion, and (2) may employ the abuse report in an automated fashion (e.g., as input to a rate-limiting algorithm, reputation system, or decision about temporarily suspending the privileges of the sending entity based on JabberID or IP address).
The following rules and guidelines apply to the processing of an abuse report:
Not all abuse reports are valid, and not all JIDs that send stanzas reported as abuse are abusers. Care must be taken in correctly determining if a suspected abuser is an actual abuser. The following rules apply:
The processor SHOULD NOT add a suspected abuser to its list of known abusers until it has received at least three (3) valid abuse reports with regard to that suspected abuser, or until it has independently verified the veracity of the report.
If the processor determines that the suspected abuser is an actual abuser, the processor:
If the attacker's server determines that the suspected attacker is an actual attacker, it might decide that both the JabberID and the IP address associated with the attacker's JabberID are compromised. If it does so, it SHOULD report its conclusions to appropriate other entities (e.g., trusted peer servers or dedicated abuse reporting services). The protocol is quite simple: include the JabberID and IP address as children of an <abuser/> element qualified by the 'urn:xmpp:tmp:abuse' namespace and send an IQ stanza of type "set" to the entity that shall receive the report. This protocol SHOULD NOT be used directly by victims of abusive stanzas and if an entity receives such a report from an end user it SHOULD ignore it. The following is an example:
Example 7. Entity Reports Abuser
<iq from='example.net'
to='abuse.xmpp.net'
type='set'
id='abuser1'>
<abuser xmlns='urn:xmpp:tmp:abuse'>
<jid>abuser@example.net</jid>
<ip>204.8.219.178</ip>
</abuser>
</iq>
If the victim's server determines that the attacker's server is a bad actor on the network (i.e., a rogue server), it SHOULD report its conclusions to appropriate other entities (e.g., trusted peer servers or dedicated abuse reporting services). This is done by including the domain name (and optionally IP address) of the rogue server in a <rogue/> element qualified by the 'urn:xmpp:tmp:abuse' namespace and send an IQ stanza of type "set" to the entity that shall receive the report. This protocol SHOULD NOT be used directly by victims of abusive stanzas and if an entity receives such a report from an end user it SHOULD ignore it. The following is an example:
Example 8. Entity Reports Rogue Server
<iq from='example.net'
to='abuse.xmpp.net'
type='set'
id='rogue'>
<rogue xmlns='urn:xmpp:tmp:abuse'>
<jid>rogueserver.example.org</jid>
<ip>204.8.219.178</ip>
</rogue>
</iq>
The receiving server MAY report that a particular stanza is considered abusive. The stanza error condition MUST be <not-acceptable/> and the error stanza MUST include an application-specific error condition of <abuse/> qualified by the 'urn:xmpp:tmp:abuse' (see Protocol Namespaces regarding issuance of one or more permanent namespaces). The <abuse/> element MUST include one or more <jid/> elements whose XML character data specifies the JID(s) of the abusive sender(s).
<message from='abuser@example.org/foo'
to='victim@example.org'>
[ ... some abusive payload here ... ]
</message>
<message from='example.com'
to='example.org'>
<error type='cancel'>
<not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error>
<abuse xmlns='urn:xmpp:tmp:abuse'>
<condition>
<unacceptable-payload/>
</condition>
<jid>abuser@example.com/foo</jid>
</abuse>
</message>
If the sending entity continues to generate abusive stanzas via the sending server, the receiving server MAY close the stream between the receiving server and the sending server. The stream error condition MUST be <policy-violation/> and the stream error MUST include an application-specific error condition of <abuse/> qualified by the 'urn:xmpp:tmp:abuse'. The <abuse/> element MUST include one or more <jid/> elements whose XML character data specifies the JID(s) of the abusive sender(s).
<stream:error>
<policy-violation xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
<abuse xmlns='urn:xmpp:tmp:abuse'>
<condition>
<too-many-stanzas/>
</condition>
<jid>abuser@example.com/foo</jid>
</abuse>
</stream:error>
</stream:stream>
The receiving entity then SHOULD terminate the TCP connection between the receiving server and the sending server.
If a server supports the abuse reporting protocol, it MUST report that fact by including a service discovery feature of "urn:xmpp:tmp:abuse" (see Protocol Namespaces regarding issuance of one or more permanent namespaces) in response to a Service Discovery [8] information request:
Example 12. Service Discovery information request
<iq from='example.org'
id='disco1'
to='example.com'
type='get'>
<query xmlns='http://jabber.org/protocol/disco#info'/>
</iq>
Example 13. Service Discovery information response
<iq from='example.com'
id='disco1'
to='example.org'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
...
<feature var='urn:xmpp:tmp:abuse'/>
...
</query>
</iq>
Not all reported abuse is actual abuse, and not all reported abusers are actual abusers. Processors must take care to ensure that processing of one or a few reports does not result in branding of a legitimate sender as an abuser, since otherwise the sender could effectively be the subject of a denial of service attack.
It is NOT RECOMMENDED for victims to send abuse reports to the server of a suspected abuser, since that server could be a rogue domain capable of sending abuse from any JID at that domain.
It is possible for an abusive sender to launch a denial of service attack against legitimate users of the sending server by generating abusive traffic over the server-to-server connection (in fact such attacks have already been observed on XMPP networks). Although use of the abuse reporting protocol does not completely prevent such attacks, it may at least enable sending servers to react to abusive traffic in close to real time, thus helping to "heal" the network when denial of service attacks are launched.
If a malicious entity can inject information into the server-to-server connection, it can falsely send abuse reports to the sending server. Therefore the connection SHOULD be encrypted using Transport Layer Security as specified in XMPP Core [9].
This document requires no interaction with the Internet Assigned Numbers Authority (IANA) [10].
Until this specification advances to a status of Draft, its associated namespace shall be "urn:xmpp:tmp:abuse"; upon advancement of this specification, the XMPP Registrar [11] shall issue a permanent namespace in accordance with the process defined in Section 4 of XMPP Registrar Function [12].
The XMPP Registrar shall add <abuse/> to its registry of application-specific error conditions (see <http://xmpp.org/registrar/errors.html>), where the element is qualified by the 'urn:xmpp:tmp:abuse' namespace (see Protocol Namespaces regarding issuance of one or more permanent namespaces).
The registry submission is as follows:
<condition>
<ns>urn:xmpp:tmp:abuse</ns>
<element>abuse</element>
<desc>the sending entity has generated traffic that the receiving server considers abusive</desc>
<doc>XEP-xxxx</doc>
</condition>
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='urn:xmpp:tmp:abuse'
xmlns='urn:xmpp:tmp:abuse'
elementFormDefault='qualified'>
<xs:import
namespace='jabber:client'
schemaLocation='http://www.xmpp.org/schemas/jabber-client.xsd'/>
<xs:element name='abuse'>
<xs:complexType>
<xs:sequence>
<xs:element ref='condition'/>
<xs:element ref='description'/>
<xs:element ref='jid'/>
<xs:element ref='pointer'/>
<xs:element ref='stanzas'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name='condition'>
<xs:complexType>
<xs:choice>
<xs:element name='gateway' type='empty'/>
<xs:element name='muc' type='empty'/>
<xs:element name='proxy' type='empty'/>
<xs:element name='pubsub' type='empty'/>
<xs:element name='service' type='empty'/>
<xs:element name='spam' type='empty'/>
<xs:element name='stanza-too-big' type='empty'/>
<xs:element name='too-many-recipients' type='empty'/>
<xs:element name='too-many-stanzas' type='empty'/>
<xs:element name='unacceptable-payload' type='empty'/>
<xs:element name='unacceptable-text' type='empty'/>
<xs:element name='undefined-abuse' type='empty'/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name='stanzas'>
<xs:complexType>
<xs:choice xmlns:xmpp='jabber:client'>
<xs:element ref='xmpp:iq'/>
<xs:element ref='xmpp:message'/>
<xs:element ref='xmpp:presence'/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:simpleType name='empty'>
<xs:restriction base='xs:string'>
<xs:enumeration value=''/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Series: XEP
Number: 0161
Publisher: XMPP Standards Foundation
Status:
Deferred
Type:
Standards Track
Version: 0.4
Last Updated: 2007-05-06
Approving Body: XMPP Council
Dependencies: XMPP Core, XMPP IM, XEP-0030
Supersedes: None
Superseded By: XEP-0268
Short Name: NOT_YET_ASSIGNED
Source Control:
HTML
This document in other formats:
XML
PDF
Email:
stpeter@jabber.org
JabberID:
stpeter@jabber.org
URI:
https://stpeter.im/
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) 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-0268: Incident Reporting <http://xmpp.org/extensions/xep-0268.html>.
2. XEP-0100: Gateway Interaction <http://xmpp.org/extensions/xep-0100.html>.
3. XEP-0045: Multi-User Chat <http://xmpp.org/extensions/xep-0045.html>.
4. XEP-0065: SOCKS5 Bytestreams <http://xmpp.org/extensions/xep-0065.html>.
5. XEP-0060: Publish-Subscribe <http://xmpp.org/extensions/xep-0060.html>.
6. XEP-0033: Extended Stanza Addressing <http://xmpp.org/extensions/xep-0033.html>.
7. XEP-0158: CAPTCHA Forms <http://xmpp.org/extensions/xep-0158.html>.
8. XEP-0030: Service Discovery <http://xmpp.org/extensions/xep-0030.html>.
9. RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core <http://tools.ietf.org/html/rfc6120>.
10. 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/>.
11. 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/>.
12. 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/
Generalized text and protocol to handle all kinds of abuse and folded in content from XEP-0236.
(psa)Specified that client recipient should not send a report to the server of a suspected abuser; modified XML namespace name to conform to XEP-0053 processes; corrected several examples.
(psa)Modified business rules; added security considerations; defined XML schema.
(psa)Initial version.
(psa)First draft.
(psa)END