𝗖𝗮𝗻 Telegram 𝗯𝗲 𝗛𝗮𝗰𝗸𝗲𝗱?

Inderjeet Singh
8 min readAug 26, 2024

--

In the digital age, where privacy and security are paramount, messaging platforms like Telegram have become battlegrounds for both user trust and cyber threats. Telegram, known for its robust feature set including cloud-based storage and a custom encryption protocol named MTProto, positions itself as a secure communication tool. However, this proprietary approach to security has sparked considerable debate among cryptographers and security experts. While Telegram boasts of offering strong encryption and user privacy, its unique method of handling encryption, particularly the decision to not employ end-to-end encryption (E2EE) by default for all communications, has led to a series of technical vulnerabilities and security concerns.

In this article we deep dive into the intricate details of Telegram’s security architecture, exploring the known vulnerabilities, the platform’s response to security challenges, and provides insights into how users can safeguard their communications within this ecosystem.

🔴Yes, Telegram can be hacked, though it’s not inherently more vulnerable than other messaging platforms. Here’s a breakdown based on the latest information:

  • Vulnerabilities. While Telegram boasts strong security features, like end-to-end encryption for Secret Chats, it’s not immune to hacking. Vulnerabilities can arise from various sources. Malicious Links. Users might inadvertently download malware by clicking on malicious links sent through Telegram, which could lead to account compromise. Phishing and Social Engineering. Hackers can trick users into revealing their credentials or verification codes. SIM Swapping. If someone gains control over your phone number through methods like SIM swapping, they could potentially access your Telegram account. Device Access. Physical access to your device or unauthorized access to your active sessions on other devices can lead to account breaches.
  • Security Features. Telegram does offer several security measures: Two-Factor Authentication (2FA). This adds an extra layer of security, making it harder for attackers to access your account even if they have your phone number. Active Sessions Management. Users can check and terminate sessions from unknown devices, which helps in securing the account if accessed from an unauthorized device. Privacy Settings. Adjusting privacy settings can limit who can add you to groups or view your profile, reducing exposure to spam or unwanted interactions.
  • Real-World Incidents. There have been instances where Telegram’s security was tested. A notable incident involved hackers linking phone numbers to Telegram accounts, but this didn’t grant access to message content due to encryption. However, it showed that metadata (like phone numbers) could be at risk. More recently, there was mention of a wallet built into Telegram being hacked, leading to spam messages, though the issue was reportedly resolved.

đź”´Encryption and Security Protocols

MTProto — A Custom Approach to Encryption

  • Encryption Mechanics. Telegram’s proprietary protocol, MTProto, integrates several well-established cryptographic techniques. 256-bit AES Encryption. For data transmission, MTProto uses the Advanced Encryption Standard (AES) with a 256-bit key. This symmetric encryption algorithm is known for its robustness and efficiency, making it suitable for securing large volumes of data in transit. 2048-bit RSA for Key Exchange. RSA (Rivest–Shamir–Adleman) is used for the initial key exchange, providing a secure method for establishing a shared secret over an insecure channel. The 2048-bit key size is considered secure against current computational power for key exchange purposes. Diffie-Hellman Key Exchange. This protocol allows two parties to establish a shared secret key over an insecure channel, which is then used for subsequent encryption of messages.
  • Criticism and Concerns. Lack of Peer Review. One of the primary criticisms of MTProto is its lack of open, academic peer review. Cryptographic systems benefit immensely from scrutiny by the global cryptographic community, which can identify potential weaknesses or suggest improvements. The proprietary nature of MTProto means these benefits are largely forgone. Custom Implementation Risks. While the components used are well-understood, custom implementations can introduce vulnerabilities if not perfectly executed. Without external validation, there’s always a risk of implementation errors that could compromise security.

đź”´End-to-End Encryption (E2EE) in Telegram

  • Implementation in Telegram. Secret Chats. Telegram offers E2EE for what it calls “Secret Chats.” Here, messages are encrypted on the sender’s device and can only be decrypted by the recipient’s device. This ensures that even Telegram cannot access the content of these messages. Regular Chats. For regular chats, encryption is applied during transmission but not at rest. This means messages are encrypted while traveling between devices but are stored on Telegram’s servers in an encrypted form that Telegram can decrypt if needed. This design choice allows for features like cloud synchronization but at the cost of potential server-side vulnerabilities.
  • Security Implications. Server Security. The lack of E2EE for regular chats means that if Telegram’s servers are compromised, the data stored there could potentially be accessed. This is a significant concern given the history of cyberattacks targeting major platforms. User Trust. While Secret Chats provide a high level of security, the default behaviour of regular chats might not meet the expectations of users who assume all communications are equally protected. This discrepancy can lead to misunderstandings about the level of privacy offered by Telegram.

đź”´Comparison with Fully E2EE Platforms like Signal

· Default Security: Signal applies E2EE to all communications by default, ensuring that only the communicating parties can read the messages. This approach aligns more closely with contemporary expectations of privacy in digital communication.

· User Experience vs. Privacy: While Telegram’s model allows for features like cloud sync, Signal’s approach might be seen as more secure but at the cost of some user convenience features. However, Signal has been working on implementing features like disappearing messages and backups with user-controlled encryption keys, aiming to bridge this gap.

Telegram’s approach to encryption and security through MTProto and its selective application of E2EE reflects a balance between user convenience, feature richness, and privacy. While it offers robust tools for those who seek them out (like Secret Chats), the default behaviour might not satisfy users who prioritize privacy above all else. The ongoing debate around Telegram’s security protocols underscores the importance of transparency and peer review in cryptographic systems, highlighting the trade-offs between user experience and absolute privacy in digital communication.

đź”´ Identified Vulnerabilities in Telegram

  • Heap and Stack Buffer Overflows. Multiple versions of Telegram for Android, iOS, and macOS were found to have buffer overflow vulnerabilities, particularly in handling animated stickers. These could allow attackers to execute arbitrary code or crash the application, potentially accessing user data.
  • Type Confusion and Integer Overflow. These vulnerabilities, also discovered in the handling of animated content, could lead to memory corruption, allowing attackers to manipulate data or execute malicious code.
  • Denial of Service (DoS). Several DoS vulnerabilities were identified, where attackers could crash the app by sending specially crafted messages or stickers.
  • Manipulation of Message Order. A significant flaw dubbed “crime-pizza” allowed attackers to reorder messages, potentially altering the context or meaning of communications.
  • Side-Channel Attacks. Theoretical vulnerabilities exist where attackers could infer information from encrypted messages through timing attacks, though these require extensive resources and specific conditions.

đź”´User Security Recommendations

  • Update Regularly. Users should ensure they are running the latest version of Telegram to benefit from the latest security patches, like the one addressing CVE-2023–26818.
  • Be Wary of System-Level Permissions. On platforms like macOS, users should be cautious with applications requesting broad system permissions, especially those related to file access, microphone, or camera usage.
  • Enable Two-Factor Authentication (2FA). This adds an extra layer of security against unauthorized access.
  • Use Secret Chats for Sensitive Information. For communications requiring the highest level of privacy, users should opt for Secret Chats which offer end-to-end encryption.
  • Be Cautious with Third-Party Content. Given vulnerabilities in handling stickers and media, users should be wary of opening content from unknown sources.

đź”´Future of telegram after the arrest CEO Pavel Durov

The arrest of Pavel Durov, the CEO of Telegram, raises several possibilities regarding the future of the platform, based on both the operational structure of Telegram and reactions from the online community:

· Continuation of Operations: According to posts on X and statements from sources close to Durov, Telegram has an approved contingency plan for scenarios like his arrest. This suggests that the company’s operations could continue without significant disruption. Telegram’s decentralized nature, where much of its infrastructure is designed to operate independently of its founders’ direct involvement, supports this possibility.

· Increased Scrutiny and Legal Challenges: Durov’s arrest, linked to allegations of insufficient content moderation and criminal use of the platform, might lead to more intense regulatory scrutiny. Governments and legal entities might push for stricter compliance with content moderation laws, potentially affecting user privacy or the platform’s appeal if Telegram were to alter its policies significantly.

· Security and Privacy Concerns: Given Telegram’s emphasis on privacy and security, any forced cooperation with authorities for access to encrypted messages could undermine user trust. If Telegram were compelled to decrypt messages or moderate content more stringently, it might lose users to platforms with stronger privacy commitments or might see a rise in the use of its “Secret Chats” feature, which offers end-to-end encryption.

· Community and User Reaction: The arrest has already sparked a debate on free speech, privacy, and the role of platform owners in content moderation. This could lead to a surge in support for Telegram from privacy advocates and free speech enthusiasts, potentially increasing its user base among those who see the arrest as an overreach by authorities.

· Leadership Transition or Stability: If Durov’s legal issues prolong, there might be a transition in leadership or a power vacuum. However, with a contingency plan in place, it’s likely that key figures within Telegram or pre-appointed successors could step in, maintaining stability, though perhaps with a different strategic direction.

· Platform’s Ideological Shift: Depending on who takes over or influences Telegram in Durov’s absence, there could be shifts in the platform’s stance on privacy, freedom of speech, or its operational model. This might not necessarily mean a negative change but could alter the platform’s ethos.

· Financial Implications: The arrest might affect investor confidence or partnerships, especially if legal battles lead to fines or if the platform’s reputation for privacy is compromised. Conversely, if Telegram emerges stronger or more defiant against government overreach, it might attract more libertarian tech investors.

· Technological and Feature Development: With or without Durov, if the development team remains intact, Telegram might continue to innovate. However, significant changes in technology or features might be delayed or altered if key decision-makers are preoccupied with legal matters.

đź”´Conclusion

Telegram’s approach to security and encryption through MTProto represents a bold attempt to balance user convenience with privacy in the digital age. While its custom protocol offers unique features like cloud synchronization and potentially better performance on unstable connections, it also introduces complexities and vulnerabilities not found in more conventional, peer-reviewed encryption methods. The debate surrounding Telegram’s security model underscores a fundamental tension in modern communication platforms: the trade-off between user experience, feature richness, and absolute privacy.

For users, understanding these nuances is crucial. Telegram provides tools like Secret Chats for those who seek the highest level of privacy, alongside regular chats for those prioritizing accessibility and convenience. However, the platform’s security model requires users to be proactive in managing their privacy, which might not align with the expectations of those who prefer a “set it and forget it” approach to digital security.

As the digital landscape evolves, platforms like Telegram will continue to refine their security protocols, potentially integrating more elements of peer review or adopting hybrid models that offer the best of both worlds. Meanwhile, users must remain informed, choosing platforms and settings that best suit their privacy needs. For those requiring uncompromised confidentiality, fully end-to-end encrypted alternatives might still be the preferable choice. Yet, for many, Telegram’s innovative approach might just strike the right chord, offering a rich set of features within a framework that, while debated, continues to evolve with security in mind.

--

--

Inderjeet Singh

Chief Cyber Officer | TEDx Speaker | Cyberpreneur | Veteran I Innovative Leadership Award | Cyber Sec Leadership Award | India’s Top 30 Blockchain Influencer I