Despite recent drops in values and ongoing volatility in the markets, cryptocurrencies remain the currencies of choice for threat actors and vast numbers of individuals attracted by the promise of both anonymous transactions and potential profits. For threat actors, the explosion of ransomware in 2016 and 2017, payments for which were largely made in bitcoins, provided infusions of cryptocurrency. Most underground markets also operate exclusively with cryptocurrencies, making them attractive targets. Recent high-profile breaches and thefts from major exchanges made headlines but many cybercriminals have now turned to coin mining malware, add-on modules for banking Trojans, and in-browser mining software to generate cryptocurrency revenue as ransomware has declined dramatically.
This blog describes the current state of coin mining malware, looks at historical trends driving malicious activity with cryptocurrency, and provides insights for organizations, individuals, and defenders, all of which are increasingly exposed to cryptocurrency-related threats.
Ransomware gives way to bankers and embedded mining capability
With the introduction of Locky in early 2016, an actor we track as TA505 introduced ransomware at massive scale in large global attacks. The large ransomware attacks from TA505 and others continued through much of 2016 and 2017, as did the rapid introduction of new ransomware strains. At the peak of their growth, multiple new strains were being introduced daily, the vast majority of which required payment in Bitcoin. For many consumers, this was a harsh introduction to cryptocurrency. Figure 1 shows a typical ransom message, complete with the “Bitcoin accepted here” logo.
Figure 1: Sample ransom message from Wana Decryptor 2.0
Figure 1 also illustrates a trend that we first reported in our Q4 2017 Threat Report: as Bitcoin values dropped and cryptocurrency markets became even more volatile, threat actors increasingly demanded payments denominated in local currency, even though those payments still needed to be made in bitcoins.
By 2018, however, ransomware payloads in email became far less common and were largely replaced with banking Trojans, information stealers, downloaders, and other malware. Figure 2 shows the relative mix of top malware categories in 2018, with ransomware falling far below message volumes associated with other malware families.
Figure 2: Indexed daily message volume of top malware categories, January-June 2018
The Trick banking Trojan drove much of this volume, with Zeus Panda (aka Panda Banker) and Emotet banking Trojan also appearing in frequent campaigns. A newer strain known as IcedID has also seen rapid adoption by several regular threat actors.
Banking Trojans - No longer just targeting bank accounts
Banking Trojans generally operate using webinjects that either modify or replace web pages from online banking sites to steal login credentials, conduct fraudulent transactions, and more. Most banking Trojan campaigns are regionally targeted as the webinjects must be configured for individual banks. However, many banking Trojan campaigns have added cryptocurrency mining modules or bots, known as “coin miners,” as later-stage payloads, expanding a trend that we first reported in Q3 2017. Other bankers—most notably, The Trick—added cryptocurrency mining modules to the primary payload.
At the same time, we have observed webinjects increasingly targeting cryptocurrency wallets and exchanges, as well as international online payment sites, making regional targeting less critical. For example, in March 2018, The Trick added the following cryptocurrency-related injects:
When Cryptocurrency Meets Commodity Malware
Figure 3: Timeline of introduction of mining modules to widely distributed malware; question marks indicate functionality requiring further research
Anatomy of a cryptocurrency miner attack
We have observed coin miners being installed via exploit kits (EKs), web-based social engineering schemes, and, most often, via email. One such email is pictured in Figure 4 and features a strong social engineering component to trick users into clicking the link and downloading the document.
Figure 4: Sample email lure spoofing a well-known law firm and using stolen branding with a linked Microsoft Word document that, when downloaded, contains macros that install coin mining malware
We regularly observe both linked and attached malicious documents, as well as PDFs, zipped scripts, and other malicious files, all designed to download coin miners, among other malware. Figure 5 was a sample document attachment from another campaign purporting to be a resume and, like many malicious documents, contains social engineering schemes to trick users into enabling macros, after which malware is downloaded and installed automatically.
Figure 5: Sample document attachment that uses malicious macros and Microsoft’s Background Intelligent Transfer Service (BITS) to download and install SmokeLoader; this in turn downloads a Monero coin miner
Figure 6 shows a typical attack chain beginning with a malicious document attachment. In this case, the downloaded malware is a banking Trojan that continuously mines for cryptocurrency even as attackers use it to steal credentials and conduct fraudulent transactions like a typical banker. Monero tends to be the cryptocurrency of choice for these types of miners as the currency can still be mined effectively with the combined desktop CPU resources of many infected machines. Bitcoin, on the other hand, is more commonly stolen directly as mining has become too processor intensive for anything but mining farms and high-performance computing clusters.
Figure 6: Typical attack chain using a malicious email attachment to deliver a banking Trojan with a coin mining module
It is worth noting that in some cases, attacks do not involve any malware at all. For example, we observed a threat actor creating fake cryptocurrency wallet sites and buying Google Ads to drive traffic to the sites. When users enter wallet credentials in the bogus sites, the group steals the credentials and can steal cryptocurrency funds directly.
Because nobody types those cryptocurrency wallet addresses
Cryptocurrency wallet addresses are long strings that are frequently cut and pasted by users. As a result, Proofpoint and other researchers have observed a number of targeted phishing emails that deliver malware that manipulates the clipboard, monitoring its contents for cryptocurrency wallets. The malware then changes copied addresses to hardcoded addresses owned by the attacker. Because of the length and complexity of the address string, it is unlikely that end users will notice the change and, instead of paying their intended recipient, deposit funds in the attacker’s wallet.
In one such campaign that leveraged previously undocumented malware, we verified this behavior for Bitcoin and found hardcoded addresses for Ethereum, Monero, and Liberty Reserve cryptocurrencies.
Coinhive - Busy as bees
Figure 7: Indexed coinhive events recorded on IDS sensors this year
Cryptocurrencies continue to make headlines, whether because of major thefts at cryptocurrency exchanges, allegations of currency manipulation, or market volatility. The real story, though, is often happening behind the scenes, as threat actors look to steal bitcoins and other cryptocurrencies directly from consumers with information stealers and banking Trojans configured to look for relevant credentials and software. At the same time, even as cryptocurrency values have fallen from the stratospheric levels they reached in 2017, threat actors continue to include coin mining modules and secondary coin miner payloads in the malware they distribute, creating new opportunities for monetization of email and web-based attacks.
For many actors, coin mining, whether through web-based cryptojacking or through installed malware, represents “free money”, regardless of currency volatility and is less disruptive than ransomware, dramatically extending the time window during which malware can persist on devices and actors can collect information and mine currencies.
Subscribe to the Proofpoint Blog