Is it still possible to run malware in a browser using JavaScript and Rowhammer? Yes, yes it is (slowly)

Firefox 'fully compromised' in 15 minutes via SMASH attack


Boffins from Vrije Universiteit in Amsterdam and ETH in Zurich have bypassed memory chip defenses to execute a successful browser-based Rowhammer side-channel attack dubbed SMASH.

Rowhammer refers to a technique that computer security researchers began to explore around 2014: "hammering" RAM chips with a series of rapid write operations. This process abuses the electronics enough to flip stored bits, potentially introducing errors that can be exploited for further gain.

Initially, Rowhammer attacks had to be conducted locally, though by 2016 [PDF], the technique had been refined to work remotely using JavaScript in, say, a web browser.

Memory specifications introduced in 2014 added optional support for a mitigation called Target Row Refresh (TRR), a DRAM command available to memory controllers to refresh memory cell rows adjacent to particularly active areas as a way to prevent corruption.

But computer scientists from VU, ETH, and Qualcomm last year described a way to defeat TRR locally in a paper titled, TRRespass: Exploiting the Many Sides of Target Row Refresh [PDF].

It's Hammer Time!

On Tuesday, some of those same researchers and some new ones – Finn de Ridder, Pietro Frigo, Emanuele Vannacci, Herbert Bos, Cristiano Giuffrida, and Kaveh Razavi – unveiled SMASH (Synchronized MAny-Sided Hammering), a web-based attack on Mozilla's Firefox browser that overcomes TRR and several challenges associated with executing Rowhammer via JavaScript.

Their SMASH attack can slowly but arbitrarily read and write memory in Firefox (v. 81.0.1) on an updated Ubuntu 18.04 system with Linux kernel 4.15.0-111-generic installed. That can potentially allow malicious code to execute; the team wrote in their paper [PDF] that their technique can "fully compromise the Firefox browser in 15 minutes" from memory manipulation, on average.

Below is a video demonstrating a basic SMASH attack.

Youtube Video

To break Firefox, the boffins had to deal with the lack of cache flushing instructions in JavaScript, which had made Rowhammer impractically slow against web browsers. They also had to devise alternative memory access patterns because they couldn't count on large physically contiguous memory regions in JavaScript.

While working to overcome these hurdles they found that rather than blindly generating as many memory access patterns as possible over the shortest period of time, they could achieve better results by scheduling the sequence of cache hits and misses – synchronizing memory requests with DRAM refresh commands – to avoid TRR.

Lock on a board. Photo by shutterstock

Intel's SGX cloud-server security defeated by $30 chip, electrical shenanigans

READ MORE

"Our work confirms that the Rowhammer bug continues to threaten web users," the researchers say. "Worse still, our insights on synchronization show that the attacker has more control than previously thought, and will make it even harder to build the proper Rowhammer defense we need as long as the bug itself persists."

SMASH can be mitigated in software, though not without cost. Disabling Linux memory management scheme Transparent Huge Pages (THP) – used to build efficient attack patterns – works. Doing so, however, affects system performance. Pointer authentication codes (PACs), which protect the integrity of pointers in software and hardware, should also be effective, the researchers say.

As for eliminating Rowhammer-based attacks, the researchers observe that various software fixes proposed all have disadvantages. They argue that Rowhammer as a DRAM vulnerability should be fixed in hardware, though they observe it will be years before defenses against recently developed techniques make it to market.

"Furthermore, given that future DRAM devices will feature even smaller transistors, it remains to be seen whether it is possible to build effective mitigations for such devices," they say. ®

Similar topics


Other stories you might like

  • Want to buy your own piece of the Pi? No 'urgency' says Upton of the listing rumours

    A British success story... what happens next?

    Industry talk is continuing to circulate regarding a possible listing for the UK makers of the diminutive Raspberry Pi computer.

    Over the weekend, UK newspaper The Telegraph reported that a spring listing could be in the offing, with a valuation of more than £370m slapped onto the computer maker.

    Pi boss, Eben Upton, described the article as "interesting" in an email to The Register today, before repeating that "we're always looking at ways to fund the future growth of the business, but the $45m we raised in September has taken some of the urgency out of that."

    Continue reading
  • JetBrains embraces remote development with new IDE for multiple programming languages

    Security, collaboration, flexible working: Fleet does it all, says project lead

    JetBrains has introduced remote development for its range of IDEs as well as previewing a new IDE called Fleet, which will form the basis for fresh tools covering all major programming languages.

    JetBrains has a core IDE used for the IntelliJ IDEA Java tool as well other IDEs such as Android Studio, the official programming environment for Google Android, PyCharm for Python, Rider for C#, and so on. The IDEs run on the Java virtual machine (JVM) and are coded using Java and Kotlin, the latter being primarily a JVM language but with options for compiling to JavaScript or native code.

    Fleet is "both an IDE and a lightweight code editor," said the company in its product announcement, suggesting perhaps that it is feeling some pressure from the success of Microsoft's Visual Studio Code, which is an extensible code editor. Initial language support is for Java, Kotlin, Go, Python, Rust, and JavaScript, though other languages such as C# will follow. Again like VS Code, Fleet can run on a local machine or on a remote server. The new IDE uses technology developed for IntelliJ such as its code-processing engine for features such as code completion and refactoring.

    Continue reading
  • Nextcloud and cloud chums fire off competition complaint to the EU over Microsoft bundling OneDrive with Windows

    No, it isn't the limited levels of storage that have irked European businesses

    EU software and cloud businesses have joined Nextcloud in filing a complaint with the European Commission regarding Microsoft's alleged anti-competitive behaviour over the bundling of its OS with online services.

    The issue is OneDrive and Microsoft's habit of packaging it (and other services such as Teams) with Windows software.

    Nextcloud sells on-premises collaboration platforms that it claims combine "the convenience and ease of use of consumer-grade solutions like Dropbox and Google Drive with the security, privacy and control business needs." Microsoft's cloud storage system, OneDrive, is conspicuous by its absence.

    Continue reading

Biting the hand that feeds IT © 1998–2021