who spent my eos on the in security of resource
play

Who Spent My EOS? On the (In)Security of Resource Management of - PowerPoint PPT Presentation

Who Spent My EOS? On the (In)Security of Resource Management of EOS.IO Sangsup Lee , Daejun Kim , Dongkwan Kim, Sooel Son, Yongdae Kim @KAIST 1 Abstract 2K+ Cryptocurrencies 2 Abstract Resource management of EOS.IO 3 Abstract


  1. Who Spent My EOS? 
 On the (In)Security of Resource Management of EOS.IO Sangsup Lee , Daejun Kim , Dongkwan Kim, Sooel Son, Yongdae Kim @KAIST � 1

  2. Abstract 2K+ Cryptocurrencies � 2

  3. Abstract Resource management of EOS.IO � 3

  4. Abstract 4 unique vulnerabilities Resource management of EOS.IO � 4

  5. Abstract Evaluated the impact of each vulnerability 4 unique vulnerabilities Resource management of EOS.IO � 5

  6. Background � 6

  7. Background: Blockchain Overview of cryptocurrency components Consensus Smart contract Blockchain-based Wallet Mining cryptocurrency P2P … Network � 7

  8. Background: Blockchain Key components Consensus Smart contract Blockchain-based Wallet Mining cryptocurrency P2P … Network � 8

  9. Background: Blockchain The fundamentals of blockchain Data (Block) � 9

  10. Background: Blockchain Consensus algorithm Data (Block) Creating blocks � 10

  11. Background: Blockchain Consensus algorithm Data (Block) Creating Verifying 
 blocks blocks � 11

  12. Background: Blockchain Consensus algorithm Data (Block) Creating Verifying 
 Agreement 
 blocks blocks on blocks � 12

  13. Background: PoW (Proof of Work) Consensus algorithm (PoW) Create ... Data (Block) Agree Numerous block producers Slow… Bitcoin Ethereum � 13

  14. Background: DPoS (Delegated Proof of Stake) EOS.IO Consensus algorithm (DPoS) Create Data (Block) Agree Elected 21 Block producers (BP) FAST! (0.5 sec / block) � 14

  15. 
 Background: DPoS (Delegated Proof of Stake) EOS.IO Consensus algorithm (DPoS) Create Data (Block) Agree Elected 21 Block producers (BP) FAST! (0.5 sec / block) But, resource management matters. � 15

  16. Background: DPoS (Delegated Proof of Stake) Resource management necessity User Transaction 
 … requests Blockchain � 16

  17. Background: DPoS (Delegated Proof of Stake) Resource management necessity User Transaction 
 … requests Blockchain Elected 21 Block producers (BP) � 17

  18. Background: DPoS (Delegated Proof of Stake) Resource management necessity … User Overload problem Transaction 
 … Properly process request requests Blockchain Elected 21 Block producers (BP) � 18

  19. Background: Smart contract Smart contract $ Transaction Transaction Transaction Transaction Bob Alice Use Case ▪ Exchange ▪ Gambling ▪ Auction ▪ Funding ▪ Bank ▪ And so on. � 19

  20. Background: Smart contract on EOS.IO $ eBay 
 Alice Bob Contract Transaction ▪ Target (Ex. eBay) ▪ Function (Ex. Bidding(), Selling()) ▪ Permission (Ex. Alice@active) � 20

  21. Background: Smart contract on EOS.IO $ eBay 
 Alice Bob Contract Delegated execution BP � 21

  22. 
 
 Background: Smart contract on EOS.IO $ eBay 
 Alice Bob Contract Delegated Execution Resource management matters Delegated execution BP � 22

  23. Background: Resource of EOS.IO Transaction delivery Program execution Data storing NET CPU RAM � 23

  24. Background: Resource of EOS.IO Transaction delivery Program execution Data storing NET CPU RAM Staking Individuals Blockchain system Refreshed every day � 24

  25. Background: Resource of EOS.IO Transaction delivery Program execution Data storing NET CPU RAM Buy RAM 
 Individuals Market Not refreshed every day. � 25

  26. Why EOS? � 26

  27. Why EOS? Market cap #1 #2 Consensus 
 Smart contract 
 Other research work research research Porosity: A decompiler for Making smart contracts smarter 
 blockchain-based smart The miner's dilemma 
 (ACM CCS '16) contracts bytecode 
 (IEEE S&P '15) (Defcon '17) Be Selfish and Avoid Dilemmas: ZEUS: Analyzing Safety of 
 Hijacking bitcoin: Routing Fork After Withholding (FAW) Smart Contracts 
 attacks on cryptocurrencies 
 Attacks on Bitcoin 
 (NDSS '18) (IEEE S&P '17) (ACM CCS ‘17) teether: Gnawing at ethereum to Publish or perish: A backward- Eclipse attacks on bitcoin’s peer- automatically exploit smart compatible defense against 
 to-peer network 
 contracts 
 selfish mining in bitcoin 
 (USENIX ‘15) (USENIX '18) (RSA ‘17) 2K+ Cryptocurrencies � 27

  28. 
 Why EOS? Rank of 
 Consensus 
 Smart contract Name marketcap algorithm platform 1 Bitcoin PoW X 2 Ethereum PoW O 3 Ripple PoS X 4 Litecoin PoW X 5 Bitcoin cash PoW X 6 Binance Coin X X 7 EOS DPoS O User accounts � 1.3 M 
 ≈ But, no security research in academia. � 28

  29. In our paper… � 29

  30. EOS structure What are new attack targets? Transaction (User) Transaction (SC) Block producer Users program code � 30

  31. EOS structure What are new attack targets? Transaction (User) Transaction (SC) Block producer A B Smart Smart Contract Contract � 31

  32. EOS structure What are new attack targets? Transaction (User) Transaction (SC) Block producer A B Smart Smart Contract Contract [ ]@eosio.code Users � 32

  33. EOS structure What are new attack targets? Transaction (User) Transaction (SC) Block producer A B Smart Smart Contract Contract = [ ]@eosio.code Users Smart Contract Provider (SCP) � 33

  34. EOS structure What are new attack targets? Transaction (User) Transaction (SC) Block producer A B NET NET CPU CPU RAM RAM = [ ]@eosio.code Users Smart Contract Provider (SCP) CPU RAM CPU RAM � 34

  35. Attack Target What are new attack targets? Transaction (User) block creation time Transaction (SC) Block producer A B NET NET CPU CPU RAM RAM = [ ]@eosio.code Users Smart Contract Provider (SCP) CPU RAM CPU RAM � 35

  36. Attack Target What are new attack targets? Transaction (User) block creation time Transaction (SC) Block producer A B NET NET Pay for transaction CPU CPU RAM RAM = [ ]@eosio.code Users Smart Contract Provider (SCP) CPU RAM CPU RAM � 36

  37. Attack Target What are new attack targets? Transaction (User) block creation time Transaction (SC) Block producer A B NET NET Pay for transaction CPU CPU To save data RAM RAM = [ ]@eosio.code Users Smart Contract Provider (SCP) CPU RAM CPU RAM � 37

  38. Attack Target What are new attack targets? Transaction (User) block creation time Transaction (SC) Block producer A B NET NET Pay for transaction CPU CPU To save data RAM RAM = grant permission [ ]@eosio.code to SCP Users Smart Contract Provider (SCP) CPU RAM CPU RAM � 38

  39. Attack Models & Threat Models & Attacks! We found … Transaction (User) Transaction (SC) Block producer A B NET NET CPU CPU RAM RAM = [ ]@eosio.code Users Smart Contract Provider (SCP) CPU RAM CPU RAM � 39

  40. Attack Models & Threat Models & Attacks! We found … Transaction (User) Block delay attack Transaction (SC) Block producer A B NET NET CPU CPU RAM RAM = [ ]@eosio.code Users Smart Contract Provider (SCP) CPU RAM CPU RAM � 40

  41. Attack Models & Threat Models & Attacks! We found … Transaction (User) Block delay attack Transaction (SC) Block producer A B NET NET CPU CPU RAM RAM = CPU-Drain attack [ ]@eosio.code Users Smart Contract Provider (SCP) CPU RAM CPU RAM � 41

  42. Attack Models & Threat Models & Attacks! We found … Transaction (User) Block delay attack Transaction (SC) Block producer A B NET NET CPU CPU RAM RAM = RAM-Drain attack CPU-Drain attack [ ]@eosio.code Users Smart Contract Provider (SCP) CPU RAM CPU RAM � 42

  43. Attack Models & Threat Models & Attacks! We found … Transaction (User) Block delay attack Transaction (SC) Block producer A B NET NET CPU CPU RAM RAM = RAM-Drain attack CPU-Drain attack [ ]@eosio.code Users Smart Contract RAMsomware attack Provider (SCP) CPU RAM CPU RAM � 43

  44. Attack � 44

  45. Block delay attack Block delay attack | DoS by draining EOS resources | RAMsomware attack Block producer Timer (T) 0.5s 0.5s Succeeded state Exhausted state Queue Block Transactions (trx) � 45

  46. Block delay attack Block delay attack | DoS by draining EOS resources | RAMsomware attack Block producer Timer (T) T+0.5s T+0.5s T+0.5s T+0.5s T+0.5s Succeeded state Exhausted state Queue Block Transactions (trx) � 46

  47. Block delay attack Block delay attack | DoS by draining EOS resources | RAMsomware attack Block producer Timer (T) T+0.5s T+0.5s T+0.5s T+0.5s T+0.5s Succeeded state T+0.2 +0.2 +0.2 +0.2 +0.2 Exhausted state Queue Block Transactions (trx) � 47

  48. Block delay attack Block delay attack | DoS by draining EOS resources | RAMsomware attack Block producer Timer (T) T+0.5s T+0.5s T+0.5s T+0.5s T+0.5s Succeeded state T+0.2 +0.2 +0.2 +0.2 +0.2 Exhausted state Queue Block Transactions (trx) � 48

Recommend


More recommend