The Blockchain Technology: Everything about Cryptocurrency Heists
To find the various findings on the Bitcoin security breaches I realized it would be great to start by analyzing case studies of real attacks. I believe this document would be helpful for any beginner to understand and contemplate the security comprises in cryptocurrency and its possible solution to avoid such attacks.
Report on Recent Cryptocurrency Heists:
The crypto-market capitalization has grown to over 2500%. This could mean that bitcoin and other cryptocurrency heists are prone to severe security attacks. Cryptocurrency heists and their associated problems can be solved if bitcoin’s principle of decentralization is implemented in every aspect, including the decentralization of exchanges. If individuals and organizations do this, then the chances of getting hacked are practically reduced to nothing.
Though it’s quite possible that government intervention could make things better, It’s not always true. Central banks perceive bitcoin and other cryptocurrencies as a threat to their firm control over the world’s monetary supply. So, it may be possible that regulations could be formulated to serve the best interests of the elite and might be designed to hurt the growing crypto-market.
For now, it is extremely important for everyone in the bitcoin community to know about the possible threats, mitigation procedures and methods to avoid existing attack patterns.
This document concentrates on major security hits since the inception of bitcoin. A timeline of the attack, BTC losses, details of the attack and the possible action proposed for recovery is covered for each case.
The following are the major cryptocurrency heists:
1. The 51% Attack
Timeline: April — June 2018
Bitcoin Service Targeted: Electroneum, Monacoin, Bitcoin Gold, Verge, Litecoin Cash and ZenCash
Attack details: An unknown party used a lot of computing power to carry out a double spend attack to steal money from several crypto exchanges. The attacks are only possible with large amounts of hash power. Hash power is the he number of hashes that can be performed by a bitcoin miner in a given period of time (usually a second).
Description: The “51% attack” happens when the 51% of the network’s hashrate is under one entity. That entity could be a mining pool or an authority figure. The moment 51% of the hashrate is under siege, it basically destroys the decentralized nature and opens up the network to a plethora of attacks such as Selfish mining, Cancelling all transactions, Double Spending and Random forks.
Action Proposed: Users are safe if they don’t receive coins from unknown parties. Usually, the target attacks are Exchanges.
- Users should Be really careful about large transactions
- Wait for enough confirmations
- Watch the known attacker’s patterns and be prepared
2. Bitcoin-miner Malware
Timeline: March 2018
Attack details: More than 80,000 instances of several sophisticated trojans that exhibited advanced cross-process injection techniques, persistence mechanisms, and evasion methods were uncovered by Windows Defender Antivirus and proceeded to block them. Behavior-based signals coupled with cloud-powered machine learning models uncovered this new wave of infection attempts. Within the next 12 hours, more than 400,000 instances were recorded, 73% of which were in Russia. Turkey accounted for 18% and Ukraine 4% of the global encounters.
Action Proposed: Windows Defender AV flagged the attack’s unusual persistence mechanism through behavior monitoring, which immediately sent this behavior-based signal to Microsoft’s cloud protection service.
- Within milliseconds, multiple metadata-based machine learning models in the cloud started blocking these threats at first sight.
- Seconds later, Microsoft’s sample-based and detonation-based machine learning models also verified the malicious classification. Within minutes, detonation-based models chimed in and added additional confirmation.
- Within minutes, an anomaly detection alert notified about a new potential outbreak.
3. Implementation of multi-sig contracts
Timeline: November 2017
Bitcoin Service Targeted: Parity
BTC stolen: $155 million
Attack details: Parity’s multisig wallet consists of two parts: a lightweight contract which is deployed every time when you create a new wallet and the library contract which contains the majority of wallet logic and is deployed only once. This is done to reduce gas usage when creating a new contract, and this is good if you implement it right. This library had the significant error and right now this library is not in use, so all tokens are stored on dependent contracts. So, when parity’s developers deployed a common code as a library they actually deployed an uninitialized wallet and someone who knew about it could initialize this wallet. And thus eventually, someone hacked the system.
Action taken: The attack was fixed by the Parity developers by doing a hard fork. A hardfork is a change to the bitcoin protocol that makes previously invalid blocks/transactions valid, and therefore requires all users to upgrade.
4. Wallet Vulnerable to Theft
Timeline: February 2017
BTC stolen: $50 million
Attack details: The bitcoin theft campaign was very simple the attackers needed only to continue purchasing Google AdWords to ensure a steady stream of victims. This campaign targeted specific geographic regions and allowed the attackers to amass millions in revenue through the theft of cryptocurrency from victims. This campaign demonstrates just how lucrative these sorts of malicious attacks can be for cybercriminals. Additionally, the revenue generated by these sorts of attacks can then be reinvested into other cybercriminal operations. For example, the poison ads included “spoofed” links with small types like “blokchien.info/wallet” and “block-clain.info,” which sent visitors to a landing page that mirrored actual websites of the company Blockchain, which runs both the domains Blockchain.info and blockchain.com.
Fooled into believing they had come to the right place, victims then entered private information that allowed the hackers to gain access to their actual wallets and take their digital money.
Action Proposed: After analysis, Microsoft’s response team updated the classification name of this new surge of threats to the proper malware families. People affected by these infection attempts early in the campaign would have blocks under machine learning names like Fuery, Fuerboos, Cloxer, or Azden. Later blocks show as the proper family names, Dofoil or Coinminer.
5. Phishing attacks on Cryptocurrency
Timeline: April 2018
Bitcoin Service Targeted: MyEtherWallet(MEW)
BTC stolen: 150 million
Attack details: A couple of Domain Name System registration servers were hijacked to redirect users to a phishing site. Not all visitors to the site during the hijack were impacted, but a majority of those who were had been using Google’s DNS. An incident like this doesn’t compromise the site directly, but, in the case of MEW, it led some users of the service to insecure websites that aren’t MEW. From there, those who entered private key information without realizing they had been phished, risked having their data snagged by the attackers on the other side. With that information, the attackers could gain access to their account and drain its contents.
Action Proposed: The company recommended to those who had used Google DNS to switch to Cloudflare. Beyond using hardware like Trezor or Ledger, crypto wallet users — well, internet users in general — should check that the SSL of a website is secure when they are dealing with private information.
6. Tracing a coin’s history
Attack details: Tracing a coin’s history can be used to connect identities to addresses.
A group of Cambridge cybersecurity researchers now argues that one can still distinguish those contraband coins from the legitimate ones that surround them, not with any new technical or forensic technique, but simply by looking at the blockchain differently — specifically, by deeply looking at it.
The Cambridge team argues for a new way of tracing “tainted” coins in the blockchain, particularly ones that have been stolen or extorted from victims and then sent through a series of transactions to hide their ill-gotten origin. Rather than try to offer any new detective tricks to identify the source of a Bitcoin transaction hiding behind a pseudonymous address, their idea instead redefines what constitutes a dirty bitcoin. Based on a legal precedent from an 1816 British court decision, they posit that the first coin that leaves a Bitcoin address should be considered the same coin as the first one that went into it, carrying with it all of that coin’s criminal history. And if that coin was once stolen from someone, he or she may be allowed to claim it back even after it has passed through multiple addresses.
Action Proposed: CoinJoin, a trustless method for combining multiple Bitcoin payments from multiple spenders into a single transaction to make it more difficult for outside parties to determine which spender paid which recipient or recipients. Unlike many other privacy solutions, CoinJoin transactions do not require a modification to the bitcoin protocol.
7. Denial of Service (DoS) attacks
BTC stolen: $72 million
Bitcoin Service Targeted: Bitfinex, Bittrex, Bitcoin Gold
Attack details: DoS is another type of hacker attack, the idea of which is to send a large number of similar requests. To complicate the clogging of nodes memory, the block size is limited to 1 MB, and the size of each script does not exceed 10 thousand bytes. Also, the number of confirmations that each block may request is 20 thousand. The number of multi-confirmations is also limited to 20 keys.
Action Proposed: Bitcoin has some denial-of-service prevention built-in, but is likely still vulnerable to more sophisticated denial-of-service attacks.
8. Sybil Attack
Attack Details: The Sybil attack implies a situation where one node in the network acquires several identities. The Sybil attack was first described by a Microsoft researcher John Douceur. It is based on the fact that peer-to-peer networks cannot reliably distinguish between members. Friends can transfer account data to each other, and some ISPs provide one IP address for all their users.
In blockchain networks, an attacker may try to fill the network with nodes controlled by him. This allows him to launch the following rogue schemes:
- An attacker may refuse to transmit and receive blocks by disconnecting users from the network.
- There appears a danger of the 51% attack and double-spending.
- You can see all transactions using special software tools.
Action Proposed: In centralized networks, Sibyl attacks are usually avoided using a set of heuristic rules. One option is to use a trusted certification authority that will verify all users. Second option is thorough verification of nodes. However, this approach requires huge network resources.
In Bitcoin Blockchain, Sybil attacks are eliminated by special requirements that rule the generation of new blocks. Because an attacker can only create a limited number of blocks, this provides reliable cryptographic protection against Sybil attacks. It turns out that the fraudster needs to have the actual computing power, which cannot be faked.
9. Timejacking: Forcing clock drift against a target node
Attack Details: This is a theoretical vulnerability in bitcoin’s de-facto timestamp handling. By announcing inaccurate timestamps when connecting to a node, an attacker can alter a node’s network time counter and deceive it into accepting an alternate block chain. This could significantly increase the chances of a successful double-spend, drain a node’s computational resources, or simply slow down the transaction confirmation rate. Unlike other attacks, this would still be possible even when all nodes maintain communication with honest peers. A limited timestamp-based disruption is also possible against nodes that use NTP and also maintain synchronized clock.
This can be addressed by determining acceptable timestamp ranges solely based on previous block timestamps. Additional measures include narrowing acceptable time ranges, using the system time rather than estimated network time, and blocking untrusted peers.
- Use the node’s system time instead of the network time to determine the upper limit of block timestamps and when creating blocks.
- Tighten the acceptable time ranges.
- Use only trusted peers.
- Monitor network health and shutdown if there’s suspicious activity
- Require more confirmations before accepting a transaction.
- Use the median block chain time exclusively when validating blocks.
10. Compromised company’s computer/ Inside Job
Timeline: December 2017
Bitcoin Service Targeted: NiceHash, CoinSecure
BTC stolen: $64 million
Attack details: NiceHash is the world’s largest crypto-mining marketplace. Hackers infiltrated NiceHash’s systems through a compromised company computer. According to the VPN logs, the hackers accessed NiceHash’s system through a VPN login using one of its engineer’s credentials. They then learned and simulated the workings of NiceHash’s payment system and started making transactions. Given the complexity and security of the systems in place, this appears to be an incredibly sophisticated and highly coordinated attack.
Action Proposed: NiceHash notified all major exchanges and mining pools about the breach to help them track the stolen funds.
Possible Weak Attacks:
1. Breaking the cryptography
There are two different algorithms that protect most of the transactions in the blockchain. The first one is hash functions, specifically, SHA256 and RIPEMD160. The second part is elliptic curve cryptography.
For the second case, if EC was broken, then transactions would only be exposed if the public key for an address is publicly known. Given that most wallets are moving to an HD setup, keys aren’t reused anymore, so the window of breaking a public key and then trying to steal the coins is limited to a very short time in which the attacker sees the unconfirmed transaction and the time that it has sufficiently propagated the network that all double spends are rejected.
In any event, bitcoin’s crypto is pluggable and can be upgraded should any of these algorithms break. These algorithms aren’t going to just break at any random point in time. Optimizations to brute force, an algorithm can be found making it slightly easier to break them. This is currently the case for the SHA1 and MD5 family of hashing functions and even RSA with low key sizes.
2. Bitcoin Scalability Problem
Attack details: The bitcoin scalability problem refers to the current landscape of the Bitcoin ecosystem is very different from what it used to be back at the inception of the cryptocurrency. The number of people involved has grown from a few dozens of passionate enthusiasts to over 10 millions of everyday users.
The growing user base is naturally accompanied by a constantly increasing number of daily transactions, which are now counted by the hundreds of thousands. The unfortunate reality is that the Bitcoin network, in its current state, is unable to process all those transactions fast enough.
3. Finney attack
Attack Details: Suppose the attacker is generating blocks occasionally, in each block he generates, he includes a transfer from address A to address B, both of which he controls. To cheat you, when he generates a block, he doesn’t broadcast it. Instead, he opens your store web page and makes a payment to your address C with his address A. You may wait a few seconds for double-spends, not hear anything, and then transfer the goods. He broadcasts his block now, and his transaction will take precedence over yours.
4. Coin destruction
Attack Details: Bitcoin has 2.1 quadrillion raw units, making up 8 decimals of BTC precision, so the entire network could potentially operate on much less than the full quantity of Bitcoins. If deflation gets to the point where transactions of more than 10 BTC are unheard of, clients can just switch to another unit so that, for example, it shows 10 mBTC rather than 0.01 BTC. The transaction format and version number would be scheduled to change at some particular block number after a year or two, and everyone would have to update by then.
5. Everyone calculates at the same rate
Attack Details: If everyone began with identical blocks and started their nonce at 1 and incremented, the fastest machine would always win. However, each block contains a new, random public key known only to you in the list of transactions. The 256-bit “Merkle tree” hash of this is part of the block header.
Thus everyone begins with slightly different blocks and everyone truly has a random chance of winning (modified by CPU power).
The Future of Cryptocurrencies:
While much of the world is captivated by the meteoric rise of bitcoin’s value others are focused on the technology behind the cryptocurrency: blockchain. The decentralized digital ledger tech is built upon a peer-to-peer network, and it is far more secure than the centralized systems used by traditional banks and financial institutions. However, another revolutionary technology is now threatening Bitcoin’s security.
These cryptographic protocols make cracking a blockchain using today’s computers practically impossible, but the system does have weak points quantum computers could exploit. Researches have examined how quantum computers could break through Bitcoin’s security in two ways: by mining more than classical computers can and by cracking Bitcoin’s cryptographic keys.
To prevent hackers from firing up a quantum computer to steal cryptocurrencies companies like Hcash are working on creating protection against quantum hacking by connecting the traditional blockchain with a new structure called Direct Acyclic Graph (DAG). Also, scientists from Victoria University of Wellington in New Zealand have proposed making blockchain behave like a time machine to keep it safe. Through entanglement, a phenomenon that Einstein described as ‘spooky action at a distance’, because during the process two or more particles instantly affect each other. Here records are stored as photons in a block will influence other photons of that block in the past and create a quantum blockchain that would be impossible to hack. In this scenario, a hacker cannot tamper with any photon encoding records of the past, since those photons no longer exist in the current time — they already got absorbed. At best, a hacker can attempt to tamper with the most recent photon, the most current block, and successfully doing so would invalidate that block, informing others it got hacked.
The security around cryptocurrencies could be enhanced by using the machine learning techniques. DarkTrace, a cyber defense company found illegal mining operations using Machine Learning techniques. Researchers also suggests upgrading to POS systems, which is much safer and where 51% attacks are practically infeasible thereby significantly increasing robustness. Furthermore, an upgrade to better hashing algorithm would add an extra layer of security.
The future also depends on the users of cryptocurrencies. They need to be educated to use two Factor Authentication and cold storage to save passwords. The bitcoin wiki also recommends users to use a Brainwallet. A Brainwallet refers to the concept of storing Bitcoins in one’s own mind by memorizing a seed phrase. If the seed is not recorded anywhere, the Bitcoins can be thought of as being held only in the mind of the owner. Using memory techniques allow them to be memorized and recalled easily.
Bitcoin is more than a passing internet fad. It’s here to stay. A crucial feature of Bitcoin is its security. It’s hard to deny that there are indeed security issues with bitcoin. However, a recurring theme is the fact that these security breaches and issues have less to do with the protocol itself, and a lot more to do with the people and services handling and storing these bitcoins. The bitcoin protocol itself may be secure enough, but this does not extend to all the sites and services that deal with bitcoin. The treat will increase as more powerful quantum computers come online in the next few years. The weak threats include stealing private keys, keyloggers, fake wallets appearing on App stores, bitcoin phishing and hacking an exchange. Mining pools, crypto exchanges and hot wallets were not designed as parts many of blockchain protocols. Further, many blockchain protocols are not decentralized or have flaws in decentralization. When the integrity of capital relies on some specific technology, like the blockchain-based protocols, it’s worth to put in extra effort to understand the security in cryptocurrency world and build a secure environment.