August 4th, 2024

You Can't Spell WebRTC Without RCE – Part 1

Ian Dupont's blog post examines vulnerabilities in the Signal messaging app related to WebRTC, emphasizing the need for security research and detailing the exploitation of its protocols for potential attacks.

Read original articleLink Icon
You Can't Spell WebRTC Without RCE – Part 1

The blog post by Ian Dupont discusses the vulnerabilities associated with the Signal messaging app, particularly focusing on its use of WebRTC for real-time communication. As secure messaging apps gain popularity, the need for thorough research into their security becomes critical, especially given past exploits like Pegasus spyware. The series aims to simplify the complex task of researching messaging apps and mobile exploitation, starting with an investigation into WebRTC, which is integral to many messaging applications.

The first part of the series outlines the structure of WebRTC and its protocols, including RTP and RTCP, which handle audio and video data transmission. Signal uses a public fork of WebRTC, known as RingRTC, which has specific modifications for its implementation. The author emphasizes the importance of understanding these protocols to identify potential vulnerabilities.

The post details the process of injecting synthetic vulnerabilities into Signal's WebRTC implementation, aiming to demonstrate how these vulnerabilities can be exploited. The author plans to remove certain mitigations that prevent premature parsing of RTP packets, thereby creating a 0-click attack surface. The research will also cover the setup of a local research environment and the use of tools like Frida for mobile exploitation.

Overall, the series intends to provide foundational knowledge for security researchers interested in mobile app vulnerabilities, particularly within the context of Signal and WebRTC, while also offering practical insights into the exploitation process.

Link Icon 4 comments
By @ec109685 - 6 months
Signal should separate WebRTC handling into its own process so that an exploit doesn’t have access to its critical database.

A messaging app has almost all the same security concerns as a browser, so the recommendations here apply: https://developer.apple.com/documentation/browserenginekit

By @kelnos - 6 months
This honestly doesn't surprise me all that much. More than 10 years ago I had to dive into Chrome's WebRTC stack for interop and reverse-engineering purposes (at the time, the WebRTC specs were changing all the time, and were poorly documented). The code was massive; it turns out it's a fairly complicated protocol, and dealing with audio and video and handling sessions (even without including a signaling protocol) requires a lot of code (not to mention the use of the then-obscure DTLS security protocol on top of UDP). And that was 12 years ago; I'm sure WebRTC's surface area has only increased since then.

I assume Signal uses a different implementation, but I'm sadly not surprised there are security issues lurking inside it.

This bit at the beginning made me chuckle, though:

> It’s another average Friday morning and my iPhone shows 705 unread Signal messages

I feel like I'm doing communications wrong... if I wake up and find 20 unread messages across all my chat apps, that's on the high side for me.

By @egberts1 - 6 months
As we dive into Apple iPhone iOS, we show how to build Signal/iOS, but first let us show you Signal/Android because our Frida tool cannot hook within iOS.

So, it is a build instruction.

By @jauntywundrkind - 6 months
> Next, let’s give ourselves an arbitrary write. To make the exploit a bit simpler, we’ll give ourselves an arbitrary memcpy.

They took Signal-webrtc & added a vulnerability to it.

Maybe maybe maybe there's some other means to exploit the lack of time check, but this feels like such a massive & overwhelmingly staked out nothing burger.