Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DerbyCon 2017 - Hacking Blockchains

Aaron Hnatiw
September 24, 2017

DerbyCon 2017 - Hacking Blockchains

This talk covers the fundamentals of blockchain technology, and shows how anyone in the security industry can begin hacking and securing blockchain technology and cryptocurrencies.

Aaron Hnatiw

September 24, 2017
Tweet

More Decks by Aaron Hnatiw

Other Decks in Technology

Transcript

  1. Senior Security Researcher, Security Compass Aaron Hnatiw • College professor

    of application security • Developer • System administrator • Security consultant • Network security engineer Twitter: @insp3ctre
  2. Requirements of Bitcoin 1. Private 2. Anonymous 3. Censorship-resistent 4.

    Byzantine attack resilience 5. Decentralized @insp3ctre
  3. How It Works 1. Broadcast 2. Collect 3. Proof-of-work @insp3ctre

    Hash(prev_block_id, transactions, nonce) <= t?
  4. How It Works 1. Broadcast 2. Collect 3. Proof-of-work @insp3ctre

    Hash(prev_block_id, transactions, nonce) <= t? t = 922724699725.9628
  5. How It Works 1. Broadcast 2. Collect 3. Proof-of-work @insp3ctre

    Hash(prev_block_id, transactions, nonce) <= t? t = 922724699725.9628 Odds of being right: 1/(2^256 - t)
 1/(≈ 0.0012 × the number of atoms in the visible universe)
  6. How It Works 1. Broadcast 2. Collect 3. Proof-of-work @insp3ctre

    Hash(prev_block_id, transactions, nonce) <= t? t = 922724699725.9628 Odds of being right: 1/(2^256 - t)
 1/(≈ 0.0012 × the number of atoms in the visible universe)
  7. How It Works 1. Broadcast 2. Collect 3. Proof-of-work 4.

    Broadcast @insp3ctre Hash(prev_block_id, transactions, nonce) <= t? t = 922724699725.9628 Odds of being right: 1/(2^256 - t)
 1/(≈ 0.0012 × the number of atoms in the visible universe)
  8. How It Works 1. Broadcast 2. Collect 3. Proof-of-work 4.

    Broadcast 5. Acceptable? @insp3ctre
  9. How It Works 1. Broadcast 2. Collect 3. Proof-of-work 4.

    Broadcast 5. Acceptable? 6. Reward @insp3ctre
  10. How It Works 1. Broadcast 2. Collect 3. Proof-of-work 4.

    Broadcast 5. Acceptable? 6. Reward 7. Next block @insp3ctre
  11. Altcoins • “Colored coins”: represent shares or asset; built on

    Bitcoin • dogecoin: faster block time @insp3ctre
  12. Altcoins • “Colored coins”: represent shares or asset; built on

    Bitcoin • dogecoin: faster block time • litecoin: higher memory to defeat ASICs @insp3ctre
  13. Altcoins • “Colored coins”: represent shares or asset; built on

    Bitcoin • dogecoin: faster block time • litecoin: higher memory to defeat ASICs • peercoin: first proof-of-stake @insp3ctre
  14. Altcoins • “Colored coins”: represent shares or asset; built on

    Bitcoin • dogecoin: faster block time • litecoin: higher memory to defeat ASICs • peercoin: first proof-of-stake • primecoin: proof is finding special primes for science @insp3ctre
  15. Altcoins • “Colored coins”: represent shares or asset; built on

    Bitcoin • dogecoin: faster block time • litecoin: higher memory to defeat ASICs • peercoin: first proof-of-stake • primecoin: proof is finding special primes for science • darkcoin/dash: 11 different hashing algorithms strung together, trying to defeat ASICs @insp3ctre
  16. Altcoins • “Colored coins”: represent shares or asset; built on

    Bitcoin • dogecoin: faster block time • litecoin: higher memory to defeat ASICs • peercoin: first proof-of-stake • primecoin: proof is finding special primes for science • darkcoin/dash: 11 different hashing algorithms strung together, trying to defeat ASICs • monero: transactions are private @insp3ctre
  17. Altcoins • “Colored coins”: represent shares or asset; built on

    Bitcoin • dogecoin: faster block time • litecoin: higher memory to defeat ASICs • peercoin: first proof-of-stake • primecoin: proof is finding special primes for science • darkcoin/dash: 11 different hashing algorithms strung together, trying to defeat ASICs • monero: transactions are private • Zcash: zero-knowledge proofs; completely anonymous, thus very popular with ransomware @insp3ctre
  18. Other uses • Voting • Tracking digital assets • Tracking

    physical goods • Commodities @insp3ctre
  19. Other uses • Voting • Tracking digital assets • Tracking

    physical goods • Commodities • “Pegged sidechains” @insp3ctre
  20. Other uses • Voting • Tracking digital assets • Tracking

    physical goods • Commodities • “Pegged sidechains” • Decentralized file storage @insp3ctre
  21. Smart contract analysis tools @insp3ctre • Porosity • evmdis •

    Securify • Oyente • Dr. Y's Ethereum Contract Analyzer
  22. The usual suspects @insp3ctre • Hacked website, funding address swapped

    before ICO (Coindash) • SQLi (Coinwallet; service shut down after)
  23. The usual suspects @insp3ctre • Hacked website, funding address swapped

    before ICO (Coindash) • SQLi (Coinwallet; service shut down after) • Insider threat (Shapeshift.io)
  24. The usual suspects @insp3ctre • Hacked website, funding address swapped

    before ICO (Coindash) • SQLi (Coinwallet; service shut down after) • Insider threat (Shapeshift.io) • Backdoor in dependency code (Cryptsy)
  25. The usual suspects @insp3ctre • Hacked website, funding address swapped

    before ICO (Coindash) • SQLi (Coinwallet; service shut down after) • Insider threat (Shapeshift.io) • Backdoor in dependency code (Cryptsy) • Spearphishing (Bitpay)
  26. The usual suspects @insp3ctre • Hacked website, funding address swapped

    before ICO (Coindash) • SQLi (Coinwallet; service shut down after) • Insider threat (Shapeshift.io) • Backdoor in dependency code (Cryptsy) • Spearphishing (Bitpay) • Wordpress hack, pivot to database access (Allcrypt)
  27. The usual suspects @insp3ctre • Hacked website, funding address swapped

    before ICO (Coindash) • SQLi (Coinwallet; service shut down after) • Insider threat (Shapeshift.io) • Backdoor in dependency code (Cryptsy) • Spearphishing (Bitpay) • Wordpress hack, pivot to database access (Allcrypt) • Web application race condition (Cryptoine)