This article is more than 1 year old
Newfangled graphics engine for browsers fosters data theft
The shady truth behind CSS shaders
Software developers at Google, Apple, Adobe, and elsewhere are grappling with the security risks posed by an emerging graphics technology, which in its current form could expose millions of web users' sensitive data to attackers.
The technology, known as CSS shaders is designed to render a variety of distortion effects, such as wobbles, curling, and folding. It works by providing programming interfaces web developers can call to invoke powerful functions from an end user's graphics card. But it could also be exploited by malicious website operators to steal web-browsing history, Facebook identities, and other private information from unsuspecting users, Adam Barth, a security researcher on Google's Chrome browser warned recently.
"Because web sites are allowed to display content that they are not allowed to read, an attacker can use a Forshaw-style CSS shader [to] read confidential information via the timing channel," Barth wrote in a December 3 post to his private blog. "For example, a web site could use CSS shaders to extract your identity from an embedded Facebook Like button. More subtly, a web site could extract your browsing history bypassing David Baron's defense against history sniffing.
On the discussion list for developers of the WebKit browser engine, Barth and developers from Apple, Adobe, and Opera discussed the risks posed by the CSS shaders technology, which was submitted to the W3C as an industry standard in October. Some members argued the timing attack Barth contemplated wasn't practical because it would have to be customized to a particular browser and would took a long time to extract only a partial image displayed on an end user's monitor.
"Even if you tuned a CSS attack to a given browser whose rendering behavior you understand, it would take many frame times to determine the value of a single pixel and even then I think the accuracy and repeatability would be very low," Apple developer Chris Marrin wrote in response. "I'm happy to be proven wrong about this, but I've never seen a convincing demo of any CSS rendering exploit."
Barth conceded he was aware of no reliable proofs of concept demonstrating the attack, but he told The Register he's concerned the feature could expose users to a classic browse-and-get-hacked attack in which private information is stolen simply by visiting the wrong site.
"For example, an attacker could apply a CSS shader to an iframe containing content from another web site," he wrote in an email. "If the attacker crafts a shader such that its run time depends on the contents of the iframe, the attacker could potentially steal sensitive data from that web site."
He said that exploits might also expose the directory locations of sensitive files when users upload files to a website.
The scenario outlined by Barth closely resembles a vulnerability disclosed in another graphics engine that's also emerging as an industry standard. In June, security researchers warned that a 3D-accelleration API known as WebGL also allowed websites to extract images displayed on a visitor's monitor. An accompanying proof-of-concept exploit stole images displayed on the Firefox browser by "spraying" memory in the computer's graphics card. The researchers said other browsers were probably also vulnerable. Barth said the vulnerability has since been fixed.
Parts of the CSS shaders specification are available in nightly developer builds of the WebKit browser engine that form the underpinnings of the Chrome and Apple Safari browsers. Adobe has an internal build of WebKit that implements CSS shaders more completely. Barth said he's unaware of the technology shipping in working versions of any browser. And that means the coalition of developers still has time to fix the flaw before it can do any damage.
"There are a number of defenses that we're discussing in the W3C CSS-SVG effects task force," Barth said. "In my view, the most promising approach is to find a subset of the GLSL shader language in which a shader always takes the same amount of time to run, regardless of the input. If we find such a subset, web sites would be able to use these effects without the browser leaking sensitive information into the timing channel." ®