skip to main content
10.1145/3243734.3243780acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article

Securify: Practical Security Analysis of Smart Contracts

Published:15 October 2018Publication History

ABSTRACT

Permissionless blockchains allow the execution of arbitrary programs (called smart contracts), enabling mutually untrusted entities to interact without relying on trusted third parties. Despite their potential, repeated security concerns have shaken the trust in handling billions of USD by smart contracts. To address this problem, we present Securify, a security analyzer for Ethereum smart contracts that is scalable, fully automated, and able to prove contract behaviors as safe/unsafe with respect to a given property. Securify's analysis consists of two steps. First, it symbolically analyzes the contract's dependency graph to extract precise semantic information from the code. Then, it checks compliance and violation patterns that capture sufficient conditions for proving if a property holds or not. To enable extensibility, all patterns are specified in a designated domain-specific language. Securify is publicly released, it has analyzed >18K contracts submitted by its users, and is regularly used to conduct security audits by experts. We present an extensive evaluation of Securify over real-world Ethereum smart contracts and demonstrate that it can effectively prove the correctness of smart contracts and discover critical violations.

Skip Supplemental Material Section

Supplemental Material

p67-tsankov.mp4

mp4

432.3 MB

References

  1. 2016. The DAO Attacked: Code Issue Leads to 60 Million Ether Theft. (2016).Google ScholarGoogle Scholar
  2. 2016. Etherdice. (2016). Available from: https://etherdice.io/.Google ScholarGoogle Scholar
  3. 2016. King of Ether. (2016). Available from: https://github.com/kieranelby/ KingOfTheEtherThrone/blob/v0.4.0/contracts/KingOfTheEtherThrone.sol.Google ScholarGoogle Scholar
  4. 2016. King of Ether, Postmortem. (2016). Available from: https://www. kingoftheether.com/postmortem.html.Google ScholarGoogle Scholar
  5. 2016. Reentrancy Woes in Smart Contracts. (2016). Available from: http: //hackingdistributed.com/2016/07/13/reentrancy-woes/.Google ScholarGoogle Scholar
  6. 2016. theDAO. (2016). Available from: https://etherscan.io/address/ 0xbb9bc244d798123fde783fcc1c72d3bb8c189413.Google ScholarGoogle Scholar
  7. 2017. Accidental bug may have frozen $280 million worth of digital coin ether in a cryptocurrency wallet. (2017). Available from: https://www.cnbc.com/2017/11/ 08/accidental-bug-may-have-frozen...Google ScholarGoogle Scholar
  8. 2017. Blockchain is empowering the future of insurance. (2017). Available from: https://techcrunch.com/2016/10/29/ blockchain-is-empowering-the-future-of-insurance/.Google ScholarGoogle Scholar
  9. 2017. ETHLance. (2017). Available from: http://ethlance.com/.Google ScholarGoogle Scholar
  10. 2017. An In-Depth Look at the Parity Multisig Bug. (2017). Available from: http://hackxingdistributed.com/2017/07/22/deep-dive-parity-bug.Google ScholarGoogle Scholar
  11. 2017. Northern Trust uses blockchain for private equity recordkeeping. (2017). Available from: http://www.reuters.com/article/ nthern-trust-ibm-blockchain-idUSL1N1G61TX.Google ScholarGoogle Scholar
  12. 2017. Parity Ethereum Client. (2017). Available from: https://github.com/ paritytech/parity.Google ScholarGoogle Scholar
  13. 2017. Security Alert. (2017). Available from: https://paritytech.io/blog/ security-alert.html.Google ScholarGoogle Scholar
  14. 2017. Submarine Sends: IC3's Plan to Clamp Down on ICO Cheats. (2017). Available from: https://www.coindesk.com/ submarine-sends-inside-ic3s-plan-to-clamp-...Google ScholarGoogle Scholar
  15. 2018. Ethereum Smart Contract Security Best Practices. (2018). Available from: https://consensys.github.io/smart-contract-best-practices/.Google ScholarGoogle Scholar
  16. 2018. Mythril. (2018). Available from: https://github.com/ConsenSys/mythril.Google ScholarGoogle Scholar
  17. 2018. Parity Wallet Library. (2018). Available from: https://github.com/ paritytech/parity/blob/4d08e7b0aec46443bf26547b17d10cb302672835/js/src/ contracts/snippets/enhanced-wallet.sol.Google ScholarGoogle Scholar
  18. 2018. Solidity, high-level language for writing smart contracts. (2018). Available from: https://solidity.readthedocs.io/en/develop/.Google ScholarGoogle Scholar
  19. Nicola Atzei, Massimo Bartoletti, and Tiziana Cimoli. 2017. A Survey of Attacks on Ethereum Smart Contracts (SoK). In Principles of Security and Trust - 6th International Conference, POST. 164--186. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Massimo Bartoletti, Salvatore Carta, Tiziana Cimoli, and Roberto Saia. 2017. Dissecting Ponzi schemes on Ethereum: identification, analysis, and impact. CoRR abs/1703.03779 (2017).Google ScholarGoogle Scholar
  21. Karthikeyan Bhargavan, Antoine Delignat-Lavaud, Cédric Fournet, Anitha Gollamudi, Georges Gonthier, Nadim Kobeissi, Natalia Kulatova, Aseem Rastogi, Thomas Sibut-Pinote, Nikhil Swamy, and Santiago Zanella-Béguelin. 2016. Formal Verification of Smart Contracts: Short Paper. In Proceedings of the 2016 ACM Workshop on Programming Languages and Analysis for Security (PLAS). 91--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Giancarlo Bigi, Andrea Bracciali, Giovanni Meacci, and Emilio Tuosto. 2015. Validation of Decentralised Smart Contracts Through Game Theory and Formal Methods. In Programming Languages with Applications to Biology and Security. 142--161.Google ScholarGoogle Scholar
  23. Martin Bravenboer and Yannis Smaragdakis. 2009. Strictly Declarative Specification of Sophisticated Points-to Analyses. In Proceedings of the 24th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). 243--262. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Vitalik Buterin. 2013. Ethereum: a next generation smart contract and decentralized application platform. (2013). Available from: https://github.com/ethereum/ wiki/wiki/White-Paper.Google ScholarGoogle Scholar
  25. Vitalik Buterin. 2016. Thinking About Smart Contract Security. (2016). Available from: https://blog.ethereum.org/2016/06/19/thinking-smart-contract-security/.Google ScholarGoogle Scholar
  26. Pawel Bylica. 2017. How to Find $10M Just by Reading the Blockchain. (Apr 2017). Available from: https://blog.golemproject.net/ how-to-find-10m-by-just-reading-blockchain-6ae9d39fcd95.Google ScholarGoogle Scholar
  27. Ting Chen, Xiaoqi Li, Xiapu Luo, and Xiaosong Zhang. 2017. Under-optimized smart contracts devour your money. In Software Analysis, Evolution and Reengineering (SANER). 442--446.Google ScholarGoogle Scholar
  28. Kevin Delmolino, Mitchell Arnett, Ahmed Kosba, Andrew Miller, and Elaine Shi. 2016. Step by Step Towards Creating a Safe Smart Contract: Lessons and Insights from a Cryptocurrency Lab. In Financial Cryptography and Data Security (FC). 79--94.Google ScholarGoogle Scholar
  29. Yoshihiko Futamura. 1999. Partial Evaluation of Computation Process - An Approach to a Compiler-Compiler. Higher-Order and Symbolic Computation 12, 4 (1999), 381--391. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Ilya Grishchenko, Matteo Maffei, and Clara Schneidewind. 2018. A Semantic Framework for the Security Analysis of Ethereum Smart Contracts. In Principles of Security and Trust - 7th International Conference (POST). 243--269.Google ScholarGoogle Scholar
  31. Shelly Grossman, Ittai Abraham, Guy Golan-Gueta, Yan Michalevsky, Noam Rinetzky, Mooly Sagiv, and Yoni Zohar. 2018. Online detection of effectively callback free objects with applications to smart contracts. PACMPL 2, POPL (2018), 48:1--48:28. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Everett Hildenbrandt, Manasvi Saxena, Nishant Rodrigues, Xiaoran Zhu, Philip Daian, Dwight Guth, Brandon M. Moore, Daejun Park, Yi Zhang, Andrei Stefanescu, and Grigore Rosu. 2018. KEVM: A Complete Formal Semantics of the Ethereum Virtual Machine. In 31st IEEE Computer Security Foundations Symposium (CSF). 204--217.Google ScholarGoogle Scholar
  33. Yoichi Hirai. 2016. Formal verification of Deed contract in Ethereum name service. Technical Report. Available from: https://yoichihirai.com/deed.pdf.Google ScholarGoogle Scholar
  34. Yoichi Hirai. 2017. Defining the Ethereum Virtual Machine for Interactive Theorem Provers. In Financial Cryptography and Data Security (FC). 520--535.Google ScholarGoogle Scholar
  35. Andrew Johnson, LucasWaye, Scott Moore, and Stephen Chong. 2015. Exploring and Enforcing Security Guarantees via Program Dependence Graphs. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). 291--302. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Herbert Jordan, Bernhard Scholz, and Pavle Subotic. 2016. Soufflé: On Synthesis of Program Analyzers. In Computer Aided Verification - 28th International Conference (CAV). 422--430.Google ScholarGoogle Scholar
  37. Sukrit Kalra, Seep Goel, Mohan Dhawan, and Subodh Sharma. 2018. ZEUS: Analyzing Safety of Smart Contracts. In 25th Annual Network and Distributed System Security Symposium (NDSS).Google ScholarGoogle Scholar
  38. Ahmed E. Kosba, Andrew Miller, Elaine Shi, Zikai Wen, and Charalampos Papamanthou. 2016. Hawk: The Blockchain Model of Cryptography and Privacy- Preserving Smart Contracts. In IEEE Symposium on Security and Privacy (SP). 839--858.Google ScholarGoogle Scholar
  39. Loi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena, and Aquinas Hobor. 2016. Making Smart Contracts Smarter. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security (CCS). 254--269. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Magnus Madsen, Ming-Ho Yee, and Ondrej Lhoták. 2016. From Datalog to flix: a declarative language for fixed points on lattices. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI). 194--208. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Ravi Mangal, Xin Zhang, Aditya V. Nori, and Mayur Naik. 2015. A user-guided approach to program analysis. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE). 462--473. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Michael C. Martin, V. Benjamin Livshits, and Monica S. Lam. 2005. Finding application errors and security flaws using PQL: a program query language. In Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). 365--383. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Satoshi Nakamoto. 2008. Bitcoin: A peer-to-peer electronic cash system. (2008).Google ScholarGoogle Scholar
  44. Ivica Nikolic, Aashish Kolluri, Ilya Sergey, Prateek Saxena, and Aquinas Hobor. 2018. Finding The Greedy, Prodigal, and Suicidal Contracts at Scale. CoRR abs/1802.06038 (2018).Google ScholarGoogle Scholar
  45. Todd A. Proebsting and Scott A.Watterson. 1997. Krakatoa: Decompilation in Java (Does Bytecode Reveal Source?). In Third USENIX Conference on Object-Oriented Technologies and Systems (COOTS). 185--198. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Grigore Roşu and Traian Florin Şerbănută. 2010. An Overview of the K Semantic Framework. Journal of Logic and Algebraic Programming 79, 6 (2010), 397--434.Google ScholarGoogle ScholarCross RefCross Ref
  47. Pablo Lamela Seijas, Simon Thompson, and Darryl McAdams. 2016. Scripting smart contracts for distributed ledger technology. IACR Cryptology ePrint Archive 2016 (2016).Google ScholarGoogle Scholar
  48. Gagandeep Singh, Markus Püschel, and Martin Vechev. 2017. Fast Polyhedra Abstract Domain. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL). 46--59. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Yannis Smaragdakis and Martin Bravenboer. 2010. Using Datalog for Fast and Easy Program Analysis. In Datalog Reloaded - First International Workshop, Datalog. 245--251. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Jeffrey D. Ullman. 1988. Principles of Database and Knowledge-base Systems, Vol. I. Principles of computer science series, Vol. 14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Raja Vallee-Rai and Laurie J. Hendren. 1998. Jimple: Simplifying Java Bytecode for Analyses and Transformations. (1998).Google ScholarGoogle Scholar
  52. Gavin Wood. 2014. Ethereum: A secure decentralised generalised transaction ledger. Ethereum Project Yellow Paper (2014).Google ScholarGoogle Scholar
  53. Xin Zhang, Ravi Mangal, Radu Grigore, Mayur Naik, and Hongseok Yang. 2014. On abstraction refinement for program analyses in Datalog. In ACM SIGPLAN Conference on Programming Language Design and Implementation, (PLDI). 239-- 248. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Securify: Practical Security Analysis of Smart Contracts

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        CCS '18: Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security
        October 2018
        2359 pages
        ISBN:9781450356930
        DOI:10.1145/3243734

        Copyright © 2018 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 15 October 2018

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        CCS '18 Paper Acceptance Rate134of809submissions,17%Overall Acceptance Rate1,261of6,999submissions,18%

        Upcoming Conference

        CCS '24
        ACM SIGSAC Conference on Computer and Communications Security
        October 14 - 18, 2024
        Salt Lake City , UT , USA

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader