Advisory information
Title: Telegram instant messenger IDN homograph attacks
Advisory reference: BLAZE-02-2019 (CVE-2019-10044)
Product: Telegram
Disclosure mode: Coordinated disclosure
Product Description
Telegram is a messaging app focused on speed and security; it’s super-fast, simple, and free. You can use Telegram on all your devices at the same time — your messages sync seamlessly across any number of your phones, tablets or computers.
With Telegram, you can send messages, photos, videos, and files of any type (doc, zip, mp3, etc), as well as create groups for up to 200,000 people or channels for broadcasting to unlimited audiences. You can write to your phone contacts and find people by their usernames. As a result, Telegram is like SMS and email combined — and can take care of all your personal or business messaging needs. In addition to this, we support end-to-end encrypted voice calls.
(from Telegram FAQ:
Vulnerability details
Telegram (tested on all mobile versions and Linux and Windows for desktop) is vulnerable to an IDN homograph attack when displaying messages containing URLs.
Homograph attack is a security vulnerability that can deceive users into thinking they are visiting a certain website when in fact they are directed to a different, but homograph, domain name. This type of vulnerability can be used to weaponize social engineering, increasing the chances for a successful attack.
Upon receiving a message with a link, Telegram renders it in a clickable format and the font used to display the message makes it impossible to distinguish between the legitimate URL and the malicious URL, for example:
Legitimate URL: https://blazeinfosec.com
Malicious URL: https://blаzeinfosec.com – with the ‘a’ as a Cyrillic character, not Latin
On top of that, Telegram renders a website preview, making it even more deceptive for a user.
Upon clicking on the malicious link, a user will be taken instead of the real one, despite the fact the link is displayed exactly as the expected website.
A sample attack scenario against a Telegram user:
- An activist or person of interest uses Telegram
- The person receives a URL in a Telegram message disguised as a legitimate one; Telegram renders a preview
- The user clicks on the link
- The malicious URL serves as a one-click browser exploit
- Target gets infected with mobile or desktop malware
Additionally, the mobile and desktop versions of the Tor Browser are vulnerable to the same class of attack. Therefore, users of Telegram with the Tor Browser are prone to full-blown phishing attacks.
Fix and recommendations
Blaze Information Security recommends Telegram to “defang” URLs with mixed scripts (e.g., Latin and Cyrillic in the same domain name) or URLs using scripts not installed or enabled in the device should be displayed in the message as un-clickable.
Alternatively, Telegram could implement the same strategy used by WhatsApp to mark the link as insecure, with a clear warning message to the user, when an IDN homograph domain name is encountered in the message.
The vulnerability seems to have been addressed by Telegram in its Windows version, 1.5.12. The status of the other platforms is unknown, as the vendor has not responded to multiple contact attempts.
Credits
This vulnerability was discovered and researched by Julio Cesar Fort from Blaze Information Security
Disclosure timeline
31/01/2019: Initial contact asking for the vendor’s PGP key
01/02/2019: Vendor responded with PGP key, asking for details of the vulnerability to be sent via encrypted e-mail
01/02/2019: Vulnerability details sent via encrypted e-mail
Unknown: A fix was released at least for Telegram Desktop for Windows, version 1.5.12. The vendor has never contacted Blaze to inform them about the fix.
25/03/2019: Advisory released
References
Telegram:
IDN homograph attack:
The Homograph Attack:
About Blaze Information Security
Blaze Information Security is a privately held, independent information security firm born from years of combined experience. With a presence in South America and Europe, Blaze has a team of senior analysts with experience in leading information security consulting companies worldwide and a proven track record of published security research.
E-Mail: [email protected]
Wildfire Labs blog:
Twitter:
Github:
PGP key fingerprint: DB53 D9D9 F0E1 E513 4F52 8219 C33B C7FA C5D0 E926