Firefox 59 to make it a lot harder to use data URIs in phishing attacks

Posted by   Martijn Grooten on   Nov 21, 2017

While a domain name is really just a short string, this string comes with a large amount of implicit metadata: the registration date; the IP address(es) the domain currently points to and has pointed to in the past; the associated name servers; past activity observed using the domain.

For this reason, domain names play an important role in the fight against malware and other kinds of malicious activity, whether in blacklists of domains used in spam emails or security products that consider the domain in order to determine whether a particular website is malicious.

This is an important reason why compromised websites play a significant role in many web-based malware campaigns. As security blogger Troy Hunt pointed out in a recent blog post, "Nobody ever suspects daffodils."

But there is another trick used in some malicious web activity that manages to avoid domains altogether: data URIs.

These URIs start with data: and contain the full content of the web object (e.g. an image or an HTML page), usually Base64-encoded. For example, a very simple HTML page could look like this:

data:text/html;base64,PGh0bWw+CjxoZWFkPjx0aXRsZT5IZWxsbyB3b3JsZDwvdGl0bGU+PC9oZWFkPgo8Ym9keT4KSGVsbG8sIDxiPndvcmxkPC9iPiEKPC9ib2R5Pgo8L2h0bWw+Cg==

There are many legitimate uses for data URIs, but they are increasingly being used for malicious purposes, in particular phishing attacks, where they serve the phishers with a means of embedding the full website in their email without having to depend on created or compromised (and in both cases blacklist-able) web servers.

Earlier this year, a Gmail phishing campaign made use of this technique, while a few years ago, security researcher Andreas Lindh used the same trick to demonstrate a vulnerability in various 3G/4G USB modems.

This malicious use of browsers has not gone unnoticed by browser developers: Firefox developer Mozilla announced that, as of version 59 of the browser, it will stop rendering data URIs in certain scenarios, such as those where a data URI containing HTML is opened in the browser, or when a data URI containing JavaScript is loaded by a website. Here, Firefox follows other browsers, such as Chrome and Edge, which have already made similar changes.

There are, no doubt, legitimate cases of data URI usage that will be frustrated by browsers becoming less tolerant of them. But on balance this seems a good move: it will force phishers and other cybercriminals to use domain names which, from their point of view, are the weak link in many a campaign.

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.