There are lessons to be learned from government websites serving cryptocurrency miners

Posted by   Martijn Grooten on   Feb 12, 2018

This was awkward. On Sunday, the Information Commissioner's Office (ICO), the UK's data protection regulator and thus the public body that issues fines for data breaches, was found to be serving a JavaScript-based cryptocurrency miner on its website.

The issue was first reported by security researcher Scott Helme, who discovered that the ICO wasn't the only organisation affected: thousands of sites, including many government sites in a number of countries, were serving the same JavaScript code. The source of the issue was quickly determined to be a piece of third-party code used to improve a website's accessibility for the visually impaired.

The technique used wasn't particularly advanced: some mildly obfuscated code had been added that loaded the miner from Coinhive, a site used in many such attacks. In fact, the same Coinhive account had been used against some other websites a few days earlier. TextHelp, the company that was serving the code, took the affected web server offline after about four hours.

icocoinminer.png

The current value of most cryptocurrencies makes this an attractive way for cybercriminals to make money, but as attacks go, it is barely more harmful than inserting a silly YouTube video into the web page. But while we consider all the other things that could have happened (such as form data being stolen, or an exploit kit being served) it is worth noting that there are important lessons to be learned from this hack.

The first is that there are actually ways in which content can be loaded from third-party sites that significantly reduce the harm. In particular, by setting the Content Security Policy (CSP) header, a site can inform a browser that only content from specific domains is allowed to be included. Using Subresource Integrity (SRI) can even allow only JavaScript code with a specific cryptographic hash to be included, though that is probably most useful in cases where the third-party site is controlled by the same organisation.

The second lesson is that a company like TextHelp can make it easy for researchers to find a security contact to report issues like these. This is where the recently introduced security.txt standard becomes very useful: it is a simple text file hosted at a predictable location on a website, where the site owner can put their security contacts, as well as various security policies. Both Facebook and Google have adopted the standard, but it is probably most useful for smaller companies and organisations that don't have a large and visible security team.

This morning, Virus Bulletin added a security.txt file to its website.

twitter.png
fb.png
linkedin.png
hackernews.png
reddit.png

 

Latest posts:

VB2019 paper: Spoofing in the reeds with Rietspoof

In a VB2019 paper Avast researchers Jan Sirmer, Luigino Camastra and Adolf Středa revealed full details of the Rietspoof malware. Today we publish their paper and the recording of the presentation given by Jan and Luigino in London.

New paper: Behind the scenes of GandCrab's operation

The GandCrab ransomware regularly updated itself to newer versions to stay ahead of decryptors released by security researchers, and regularly included taunts, jokes and references to security organizations in its code. In a new paper, the AhnLab…

VB2019 paper: King of the hill: nation-state counterintelligence for victim deconfliction

At VB2019 Juan Andres Guerrero-Saade looked at nation-state actors using threat intelligence for victim deconfliction. Today we publish both his paper and the recording of his presentation.

The VB2020 call for papers - how it works

With the VB2020 Call for Papers now open, we explain how the selection procedure works, which may help you during your abstract submission.

VB2019 presentation: Targeted attacks through ISPs

In 2019 we saw a rise in the number of targeted malware infections spread via ISPs and service providers. In a last-minute paper presented at VB2019 in London, Kaspersky researcher Denis Legezo discussed the details of a number of such cases. Today…

We have placed cookies on your device in order to improve the functionality of this site, as outlined in our cookies policy. However, you may delete and block all cookies from this site and your use of the site will be unaffected. By continuing to browse this site, you are agreeing to Virus Bulletin's use of data as outlined in our privacy policy.