The University of Sydney Page 1
How to Hack Blockchain Systems Parinya Ekparinya Vincent Gramoli - - PowerPoint PPT Presentation
How to Hack Blockchain Systems Parinya Ekparinya Vincent Gramoli - - PowerPoint PPT Presentation
How to Hack Blockchain Systems Parinya Ekparinya Vincent Gramoli Guillaume Jourjon The University of Sydney Page 1 Blockchain Block #41 Block #42 Block #43 Block #44 Proof: Proof: Proof: Proof: 0xd00d1e 0xc0ffee 0xf00baa
The University of Sydney Page 2
Block #42 Proof: 0xc0ffee… Parent Proof: 0xd00d1e… Block #44 Proof: 0xfabfab… Parent Proof: 0xf00baa… TX: Mallory -> Bob Block #43 Proof: 0xf00baa… Parent Proof: 0xc0ffee… TX: Ted -> Alice TX: Mallory -> Alice Block #41 Proof: 0xd00d1e… Parent Proof: 0xf00baa…
Blockchain
TX: Alice -> Bob
The University of Sydney Page 3
Block #42 Proof: 0xc0ffee… Parent Proof: 0xd00d1e… Block #44 Proof: 0xfabfab… Parent Proof: 0xf00baa… TX: Mallory -> Bob Block #43 Proof: 0xf00baa… Parent Proof: 0xc0ffee… TX: Ted -> Alice TX: Mallory -> Alice Block #41 Proof: 0xd00d1e… Parent Proof: 0xf00baa…
Blockchain
TX: Alice -> Bob
The University of Sydney Page 4
The University of Sydney Page 5
The University of Sydney Page 6
$ 10
The University of Sydney Page 7
$ 10
The University of Sydney Page 8
$ 10 $ 10
The University of Sydney Page 9
$ 10 $ 10
The University of Sydney Page 10
$ 10 $ 10
The University of Sydney Page 11
$ 10 $ 10
The University of Sydney Page 12
$ 10 $ 10
The University of Sydney Page 13
$ 10
What da h…
The University of Sydney Page 14
The University of Sydney Page 15
Q: is it possible to double spend on Ethereum with network attacks?
The University of Sydney Page 16
Approaches to study … – Goals:
- 1. How the blockchain system decide a block?
- 2. How the blockchain system resolve fork?
The University of Sydney Page 17
Approaches to study … – Goals:
- 1. How the blockchain system decide a block?
- 2. How the blockchain system resolve fork?
– Reading the documentation
– Scattered and un-organised information: website, wiki, github, issue tracker, yellow paper , etc. – Lack of necessary information – Intention ≠ Actual implementation
– Reading the code !! – Running it for real because the devil is in the detail …
The University of Sydney Page 18
Decided Blocks and Committed Transactions in PoW/Ethereum
– Given a blockchain with parameter k, a block at index i is decided when the chain depth reaches i+k – A transaction is committed if it belongs to a decided block
Ekparinya et al, "Impact of Man-in-the-middle Attacks on Ethereum"
1 i i+1 i+k i+k-1 Decided block Transaction Undecided block
The University of Sydney Page 19
Expected Branch Selection in PoW/Ethereum: GHOST
The University of Sydney Page 20
Expected Branch Selection in PoW/Ethereum: GHOST
The University of Sydney Page 21
Actual Branch Selection in PoW/Ethereum: Highest total difficulty
The University of Sydney Page 22
Actual Branch Selection in PoW/Ethereum: Highest total difficulty
The University of Sydney Page 23
Example 1: Man-in-the-middle Attack against PoW
The University of Sydney Page 24
Example 1: Man-in-the-middle Attack against PoW
The University of Sydney Page 25
Example 1: Man-in-the-middle Attack against PoW
The University of Sydney Page 26
Example 1: Man-in-the-middle Attack against PoW
The University of Sydney Page 27
Example 1: Man-in-the-middle Attack against PoW
The University of Sydney Page 31
Decided Blocks and Committed Transactions in AuRa PoA/Ethereum
– A decision requires strictly more than half, only one partition may decide blocks Can decide a block
The University of Sydney Page 32
Branch Selection in AuRa PoA/Ethereum : Longest branch
The University of Sydney Page 33
Branch Selection in AuRa PoA/Ethereum : Longest branch
The University of Sydney Page 34
Example 2: The Cloning Attack against PoA
The University of Sydney Page 35
Example 2: The Cloning Attack against PoA
The University of Sydney Page 36
Example 2: The Cloning Attack against PoA
The University of Sydney Page 37
Example 2: The Cloning Attack against PoA
The University of Sydney Page 38
Example 2: The Cloning Attack against PoA
The University of Sydney Page 39
The requirements for the experiments
– Control over computing resources – Network control and isolation – Highly automated – Robust data collection ➢ OpenStack Private Cloud ➢ Virtual switches, Virtual routers (Quagga) and VLAN ➢ OpenStack API and Ethereum API ➢ Elasticsearch
The University of Sydney Page 40
Testbed Provisioning
The University of Sydney Page 41
Testbed Provisioning
The University of Sydney Page 42
Testbed Provisioning
The University of Sydney Page 43
Testbed Provisioning
The University of Sydney Page 44