UPDATE*: The default “Wi-Fi Calling” feature on T-Mobile devices that lets milllions of Android users make phone calls over a wireless Internet connection contained a vulnerability that could have been exploited to perform man-in-the-middle (MiTM) attacks.
Graduate students Jethro Beekman and Christopher Thompson from the Electrical Engineering and Computer Sciences department at the University of California Berkeley uncovered the issue and reported it to T-Mobile’s security team in December. T-Mobile’s senior manager for Mobile Assurance and Product Security, Darren Kress, said that as of yesterday the vulnerability had been resolved for all devices.
In a phone interview, T-Mobile spokesperson Glenn Zaccara clarified that Beekman and Thompson and T-Mobile’s security team worked closely with one another to resolve the issue by rolling out patches for various different device-types from the time that the researchers disclosed the bug in December 2012 until March 18 when the last vulnerable devices recieved patches.
“While it would have been challenging to execute the particular scenario found by researchers, we provided an update to 100% of the devices, and we are not aware of any customers that were affected,” Zaccara said. “We thank the UC Berkeley researchers for their responsible disclosure.”
Beekman and Thompson found that the Wi-Fi Calling feature did not properly validate the transport layer security (TLS) certificate from the server with which it must communicate. Because of this, the researchers claim attackers could potentially forge themselves counterfeit certificates that would allow them to perform MiTM attacks by impersonating the T-Mobile server that handles the Wi-Fi Calling application. Attackers that perform a proper exploit could intercept, spy on, decrypt, and otherwise modify voice calls, text messages, or any other traffic transmitted via T-Mobile’s Wi-Fi Calling feature.
In a technical analysis of the exploit, the Berkeley graduate students examined the certificate chain that T-Mobile’s server was sending to their device. Two anomalies stood out: the name of the first cert was merely the IP address of the server, and the self-signed cert was not included in standard certificate authority distributions (nor was it recognized in various Web searches), which ended up meaning that T-Mobile hadn’t implemented certificate validation correctly and that their certificates could be easily spoofed.
From here they noticed that a session initiation protocol dialogue pops up when a TLS connection is established between T-Mobile and the device. The device authenticates itself by sending its phone number, International Mobile station Equipment Identity (IMEI), and International Mobile Subscriber Identity (IMSI) to the server. The server then responds with an INVITE message containing an encryption key that lets an attacker decrypt the SIP dialogue, which an attacker can use to record incoming and outgoing calls and texts, record, block, and reroute SIP traffic, spoof sender identification or message content, and impersonate incoming and outgoing calls.
The most effective way for an attacker to exploit this vulnerability is by being on the same, open wireless network as his or her victim.
The researchers developed their exploit by reverse engineering the default Wi-Fi Calling application, which they say uses the fairly standard SIP to communicate in an encrypted form over TLS.
You can read Beekman and Thompson’s technical findings here [PDF].
*This story was updated to more clearly inform readers that the vulnerability has been fixed for all devices and to more accurately reflect the patch timeline.