- What is Bitcoin?
Bitcoin is an online descentralised virtual currency based on an open source, P2P protocol. Bitcoins can be transferred using a computer without relying on a financial institution.
If you haven’t heard about Bitcoin I recommend you watch the following video:
Both the Bitcoin creation and transfer is performed by computers called “miners” that confirm the bitcoin’s creation by adding the information to a descentralized database. Bitcoins get harder to generate all the time. There are more that 10 million bitcoins in circulation today. The Bitcoin design only lets the creation of 21 millions and that limit will be reached during the year 2140.
The Bitcoin wallet is what gives you ownership of one or more Bitcoin addresses. You can use those addresses to send and receive coins from other users.
Due to the complexity of mining bitcoins if you mine on your own it may be a long time until you can make some return. Bitcoin pools are places where multiple users can work together to make bitcoins and share benefits in a fair way.
Finally, you can buy and sell bitcoins using several real world currencies (EUR, USD ..) using several exchanges such as:
mtgox.com [no longer available]
https://www.cavirtex.com/home [no longer available]
Due to the growing popularity of the Bitcoin it has become an attractive and profitable target for cybercriminals. During the last few years we have seen an increase in the number of attacks and threats involving the virtual currency. The bad guys have adapted their tools to steal bitcoins from victims, use compromised systems to mine bitcoins and obtain benefit from it. On the other hand virtual exchanges are also victims and we have seen how the attackers have phished the users of those exchanges and how they have performed Denial of Service attacks to destabilize the exchange rate and profit.
During the last few years the capability of stealing the wallet.dat file has been added to several malware families. In addition, new malware families have appeared with the objective of stealing the wallet file from the infected machines.
For example, a version of the Khelios malware that has been used to send Spam and steal data from infected systems added the capability to steal the wallet.dat file some time ago:
As a result if a Bitcoin’s user gets infected, the file containing the keys to use your bitcoin addresses will be stolen. The wallet file can be protected by a password but most of the malwares we have found have keylogging capabilities that could steal the wallet password as well.
Another example are several IRC botnets that are running based on the “AthenaIRCBot” source code that has the capability of stealing the wallet file as well:
- Bitcoin mining
Apart from stealing the Bitcoin wallet the number of malware families that can use the victim’s computer power to mine Bitcoins is getting bigger and bigger.
We have found samples that install the Bitcoin daemon in the victim but the most frequently used technique is adding a piece of code that connects to a mining pool (public or private) to mine bitcoins.
You can find variants of very well known malware families such as Zeus/Zbot that added this capability. As an example, we found a Zeus variant more than a year ago that had intalled the Bitcoin daemon to mine bitcoins using the infected systems.
That specific variant was distributed using Fake e-mail messages containing a link to the malicious file.
Once the system got infected the Bitcoin client bitcoind was installed in the system. The Zeus variant was using the configuration file from:
In the last few months several Dorkbot variants including one that was using Skype to spread added the capability of mining bitcoins.
Once the system gets compromised, a version of the Ufasoft Bitcoin miner is started. In this case the attacker is running his own pooling server.
The Ufasoft software contacts the mining pool server via HTTP:
We have seen samples contacting the following servers that are owned by the same guys behind the botnet:
That infrastructure has been running for at least 5 months.
Another gang has been running several Bitcoin mining servers for more than a year now. They have used Dorkbot as well as other malicious software to infect systems and use their computer power to mine bitcoins. Following is the list of malicious servers they have been using:
We have found instances where the malicious actors are also mining Litecoins that is another virtual currency similar to Bitcoin.
During the analysis of one of the malicious servers that was used to compromise users we found a GUI application that the attackers are using to build “Silent Miners” that are basically processes that run on the background, connect to the server pool that you configure and mine Litecoins/Bitcoins for you:
The program will generate an executable file prepared to run in the background. It makes it very easy for the attackers to include or distribute the executable in the botnets they are already running.
Apart from the infrastructure we have unveiled, we have found many different malwares with Bitcoin mining capabilities in the last few weeks. Some of them are distributed as fake software in P2P networks, using malicious web redirects (Blackhole Exploit Kit), Fake AV’s, etc.
A lot of them also use public mining pools that are also used by regular users to mine bitcoins. Following is a list of malicious binaries we have found as well as the pool server and username they use:
Show me the money
As you can see in the previous table some of the bad guys were using Bitcoin addresses instead of usernames to connect to the pool servers.
Due to the openness of the Bitcoin’s protocol we can access the information and the transactions done by those accounts.
169TpR47JVcLaQXdGYE6Lv4Ps9DbVqHhSi, 91.39938806 BTC ,$ 8,317.34
17F8N9AvEWSWRMgfR2WncDxhHCm2zLMgST, 20.89356766 BTC , $ 1,901.31
1ASNjJjUou6RPkmP81nJUuhbZDkxAaHQhX, 420.81569559 BTC, $ 38,294.23
1H1xa5PV522hUKfBqvfXPqu7buS5q9ckiW, 31.00274179 BTC , $ 2,821.25
1Kjvxd9CbnYbigcC13gS5VAd2asNcdVSyH, 88.99839055 BTC , $ 8,098.85
1KyxrBp8mJRt3U6Q12LfuNLonZ9JHLYnbM, 77.55520657 BTC , $ 7,057.52
1Q3TM64corp7BCYY98pa88w9RoZSfxrH8, 48.69058357 BTC , $ 4,430.84
For instance we can see these two Bitcoin addresses probably belong to the same bad actors:
Those two accounts sent most of the money to the following account:
That Bitcoin address received a total amount of 1050.21 BTC in the last few months. If the bad guys sold that amount of bitcoins some days ago when a single Bitcoin was worth $265 they could have made $278k. Not bad for a small Botnet!
MtGox Fake sites
Mtgox is the largest Bitcoin exchange where you can trade Bitcoins for EUR/US, etc. In the last few weeks the increased popularity of both Bitcoin and Mtgox has made it an attractive target for attackers.
Last week, we detected several websites that were attempting to target Mtgox users. An attacker set up the fake website www[.]mtgox-chat[.]info:
The malicious server looks like an official Mtgox website with a chat on it. Once the user enters the site it will try to load a malicious Java applet:
The Java applet will download and execute a binary file from a remote site.
Once the file is executed the victim gets infected and the system will contact the C&C server on:
Having access to the victim’s system the attacker can now get the Mtgox’s credentials and steal the money/bitcoins from the victim.
Impact on the enterprise
The detection of mining software in your network could indicate either a misuse of resources by your employees or an infection that could lead to financial losses.
The following best practices will help you prevent these threats:
- Keep software up to date
- Update your Antivirus signatures
- Run a Vulnerability Assessment Program
- Monitor your networks to detect suspicious network behaviors.