Google engineer urges web devs to step up and secure their code in this data-spilling Spectre-haunted world

'This is going to be a lot of work ... a reasonable set of mitigation primitives exists today, ready and waiting for use'


After the disclosure of the 2018 Spectre family of vulnerabilities in modern microprocessor chips, hardware vendor and operating system makers scrambled to reduce the impact of data-leaking side-channel attacks designed to exploit the way chips try to predict future instructions.

Intel and others rolled out firmware patches, Linux kernel maintainers added capabilities like STIBP (Single Thread Indirect Branch Predictors), and browser makers took steps like reducing the precision of timers.

Now web security professionals are asking developers to do their part by recognizing that Spectre broke the old threat model and by writing code that reflects the new one.

The One Ring from Lord of the Rings

Intel CPU interconnects can be exploited by malware to leak encryption keys and other info, academic study finds

READ MORE

Last month, Mike West, a Google security engineer, drafted a note titled, "Post-Spectre Web Development," and Mozilla's Daniel Veditz of the W3C's Web Application Security Working Group asked the group to come to a consensus on supporting the recommendations. While the group has yet to formally accept the proposal, the responses on the group's mailing list suggest the advice will be adopted as a set of best practices.

West argues that Spectre demonstrated the assumptions of the web security model need to be rethought, for both browser vendors and web developers. Citing post-Spectre Chromium project guidelines, he said the open source browser project now assumes that "'active web content … will be able to read any and all data in the address space of the process that hosts it.'"

For browsers, this has meant projects like Site Isolation and Project Fission, which put web sites and associated code into separate processes so websites can't meddle with one another. And now developers have some work to do.

"The bad news is that this is going to be a lot of work, much of it falling on the shoulders of web developers," writes West. "The good news is that a reasonable set of mitigation primitives exists today, ready and waiting for use."

We should mention that we've yet to see a Spectre exploit being used in the wild to attack and steal data from a significant number of victims, so this advice seems to us more to be heading off potential future danger.

Five step program

West makes five general recommendations, which require devs to pay attention to the walls, or lack thereof, between different web resources.

First, developers should decide when their code responds or doesn't respond to incoming requests by examining incoming request headers, in accordance with the desired resource isolation policy.

Second, they should set a cross-origin resource policy (CORP) to restrict an attacker's ability to load your data as a subresource.

Third, web devs should prevent attackers from framing website data using framing protections.

Fourth, they're advised to make sure attackers can't obtain a reference or handle to a site's window object by setting a cross-origin opener policy (COOP).

And fifth, they're directed to implement defenses against MIME-type confusion attacks using mechanisms like cross-origin read blocking (CORB) and opaque response blocking (ORB) to set appropriate defensive Content-Type headers.

Without defenses like these, an attacker, for example, might be able to craft a malicious web page that refers to a JSON file as a linked image. When the page is visited, the file data would be passed to the browser's render process but wouldn't be rendered because it's not properly formatted image data. Nonetheless, the JSON could be read in memory through a Spectre exploit, potentially leading to a breach of confidentiality or security.

CORB, in this instance, could prevent the JSON from being stored in memory because it doesn't have the MIME-type of an image.

Now it's just a matter of convincing web devs to take the time to make sure their code is secure. We'll let you know when that happens. ®

Broader topics


Other stories you might like

  • Stolen university credentials up for sale by Russian crooks, FBI warns
    Forget dark-web souks, thousands of these are already being traded on public bazaars

    Russian crooks are selling network credentials and virtual private network access for a "multitude" of US universities and colleges on criminal marketplaces, according to the FBI.

    According to a warning issued on Thursday, these stolen credentials sell for thousands of dollars on both dark web and public internet forums, and could lead to subsequent cyberattacks against individual employees or the schools themselves.

    "The exposure of usernames and passwords can lead to brute force credential stuffing computer network attacks, whereby attackers attempt logins across various internet sites or exploit them for subsequent cyber attacks as criminal actors take advantage of users recycling the same credentials across multiple accounts, internet sites, and services," the Feds' alert [PDF] said.

    Continue reading
  • Big Tech loves talking up privacy – while trying to kill privacy legislation
    Study claims Amazon, Apple, Google, Meta, Microsoft work to derail data rules

    Amazon, Apple, Google, Meta, and Microsoft often support privacy in public statements, but behind the scenes they've been working through some common organizations to weaken or kill privacy legislation in US states.

    That's according to a report this week from news non-profit The Markup, which said the corporations hire lobbyists from the same few groups and law firms to defang or drown state privacy bills.

    The report examined 31 states when state legislatures were considering privacy legislation and identified 445 lobbyists and lobbying firms working on behalf of Amazon, Apple, Google, Meta, and Microsoft, along with industry groups like TechNet and the State Privacy and Security Coalition.

    Continue reading
  • SEC probes Musk for not properly disclosing Twitter stake
    Meanwhile, social network's board rejects resignation of one its directors

    America's financial watchdog is investigating whether Elon Musk adequately disclosed his purchase of Twitter shares last month, just as his bid to take over the social media company hangs in the balance. 

    A letter [PDF] from the SEC addressed to the tech billionaire said he "[did] not appear" to have filed the proper form detailing his 9.2 percent stake in Twitter "required 10 days from the date of acquisition," and asked him to provide more information. Musk's shares made him one of Twitter's largest shareholders. The letter is dated April 4, and was shared this week by the regulator.

    Musk quickly moved to try and buy the whole company outright in a deal initially worth over $44 billion. Musk sold a chunk of his shares in Tesla worth $8.4 billion and bagged another $7.14 billion from investors to help finance the $21 billion he promised to put forward for the deal. The remaining $25.5 billion bill was secured via debt financing by Morgan Stanley, Bank of America, Barclays, and others. But the takeover is not going smoothly.

    Continue reading

Biting the hand that feeds IT © 1998–2022