How to find cryptojacking malware

Prorootect

Level 69
Thread author
Verified
Nov 5, 2011
5,855
How to find cryptojacking malware
badpackets.net: How to find cryptojacking malware

MOTTO:
Source Code Search Engine: PublicWWW. This is a search engine that indexes the entire source code of websites.


by Troy

How to find cryptojacking malware


Cryptojacking malware continues to spread across the web, largely due to the popularity of Coinhive. Since Coinhive’s launch in September 2017, numerous cryptojacking clones have come about.

The tool I’ve chosen to locate them with is PublicWWW. This is a search engine that indexes the entire source code of websites. I previously offered a comparison of their dataset versus other providers in my discussion of Coinhive malware specifically.

In this post, I detail how to find websites containing Coinhive, Crypto-Loot, CoinImp, and deepMiner in PublicWWW.

Let’s jump in and see how many sites with cryptojacking malware we can find!

Coinhive
Before we review some of the knock-offs, let’s look at the most synonymous name with cryptojacking, Coinhive. Finding this malware is relatively easy and various queries can be used to locate it. The original Coinhive JavaScript library used in cryptojacking is “coinhive.min.js” and we can start by simply searching for that. It’s important to search for the entire name in quotes to ensure an exact match is returned by PublicWWW.



Using this query, we find 34,474 sites. While this may seem like an astounding number, it’s only a modest increase since I wrote about the 30,000 sites found back in November 2017.

While this list of sites is great for an overview of sites with Coinhive malware, we can dig even deeper into PublicWWW’s dataset to extract the Coinhive site key used on each site. This can be done using regex to extract the site key as a snippet: “coinhive.min.js” snipexp:|CoinHive.Anonymous\(‘?(\w{32})’|i



Once the Coinhive site key is extracted, we can export the results and correlate which sites are part of a cryptojacking campaign. This correlation of a small number of Coinhive site keys to hundreds and even thousands of websites was documented in my previous post.

Recently I found a large cryptojacking campaign targeting 5,451 WordPress sites. In each case, the JavaScript containing Coinhive was hidden via obfuscation. While PublicWWW can’t search within the deobfuscated JavaScript itself, we can find a way to work around it.



To search for the affected sites, the following query, graciously crafted for me by VriesHd, was used:

“[\”(k” “\\x43\\x72\\x79\\x70\\x74\\x6f\\x6e\\x69\\x67\\x68\\x74\\x57\\x41\\x53\\x4d\\x57\\x72\\x61\\x70\\x70\\x65\\x72” snipexp:|(var _0x[0-z]{4}=)|

This query searches for the JavaScript function name used for the obfuscated code and then regex to extract a snippet of that name. This is useful to correlate the function name, such as “var _0xb70e” to the Coinhive site key used. Six unique keys were found to be used in this cryptojacking campaign:

Coinhive site key (function name)
DhGEVUgOoquJP68XByYLFs0nRVV4gq4J (0xb70e)
bbgnHTSmMLKUMaQzNa3Yfoul34A3cACd (0xbcba,0xe2f6)
hg9mNsA2DPkqe1F9yCUyWXggnDyrPqVW (0x1b00)
T6Oy0x11TMdeZRjy684Xow4GNBpb07SK (0xf80b)
OQoqVYH65ER2Eg2xcmoVtv4qrcHP2Z7G (0xe4d0,0xb765,0xcc28)
VW8fWIsg9hjn47qBdmb0jImf7pDHmU28 (0x8f35)

In some cases the same Coinhive site key was associated to multiple functions, shown above.

Crypto-Loot
Crypto-Loot has steadily remained as one the most popular alternatives to Coinhive since its inception. Similar to Coinhive, Crypto-Loot doesn’t require any user interaction and can run steathlity in the background....
...read MORE at the website...

_____________________________________________

Mmm so it's not possible to stop cryptojacking malwares with coin miner blockers extensions:)
so at your searches with Source Code Search Engine...
Usage Examples: Advertising Examples - PublicWWW.com
 
Last edited:
D

Deleted member 65228

You can find phishing URLs with Google/other search engines sometimes using the wild-card search features as well, occasionally even FUD ones. E.g. usage of "intext:", "inurl:", etc.

Thought it seemed relevant to the topic since it's still about hunting malicious content.
 

Prorootect

Level 69
Thread author
Verified
Nov 5, 2011
5,855
Don't push your luck.

I would like to remind you, that going looking for cryptocurrency mining websites could easily end up catching the more serious things like ransomwares or other bad things, so you have to be very cautious! If I go on the unknown web, I always go with above all Redirect Control and Policy Control add-ons in Firefox, as minimal defense... Don't push your luck. Don't tempt the devil, he's hungry.
Stop now.

_________________________________________________

Bad Packets Report‏ @bad_packets Feb 7


How prevalent is #cryptojacking malware? Here's the number of websites found on @publicww: #Coinhive: 39,925 CoinImp: 4,119 deepMiner: 2,160 Crypto-Loot: 2,057 Minr: 692 Total: 48,953

DVe8JlRVMAAwSbM.jpg

DVe8reLVQAEvNFt.jpg

1 reply 3 retweets 10 likes


Bad Packets Report‏ @bad_packets


We can dig even deeper into @publicww's dataset to extract the #Coinhive site key used on each site. This can be done using regex to extract the site key as a snippet: "coinhive.min.js" snipexp:|CoinHive.Anonymous\('?(\w{32})'|i https://publicwww.com/websites/%22coinhive.min.js%22+snipexp%3A%7CCoinHive.Anonymous%5C%28%27%3F%28%5Cw%7B32%7D%29%27%7Ci/ …

DVfOPIBVoAE2WXU.jpg

8:57 PM - 7 Feb 2018
 
Last edited:

Prorootect

Level 69
Thread author
Verified
Nov 5, 2011
5,855

By Phil | 02-13-2018 News
Photo credit: Dangerous.com
Beware: Salon Installs CryptoMining Software
thegoldwater.com/news/: Beware: Salon Installs CryptoMining Software

It's no secret that Salon is hard up these days. They've literally been having difficulties keeping the doors open and lights on in their San Francisco headquarters. As a result they're using some, eh, interesting and novel ways to shore up the deficit. One way is by offering to "suppress ads" if you're willing to let them leach your computer's "unused computing power."

Salon at least admitted to what they were doing. "Nothing is ever installed on your computer and Salon never has access to your personal information or files." Then goes into the "myth of using 10% of our brain" as an example of how it's really no big deal. They liken it to "borrowing your calculator for a few minutes to figure out math problems." Yeah, but what if everytime you "borrow my calculator" it runs up my electric bill, overworks my processor and could even damage my hardware? Still want to loan out that calculator?

Ever wondered why your laptop battery drains and the fans turn on when you’re reading some websites? Now you know.

— Ian Miles Cheong (@stillgray) February 13, 2018
Further down in the fine print, Salon answers what may become a "Frequently Asked Question" to users who allow "their calculator to be borrowed." They admit that your fans may be turned on due to the CPU being forced into extensive processing.

Also, not a great time to be implementing CoinHive considering that it came out on Salon less than 24 hours after this article hit - Creators of In-Browser Cryptocurrency Miner 'Coinhive' Say Their Reputation Couldn't Be Much Worse

— Aram Zucker-Scharff (@Chronotope) February 13, 2018
CoinHive has been used in the past to defraud the unwary, but Salon is the first major website to use the software. Worried? Ian Miles Cheong (@stillgray on Twitter), entertainment media, gaming, politics and pop culture journalist recommends installing "NoCoin."

Source:

dangerous.com/41377/salon-runs-bitcoin-mining-software-on-readers-computers

Share this article


__________________________________________________

Don't push your luck.

I would like to remind you, that going looking for cryptocurrency mining websites could easily end up catching the more serious things like ransomwares or other bad things, so you have to be very cautious! If I go on the unknown web, I always go with above all Redirect Control and Policy Control add-ons in Firefox, as minimal defense... Don't push your luck. Don't tempt the devil, he's hungry.
Stop now.

_________________________________________________
 

Prorootect

Level 69
Thread author
Verified
Nov 5, 2011
5,855
Coin Mining by Opportunistic and Automated Threats
on icebrg.io/blog/: Streaming Network Forensics™ for Real-Time Threat Detection and Response | ICEBRG | Streaming Network Forensics™

By: Justin Warner
With the recent surge in popularity and increasing value of cryptocurrency, it should be no surprise that financially motivated threat actors have begun leveraging their victims to contribute to “mining” efforts, where the computing resources of the victim are used to generate cryptocurrency for the threat actor. To succeed in making a large profit, the actors must continually compromise a large number of victims and utilize significant computing resources. This demand for mass compromise has forced these threat actors to adopt automated methods that rely on opportunistic exploitation to outpace defenders, increasing the number of victims as quickly as possible with minimal cost.

While on the surface, the business impact from coin mining seems minimal, having an unauthorized party in control of systems you own introduces a dangerous wild card. Is it really a criminal performing coin mining or is that a disguise? What will they do with the access if coin mining is no longer profitable? ICEBRG has witnessed incidents stemming from criminals who decided to sell their access to other parties, and the increasingly common malware-as-a-service scheme contributes to the risk from “simple” coin mining. Simply stated, criminal post-exploitation has become an efficient and wide-spread business that poses a threat to all enterprises, especially those with a significant and historical internet footprint that may contain undocumented or obsolete systems and pages. In this post, we will provide a walkthrough of an attack campaign that ICEBRG has witnessed in the wild over the past several weeks and break down some key lessons learned from the attack.

Attack Walkthrough
Exploitation
Attackers primarily rely on opportunistic exploitation of well known (and signatured) vulnerabilities in applications running on internet connected systems, and exhibit complete disregard for stealth or disguise. Throughout the recently observed campaign, attackers originating from multiple source addresses (191.101.180[.]84, 72.11.140[.]178) leveraged CVE-2017-10271, a java deserialization vulnerability in the Oracle WebLogic Server, to target outdated servers (Figure 1). Java deserialization vulnerabilities are not unique to Oracle, and plague several older versions of WebSphere, JBoss, Jenkins, OpenNMS, etc. In this class of vulnerability, server software attempts to deserialize untrusted content without validation allowing an attacker to abuse the application for code execution.

1.18_CoinMining_Fig1.png


Figure 1: Connections from an external untrusted entity with suspicious referrer to an exposed vulnerable Oracle WebLogic endpoint

...read MORE at the website...
 

Prorootect

Level 69
Thread author
Verified
Nov 5, 2011
5,855
Bad Packets Report‏ @bad_packets - Bad Packets Report on Twitter
#Coinhive found on the website of Mexican professional football league @AscensoMX. This case of #cryptojacking appears to be caused by an open AWS S3 bucket as the malicious script is injected via http://s3.amazonaws[.]com/lmxwebsite/js/toastr.js

DW6KjgCVAAEAUvy.jpg


DW6KnCbVoAAVgtD.jpg

DW6K6uXUQAEfZ4s.jpg

DW6LFRcVoAE4UJb.jpg

12:49 PM - 25 Feb 2018

-------------------------------------------

toastr.js VirusTotal:
Antivirus scan for a9a41e1452f3aa291a59b13ad7e80ea4322f9854e6df47be624faed692b9b991 at 2018-02-25 20:54:36 UTC - VirusTotal

- on hxxp://ascensomx.net/ I have 60-90%CPU load today...so beware
 

Prorootect

Level 69
Thread author
Verified
Nov 5, 2011
5,855
uBlock Origin -- Resource-abuse filters (these are cryptocurrency mining blocking filters):
- you have to notch in your 3-rd party filters...

! To foil sites potentially abusing CPU/bandwidth resources without informed consent. Any such resource-abuse scripts MUST be opt-in, with complete informed consent from the visitor.
 
Last edited:

Prorootect

Level 69
Thread author
Verified
Nov 5, 2011
5,855
Collection of Malicious Crypto-Mining fact of the day
Collection of Malicious Crypto-Mining fact of the day

Here are the facts collected into a single blog post.

Fact one:

Malicious Crypto-Mining fact of the day:​
Trying to hide from suspicious technical victims, crypto-miners often self-terminate when they spot IT tools such as Task Manager and Process Explorer.​
— Omri Moyal (@GelosSnake) November 20, 2017
— Omri Moyal (@GelosSnake) November 20, 2017

Fact two:

Malicious Crypto-Mining fact of the day:​
Although many different currencies are mined by attackers, Monero (XMR) is the choice for vast majority of bots. Its improved anonymity and CPU optimization makes it perfect for cyber-criminals.​
— Omri Moyal (@GelosSnake) November 21, 2017

Fact three:

Malicious Crypto-Mining fact of the day: A lot of miners are depending on public pools, making their profits and size quite easy to track. The wallet and pool address can be found quite easily and automatically. Here is a random example: VirusTotal pic.twitter.com/JHO1zAUoe8
— Omri Moyal (@GelosSnake) November 22, 2017

Fact four:

Malicious Crypto-Mining fact of the day:​
A lot of new cyber-crooks are experimenting with CryptoMining, their #1 OpSec Failure is to use a traceable email as their pool account. Live example via @anyrun_app - 672770f26bce507c7a52073a03fea19e5c08dd358f7fd521cdeed00151b38789 (MD5: DBD02AB6062A490C28109EF703D382D9) - Interactive analysis - ANY.RUN pic.twitter.com/QSEFQsgx22
— Omri Moyal (@GelosSnake) November 26, 2017

Fact five:

Malicious Crypto-Mining fact of the day:​
Building efficient mining code is not trivial. Therefore, malicious crypto-miners often include open source such as XMRig (xmrig/xmrig). Here's a very simple Yara rule to detect XMRig (and similar): very simple yara to find xmrig Crypto-Miners pic.twitter.com/JasWyveh2Z
— Omri Moyal (@GelosSnake) November 27, 2017

Fact six:

Malicious Crypto-Mining fact of the day:​
Since solo mining is not that profitable, bots are joining public pools. These pools have pretty static domain names. Here are very experimental Snort and Suricata sigs for tracking them down. suricata crypto-miner pool rules pic.twitter.com/3174OWskxN
— Omri Moyal (@GelosSnake) November 28, 2017

Fact seven:

Malicious Crypto-Mining fact of the day:​
It’s not surprising that mainstream bots are adding crypto-mining modules to their functionality. Mining plugins exist for both Windows and Linux bots. Here’s an example from SnatchLoader:VirusTotal pic.twitter.com/SpvzULVw2D
— Omri Moyal (@GelosSnake) November 29, 2017

@GelosSnake

If you know something, share it. If you learn something, learn more. When you really know your stuff, teach it!



---> thoughts still valid, at work!
 

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top