Dr. Georg Lukas, rt-solutions.de, 2017-02-09
An incorrect implementation of XEP-0280: Message Carbons in multiple XMPP clients allows a remote attacker to impersonate any user, including contacts, in the vulnerable application’s display. This allows for various kinds of social engineering attacks.
The XMPP protocol extension XEP-0280: Message Carbons allows a user to run multiple clients on their XMPP account by sending “carbon copies” of outgoing and incoming messages to the user’s other devices (besides the one that directly sent or received the original message).
This feature must be supported by the user’s server and must be explicitly enabled by the client. Carbon copies are always generated by the user’s server and originate from the user’s bare JID (their account address).
For example, the following is message “Hi!”, sent by Alice (
firstname.lastname@example.org) to Bob’s client 1 (
<message from="email@example.com" to="firstname.lastname@example.org/client1"> <body>Hi!</body> </message>
Bob is also logged in with carbons-enabled client 2, which receives the following carbon-copy of the message:
<message from="email@example.com" to="firstname.lastname@example.org/client2"> <received xmlns='urn:xmpp:carbons:2'><forwarded xmlns='urn:xmpp:forward:0'> <message from="email@example.com" to="firstname.lastname@example.org/client1"> <body>Hi!</body> </message> </forwarded></received> </message>
Now, client 2 can extract the original message from the carbon copy and display it accordingly. The “Security Considerations” section of XEP-0280 explicitly states that:
Any forwarded copies received by a Carbons-enabled client MUST be from that user’s bare JID; any copies that do not meet this requirement MUST be ignored.
The Carbons implementation in the affected clients was lacking this test. It simply checked all incoming messages for presence of a Carbon element (
<sent/>), extracted and parsed it like a regular message.
Therefore, it was possible for Mallory to send the following specially crafted message to Bob:
<message from="email@example.com" to="firstname.lastname@example.org"> <received xmlns='urn:xmpp:carbons:2'><forwarded xmlns='urn:xmpp:forward:0'> <message from="email@example.com" to="firstname.lastname@example.org/client1"> <body>Please come to Creepy Valley tonight, alone!</body> </message> </forwarded></received> </message>
This would appear as an authentic message from Alice, including Alice’ proper screen name, allowing Mallory to perform social engineering attacks on Bob.
While the attacker can send messages in the name of somebody else, they can not see your responses. Therefore, if you receive a phony message while using an affected client, reinsure with the message sender by either challenging them with a question that can not be guessed by the attacker, or by using out-of-band means.
Xabber: disable the experimental Carbons feature in the app settings.
yaxim: Disabling Message Carbons under “Settings” / “Edit account” / “Message Carbons (XEP-0280)” will not solve the problem, as the malicious messages still will be interpreted.
Our advisory services help you to improve the security and efficiency of your IT and to control your IT risks.
We develop sustainable, practical and precisely fitting solutions for complex challenges.
We are at any time available for you.
Phone: +49 221 93724 0
Office: Oberländer Ufer 190a, D-50968 Cologne
Webseitenbetreiber müssen, um Ihre Webseiten DSGVO konform zu publizieren, ihre Besucher auf die Verwendung von Cookies hinweisen und darüber informieren, dass bei weiterem Besuch der Webseite von der Einwilligung des Nutzers in die Verwendung von Cookies ausgegangen wird.
Der eingeblendete Hinweis Banner dient dieser Informationspflicht.
Sie können das Setzen von Cookies in Ihren Browser Einstellungen allgemein oder für bestimmte Webseiten verhindern. Eine Anleitung zum Blockieren von Cookies finden Sie hier.