Modern Web browsers are constantly getting new features. It makes for interesting challenges on the level of security and privacy reviews. This is how I usually look on this stuff. There are recently a lot of interesting new browser mechanisms. I previously analysed some in the past, such as proximity sensor (my analysis here: Privacy analysis of Proximity Sensor), light level sensor (including stealing browsing history), or highlighting the privacy footprint of Battery Status API (here). There are also recent cases of other interesting privacy abuses of Cascading Style Sheets mixed-blend-mode, or even new risks of history-stealing attacks.
Battery Status API served as a perhaps one of the most interesting case studies of designing systems with support for privacy. In a nutshell, after identifying privacy risks, browsers (notably, Firefox and WebKit even removed the issue) fixed the issue, and subsequently W3C specification has been also amended. Our 2017 case study description can be found here: title).
Modern batteries are powerful – indeed they are smart, and have a privileged position enabling them to sense device utilization patterns. A recent research paper has identified a potential threat: researchers (from Technion, University of Texas Austin, Hebrew University) devise a scenario where malicious batteries are supplied to user devices (e.g. via compromised supply chains):
An attacker with brief physical access to the mobile device – at the supply chain, repair shops, workplaces, etc. – can replace the device’s battery. This is an example of an interdiction attack. Interdiction attacks using malicious VGA cables have been used to snoop on targeted users. Malicious battery introduces a new attack vector into a mobile device.
Poisoned batteries are thus capable of monitoring the victim’s system use, leading to the recovery of sensitive user information, such as: visited websites (with around 65% precision, better than a random guess), typed characters (accuracy better than random guess), when a camera shot is made, and incoming calls. Detection of the sensitive user data is an example of power analysis, exploiting a side channel information leak. Finally, the battery is also used to exfiltrate information to the attackers.
The whole attack is rather technically complex, and it is subject to debate how practical it could be to real-world attackers at this moment. But it is nonetheless very interesting, as it highlights how complex our computing devices really are, and that there is an inherent need to trust the components of our devices.
I’d like to put special attention to the exfiltration channel using the battery. It is a very interesting covert channel.
The W3C Battery Status API, implemented by major web browsers, notably Chrome, allows websites to query the information about the current battery level, as well as to disclose the rate of charge/discharge. The paper describes an exploitation of the Battery Status API in order to remotely exfiltrate acquired data. All the victim user has to do is to visit a sink website that is reading the data. Malicious batteries can detect when the browser enters this special website, and enable the exfiltration mode.
And how is the exfiltration done? It works by manipulating of “charging” states – the 0/1 state informing a website that the battery is either charging or discharging. But how to induce a steady stream of “charging” event changes in a way that encodes information? The employed technique is very interesting: it uses wireless charging, i.e. by placing a resonant inductive charger into the battery chip. What needs to be done is to place a charging coil close to the battery hardware.
Sounds complicated? It does not need to be, since we assume that an attacker is able to deliver a malicious battery in the first place. Then all the user has to do is to visit a website that would read the information using the standard W3C Battery Status API, when supported by the web browser (e.g.. Chrome is vulnerable but Firefox is immune). In principle, everything is done without any interaction with the Operating System – it is oblivious to the OS.
There is also this interesting observation:
Since the browser does not seem to limit the update rate, the state change depends entirely on the phone’s software and the charging pad state transition rate. We find that the time to detect the transition from not charging to charging (Tdc) is 3.9 seconds.
... allowing to obtain 0.1-0.5 bits/second (bandwidth) covert channel. I know some Web APIs and their implementations quite well (in particular Battery Status API), but this is something I haven’t thought of. Of course there is no reason for browsers to allow frequent switches between charge/discharge events. So Privacy by Design methodology would advice here: cap the switch rate.
The attack may seem like a stretch (requires physical battery replacement – or poisoning hardware at a factory), and at this moment one can imagine multiple simpler methods. Nonetheless it is an important study. Is the sky falling? No. Is the work significant? Yes.
For more information, please look at the paper here.
I am interested in this kind of information flows and leaks, including those via non-standard channels. I’m wondering if a similar exfiltration couldn’t be done using other sensors (i.e. light) as well?
This post has originally appeared on Freedom to Tinker, a blog of Princeton's Center for Information Technology Policy.