A thief took over the power of a thousand bitcoin mines. Attack via Stratum V1 and BGP

  • On November 20, over a thousand bitcoin mines, mainly in Europe, started working on a stranger’s account at the same second. This was announced by the Czech company Braiins.
  • The attacker did not break into the miners or the mining pool. He took over the route of data flowing on the Internet and directed it to his own server.
  • The largest single episode involved approximately 1.9 EH/s, or less than 0.2% of the entire network’s power. This does not threaten Bitcoin for now, but the same method works for most miners in the world.

On November 20, over a thousand bitcoin miners across hundreds of networks started working for someone else at the same second. This is how Braiins, a Czech company that runs a mining pool and creates software for excavators, describes the event. The excavators worked normally, but the remuneration for their work went to the attacker’s account.

According to Braiins’ analysis, earlier, between November 7 and 12, the attacker struck mines in Latin America, mainly in Brazil and Argentina. It then covered from 120 to 400 mines at once. On November 20, there were 1,050 to 1,600 of them.

How the attacker took over the excavators without breaking in

The miner connects to the pool via the Internet. The data path is determined by announcements exchanged between network operators. The attacker announced a route to a narrow block of 256 IP addresses where the pool server was located. The routers choose the route to the most detailed block, so the miners’ traffic went to its server. Networks that check routes in the RPKI system rejected the false announcement, but many networks do not. On November 20, the false route appeared four times, for 6 to 49 minutes.

A fake server was waiting on the other side. He accepted any login and password, and delegated ordinary tasks from another large pool to the miners. However, he reported the work performed on his own account. Braiins did not say how many bitcoins the attacker earned, nor did he indicate which pools were impersonated.

The attack was possible because most miners connect to the pool through Stratum V1, a protocol from 2012. It sends data in plain text, and the miner cannot check who is on the other side of the connection. Brainins tested seven types of mining software. Two popular ones have an encryption option, but they accepted invalid certificates, so they could connect with the thief via an encrypted channel. The company’s own software, Brainins OS, rejected invalid certificates in these tests.

Could such an attack threaten bitcoin?

Not yet. The largest episode on November 20 reached approximately 1.9 EH/s. According to mempool.space, the entire network is around 1050 EH/s, so the attacker captured less than 0.2% of its power. The largest pool, Foundry USA, mined 23% of blocks in the last week. Its power is over a hundred times greater.

Logarithmic bar chart: largest attack episode on 11/20 around 1.9 EH/s, Foundry USA pool around 240 EH/s, entire bitcoin network around 1050 EH/s

To rewrite transaction history, i.e. a 51% attack, the attacker would have to control more than half of the network’s power. This is approximately 270 times larger than the largest episode of this attack. Brainins does not describe such a scenario.

However, the pace is worrying. In two weeks, the power absorbed in one episode increased from below 175 PH/s to 1.9 EH/s, i.e. more than tenfold. Braiins called it “testing the waters.” According to the company, the potential target is the vast majority of the world’s mining capacity, because so many miners still use the unsecured Stratum V1.

What does this mean to you

Brainins did not specify which European countries the attack took place on November 20. If you have a miner, check how it connects to the pool. Braiins points to two solutions: Stratum V2 or Stratum V1 with encryption in the software that properly validates the pool certificate. The company has its own interest in this because it sells software and runs a pool, but the problem with the open-source Stratum V1 has been known for years.

For older miners, Braiins has provided a free proxy program, Braiins SV2 Proxy (Linux or Windows via WSL). Excavators connect to it in the local network via the existing protocol, and the program communicates with the pool via Stratum V2. The basics of mining are explained in the cryptocurrency mining guide.