FortiGuard Labs Threat Research
On 6th December 2017, FortiGuard Labs discovered a compromised website - acenespargc[.]com. Looking into the source code, we noticed a suspicious encrypted script which the uses eval() function to convert all the characters into numbers. We used a tool called CharCode Translator to reverse the numbers back into characters. We were then able to retrieve a link which redirects to a scam page or phishing website.
The above is just a simple example. The threat actor can actually customize the phishing content by geographical location, and to better avoid detection, it will also disappear when it detects that you have visited the phishing page before.
Using this technique, threat actors are able to hide malicious/phishing/advertising URLs from being seen with the naked eye.
As you will see below, this technique has now been adopted by threat actors to hide Cryptocurrency mining JavaScript in compromised websites, so that whoever visits the website will be “infected” and their computer will start cryptomining for the threat actor. We classify this activity as malicious because it uses other people’s resources without their permission.
On the 28th of December, FortiGuard Labs learned about another malicious website using the very obfuscation technique we described above – romance-fire[.]com – through a referral from a customer. This website contained obscured malicious code for cryptocurrency mining.
We uncovered the encoded script, and by using the packer tool to unpack it, we found the script has a connection to CoinHive.
We noticed that the URL (hxxp://3117488091/lib/jquery-3.2.1.min.js?v=3.2.11) didn’t seem like a valid IP or domain. We did some research and found that ‘3117488091’ is the decimal IP of 185.209.23.219 after we converted it at KLOTH.NET. Below is the result:
This site converted the URL to hxxp://185.209.23.219/lib/jquery-3.2.1.min.js?v=3.2.11. From the URL, we retrieved the same pattern of JavaScript, so we unpacked the Script again.
After a final round of unpacking, we were finally able to retrieve the script that contains CoinHive URLs:
On 26th January 2018, we discovered another website – sorteosrd[.]com – which also mines cryptocurrency by hijacking a visitor’s CPU. This cryptomining malware again allows hijackers to benefits from mining digital currency without the computer user’s permission. We believe that this site might have been compromised or used by the webmaster.
As we can see from the screenshot above, coin miner dramatically slows down the PC as its CPU is fully utilized after visiting the site.
Another example of a CoinHive script was found at a surprising compromised website – blackberrymobile.com.
In addition, we also discovered that one of the largest diary farm groups in New Zealand, Milk New Zealand, had also been compromised. Our AV lab detected malicious activity from the site, so we look in tot he source code and found a script using the deepMiner tool at github to Mine Monero, Electroneum, Sumokoin, etc. See the screenshot below:
Based on the data in the screenshot above, we learned that this kind of script uses DDNS for its domain and only increases CPU usage by 50% in order to be less noticeable to end users.
The probleme of cryptocurrency-mining malware is getting serious. As the number of threat actors looking to earn from cryptomining by hijacking CPU cycles continues to grow, cryptomining malware is showing up in more and more places. A week ago, several malicious ads popped up on YouTube after a threat actor managed to inject a coin miner script into online ads. Luckily YouTube found the issue and removed the affected ads within two hours.
FortiGuard has blacklisted all the URLs listed in this blog as Malicious.
Compromised Websites:
Newly observed coin mining URLs:
Sign up for our weekly FortiGuard intel briefs or to be a part of our open beta of Fortinet’s FortiGuard Threat Intelligence Service.