Exploiting Android Messengers with WebRTC
googleprojectzero.blogspot.com
googleprojectzero.blogspot.com
Also, this exploit didn't just affect Signal (it affected Google Duo too, for instance), and it appears this has already been patched in Signal:
> This exploit was performed on Signal 4.53.6 which was released on January 13, 2020, as Bug 376 had already been patched in Signal by the time I finished the exploit. CVE-2020-6514 was also fixed in later versions, and ASCONF has also been disabled in usrsctp, so the code that caused Bug 376 is no longer reachable. Signal has also recently implemented a feature that requires user interaction for the WebRTC connection to be started when the caller is not in the callee’s contacts. Signal has also stopped using SCTP in their beta version, and plans to add this change to the release client once it is tested. The source for this exploit is available here.
This right here, is something that scares me. I wonder if this would fly on Apple's AppStore for example. Because there's virtually no way to attest to the application's binaries (for example for forensic purposes), and it can easily be used to backdoor the app on the fly.
https://developer.android.com/guide/app-bundle/dynamic-deliv...
Google has to allow dynamic loading at app start because of this. Or fix whatever subtle interaction between Android and an OEM's "improvements" is causing this. Not a huge step from here to getting your library from the internet instead of bundled with the app.
Not trying to justify any one app's behavior, just bringing up a fundamental reality baked into what you're saying: Apple doesn't have to deal with the gaps in its security model becoming load bearing features.
>WebRTC does not pose a substantially different risk than other video conferencing solutions, but the decision to include video conferencing in an application introduces a large remote attack surface that wouldn’t be there otherwise.
Adding features pretty much always takes away from security. This seems to be a pretty good example of the principle.
We are seeing more and more memory safe implementations of WebRTC. So I really think there is light at the end of the tunnel!
* https://github.com/pion/webrtc
* https://github.com/shinyoshiaki/werift-webrtc
Chromium itself sees constant CVEs so I don’t think this is a WebRTC specific issue. Documents like https://www.chromium.org/Home/chromium-security/memory-safet... give me hope.
> This research showed that many applications fall behind with regard to applying security updates to WebRTC. Bug 376 was fixed in September of 2019, yet only two of the 14 applications analyzed had patched it.
I don’t think there was really an alternative at the time if you wanted feature rich DataChannels. Maybe we could stuck with the simpler RTP Datachannel. All that conversation was before I was aware of WebRTC though.
I personally don’t find SCTP that complex. You can implement a basic version pretty easily. Implementing the full spec is overwhelming for sure. I feel pretty confident saying any alternative protocol that is feature rich written in C/C++ will have issues as well.
For me personally I use DataChannels pretty extensively for Teleoperation work. Also project like https://github.com/nurdism/neko and https://github.com/giongto35/cloud-game are pretty compelling.
3 out of 8 ‘official use cases’ depend on it. https://www.w3.org/TR/webrtc-nv-use-cases/ as well.
Oh I also think great for E2E security. It is better to exchange metadata and keys via a DataChannel. If you push that stuff through signaling there is a good amount of information leaking.
I think just so users don’t have to solve the same problem themselves. SCTP gets you multiple streams and they can be ordered/reliable if you want.
The congestion control is pretty impressive. You can jump the TSN forward if you send a bunch of data but lose one Datagram in the middle. Cool stuff like that.
But really, why the hell did it have to take almost a decade to get data channels, when you could jump through a bunch of hoops and essentially build a software dial up modem and transmit data over audio streams? Reminds me of the "minutes vs. texts vs. data" billing nonsense with cell phones. You trying to tell me audio and video aren't data?
* SCTP allows multiple independent streams
* Each streams have different rules on reliability/ordering
* SCTP does congestion control and reports back to the user your estimated bandwidth so your application can change what it is doing.
If all we can do is list reasons why SCTP is an interesting and useful protocol, we're at an impasse, because I like SCTP. I just don't know that it belonged in this design, where most applications that want WebRTC for simple use cases are paying a complexity and security cost to make it simpler (not even "feasible", just "easier") to build things like WebTorrent.
So here are the recent projects I have worked with that need the complexity.
* Teleoperation - Robot control went over reliable stream. Metadata goes over lossless stream, we don’t care about sensor readings 3 seconds ago.
* File Transfer - If you send too fast you will cause complete loss. You also need to measure constantly since link quality will fluctuate.
* Large Image Transfer - SCTP also handles breaking up messages to fit MTU. If you just send UDP Datagram you need to probe how big of packers you can actually send.
* Unreliable Large Image Transfer - If you don’t care if an image arrives and you lose packet 1 you shouldn’t send the rest of the Datagram. This was big for a project, saved a lot of bandwidth making sure we didn’t complete corrupted messages.
If the overwhelming majority of daily invocations of WebRTC protocols is due to simple videoconferencing applications, and all those invocations have to pay a complexity and security tax in order to potentially enable someone else's "teleoperation", that's a misallocation, isn't it?
Doing some googling, I'm wondering whether the original intent was to switch everything over to SCTP: data channels seem to have used the same protocol as media pre-2014. Maybe no one got around to it and things ossified?
SCTP and RTP try and respect each other. It follows the same rules as having multiple people using WebRTC on the same internet.
I guess worries about security trump "make the web stack do everything" though.
I haven't really used the protocol, the extent of my knowledge was reading about it back in 2011 and thinking "cool".
On FreeBSD, WebRTC implementations could use the kernel stack as it implements SCTP-in-UDP (RFC6951).
Never done 'native SCTP' before so I don't know for sure!
* OpenSSL was already in all the browsers, so you have a DTLS client.
* Extracting the keys for SRTP gives you PFS, which is really great! This came up a lot during the SDES conversations.
* I have heard that most gateways only support UDP/TCP, and other protocols aren't going to happen. That is the argument for running QUIC over UDP (vs a layer lower)
(Submitted title was 'Project Zero Released a Zero-Click Exploit for Signal')