1. its identity,
2. the job id
3. the timestamp
4. ExtraNonce2
5. nonce
From this the pool manager needs to recompute
the whole block header (all the other data were previ-
ously provided by him) and check that it has for ex-
ample at least 41 leading zeros.
5.6 Attack Feasibility Analysis
In this protocol the exact block used by the miner
is entirely determined by the pool manager and the
miners can change only a bit more than 8 bytes: Ex-
traNonce2, nonce, and potentially he could also gen-
erate an inaccurate timestamp (not recommended as
the pool manager could simply have a policy to reject
such shares).
Importantly, this prototype contains also a num-
ber of Merkle branches and it appears that all of them
must be used and the miner has no choice (at least this
was claimed by BTCGuild pool). We have checked 4
prominent pools: Eligius, Bitminter, Ghash and Dis-
cusFish, we have recorded the data exchaned with the
remote server when mining with these 4 pools. In all
the 4 cases we observed that the miner is given typi-
cally up to 11 hashes to form a Merkle tree. Individual
hundreds of hashes which form the whole Merkle tree
are NOT provided.
However another important element is provided.
In all the cases the previous hash is sent in cleartext.
If only instead H0 value was sent to the controller, as
suggested in Section 4, the possibilities for manipu-
lation would be very substantial. Given the previous
hash the miner can detect if there is an attack. He
needs to record incoming packets with method be-
ing ”mining.notify” and check if the second param-
eter after ”params” is the hash of the last block in the
blockchain. However the detection is not easy: Un-
happily most miners will not do these checks. This
typically requires specialized hardware (a Network
Tap) and software (e.g. Wireshark) to sniff network
packets. Therefore in practice miners could can still
be abused at any moment and maybe the attack, which
would be rather of short duration (a small multiple of
10 minutes) would not be detected.
We conclude that there isn’t currently a possibil-
ity for fraud such as 51 % attacks which would be im-
possible to detect without deviating substantially from
the widely used Stratum protocol.
6 CONCLUSION
In this paper we have looked at the question of miner
attacks with temporary displacement of hash power
in bitcoin digital currency. In early 2012 the Stratum
protocol has taken a deliberate decision to shift the
power of selecting which transactions are included
in blocks from miners to pool managers. This deci-
sion has stripped miners from the ability to decide on
which block they mine. In addition in Section 4 we
show that due to the technicalities in the exact hash-
ing mechanism in bitcoin, it is possible to design a
malicious mining protocol such that the attack cannot
be detected, not even in theory. However our attack
remains theoretical. Could the attack work with the
exact Stratum protocol as it is used in practice? In
this paper we have studied this protocol in details in
order to see if this type of attack could or not be im-
plemented in practice. We have analysed data sniffed
in the operation of 4 prominent bitcoin mining pools.
We have found that Stratum operates in such a way
that the attack COULD be detected if only miners do
the effort. They would need to permanently monitor
the packets exchanged over the network and check if
the hash of the previous block is correct.
This does NOT mean that the attack will be de-
tected, as most miners just mine and do not inspect
the data exchanged in the network. However the most
subversive man-in-the middle attacks such as our at-
tack of Section 4 are NOT facilitated with the cur-
rent protocol. We recommend that miners should be
very careful when mining with proprietary protocols
other than Stratum or in non-standard mining config-
urations as potentially they could be a part of a large
scale attack.
In this research we have discovered two quite sur-
prising things. First of all, the security of bitcoin
against double-spending attacks is now beyond the
scope of the strict open-source system and code cre-
ated by Satoshi, it depends on additional protocols
specified later. When Stratum was specified, it took
a critical decision to shift the decision of which trans-
actions are mined to the pools. This is precisely
what has led to the current excessive centralization
of bitcoin. Consequently bitcoin is no longer ex-
actly a decentralized open-source system. Crucial de-
cisions about the content of the bitcoin blockchain
now depend on a number of powerful stake holders
with vested interests Bitcoin is no longer a transpar-
ent open source system either. The software used by
pool managers is not open source, and for example
highly subversive forms of a 51 % attack (cf. Section
4) could be executed if some closed-source ASIC con-
trollers would have hidden commands which would
ICISSP2015-1stInternationalConferenceonInformationSystemsSecurityandPrivacy
104