Skip to content
Memory corruption Write-up Advanced

Exploiting Android Messengers with WebRTC

A memory corruption vulnerability in WebRTC's SCTP implementation (CVE-2020-6514 and Bug 376) allowed an attacker to send malformed SCTP packets to a target device, potentially achieving remote code execution. The researcher tested this exploit against 14 Android messaging applications and found it worked fully remotely on four of them.

googleprojectzero.blogspot.com

Published on googleprojectzero.blogspot.com

This is a three-part series on exploiting messenger applications using vulnerabilities in WebRTC. CVE-2020-6514 discussed in the blog post was fixed on July 14 with these CLs.This series highlights what can go wrong when applications don't apply WebRTC patches and when the communication and notification of security…

The author, on googleprojectzero.blogspot.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a memory corruption bug in the usrsctp library used by WebRTC, where malformed SCTP packets could cause a use-after-free or similar issue.

Impact

The exploit could achieve remote code execution on vulnerable Android messaging apps, with some requiring no user interaction (e.g., Signal, Duo) and others requiring the victim to answer a call (e.g., VK, OK).

What the attacker needed

Attacker can initiate a WebRTC call to target; target uses vulnerable app version; for some apps, target must answer the call

How it was found

  1. Hook seven functions on the attacking device using Frida to alter outgoing SCTP packets and inspect incoming ones.
  2. Determine three address offsets from the target device's binary (system-malloc, gadget-malloc, and vtable-GOT).
  3. Send malformed SCTP packets to the target device during a WebRTC call setup.
  4. For some apps, enable data channels via SDP manipulation if not enabled by default.
  5. The exploit triggers memory corruption on the target, potentially leading to code execution.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

WebRTC is a technology that lets apps make audio and video calls directly between users. A bug in how it handled certain network messages could let an attacker take control of a victim's phone just by calling them, without the victim doing anything. The researcher checked many popular messaging apps and found several were vulnerable.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.