The attack, which was targeted at US users, hit websites including the New York Times, the BBC, AOL and the NFL over the weekend. Combined, the targeted sites have traffic in the billions of visitors.

The malware was delivered through multiple ad networks, and used a number of vulnerabilities, including a recently-patched flaw in Microsoft’s former Flash competitor Silverlight, which was discontinued in 2013.

When the infected adverts hit users, they redirect the page to servers hosting the malware, which includes the widely-used (amongst cybercriminals) Angler exploit kit. That kit then attempts to find any back door it can into the target’s computer, where it will install cryptolocker-style software, which encrypts the user’s hard drive and demands payment in bitcoin for the keys to unlock it.

While “drive-by” installations tend to only demand one or two bitcoins as a ransom, worth a few hundred pounds, more targeted ransomware attacks have demanded much more in payment. An LA hospital was revealed to have paid $17,000 (£12,000) in ransom to an attacker in February.

The vector of attack, through compromised ad networks, will also serve to inflame the debate around adblockers. The browser plugins have been attacked as a “modern-day protection racket” and criticised for harming the business model of free online publications, but users counter that they protect their devices from attacks of this sort, as well as making the web surfing experience faster, more pleasant, and less draining on mobile devices’ batteries.