SODA: A Generic Online Detection Framework for Smart Contracts

被引:67
|
作者
Chen, Ting [1 ]
Cao, Rong [1 ]
Li, Ting [1 ]
Luo, Xiapu [2 ]
Gu, Guofei [3 ]
Zhang, Yufei [1 ]
Liao, Zhou [1 ]
Zhu, Hang [1 ]
Chen, Gang [4 ]
He, Zheyuan [1 ]
Tang, Yuxing [1 ]
Lin, Xiaodong [5 ]
Zhang, Xiaosong [1 ]
机构
[1] Univ Elect Sci & Technol China, Ctr Cybersecur, Chengdu, Peoples R China
[2] Hong Kong Polytech Univ, Hong Kong, Peoples R China
[3] Texas A&M Univ, SUCCESS Lab, College Stn, TX 77843 USA
[4] Chengdu Kongdi Technol Inc, Chengdu, Peoples R China
[5] Univ Guelph, Guelph, ON, Canada
基金
美国国家科学基金会; 中国国家自然科学基金; 国家重点研发计划;
关键词
D O I
10.14722/ndss.2020.24449
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Smart contracts have become lucrative and profitable targets for attackers because they can hold a great amount of money. Unfortunately, existing offline approaches for discovering the vulnerabilities in smart contracts or checking the correctness of smart contracts cannot conduct online detection of attacking transactions. Besides, existing online approaches only focus on specific attacks and cannot be easily extended to detect other attacks. Moreover, developing a new online detection system for smart contracts from scratch is time-consuming and requires deep understanding of blockchain internals, thus making it difficult to quickly implement and deploy mechanisms to detect new attacks. In this paper, we propose a novel generic online detection framework named SODA for smart contracts on any blockchains that support Ethereum virtual machine (EVM). SODA distinguishes itself from existing online approaches through its capability, efficiency, and compatibility. First, SODA empowers users to easily develop apps for detecting various attacks online (i.e., when attacks happen) by separating information collection and attack detection with layered design. At the higher layer, SODA provides unified interfaces to develop detection apps against various attacks. At the lower layer, SODA instruments EVM to collect all primitive information necessary to detect various attacks and constructs 11 kinds of structural information for the ease of developing apps. Based on SODA, users can develop new apps in a few lines of code without modifying EVM. Second, SODA is efficient, because we design on-demand information retrieval to reduce the overhead of information collection and adopt dynamic linking to eliminate the overhead of inter-process communication. Such design allows users to develop detection apps using any programming languages that can generate dynamic link libraries. Third, since more and more blockchains adopt EVM as smart contract runtime, SODA can be easily migrated to such blockchains without modifying apps. Based on SODA, we develop 8 detection apps to detect the attacks exploiting major vulnerabilities in smart contracts, and integrate SODA (including all apps) into 3 popular blockchains: Ethereum, Expanse and Wanchain. The extensive experimental results demonstrate the effectiveness and efficiency of SODA and our detection apps.
引用
收藏
页数:17
相关论文
共 50 条
  • [21] Blockumulus: A Scalable Framework for Smart Contracts on the Cloud
    Ivanov, Nikolay
    Yan, Qiben
    Wang, Qingyang
    2021 IEEE 41ST INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS (ICDCS 2021), 2021, : 607 - 617
  • [22] A Generalized Formal Semantic Framework for Smart Contracts
    Jiao, Jiao
    Lin, Shang-Wei
    Sun, Jun
    FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING (FASE 2020), 2020, 12076 : 75 - 96
  • [23] A Framework and DataSet for Bugs in Ethereum Smart Contracts
    Zhang, Pengcheng
    Xiao, Feng
    Luo, Xiapu
    2020 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2020), 2020, : 139 - 150
  • [24] Framework for Architecting Smart Contracts Using Microservices
    Zhang F.-L.
    Hou P.-Y.
    Li S.-S.
    Rong G.-P.
    Li Z.-Y.
    Ding M.-J.
    Ruan Jian Xue Bao/Journal of Software, 2021, 32 (11): : 3423 - 3439
  • [25] Slither: A Static Analysis Framework For Smart Contracts
    Feist, Josselin
    Greico, Gustavo
    Groce, Alex
    2019 IEEE/ACM 2ND INTERNATIONAL WORKSHOP ON EMERGING TRENDS IN SOFTWARE ENGINEERING FOR BLOCKCHAIN (WETSEB 2019), 2019, : 8 - 15
  • [26] An energy trading framework using smart contracts
    Mololoth, Vidya Krishnan
    Ahlund, Christer
    Saguna, Saguna
    2023 IEEE GREEN TECHNOLOGIES CONFERENCE, GREENTECH, 2023, : 214 - 218
  • [27] SmartBugs: A Framework to Analyze Solidity Smart Contracts
    Ferreira, Joao F.
    Cruz, Pedro
    Durieux, Thomas
    Abreu, Rui
    2020 35TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE 2020), 2020, : 1349 - 1352
  • [28] EtherGIS: A Vulnerability Detection Framework for Ethereum Smart Contracts Based on Graph Learning Features
    Zeng, Qingren
    He, Jiahao
    Zhao, Gansen
    Li, Shuangyin
    Yang, Jingji
    Tang, Hua
    Luo, Haoyu
    2022 IEEE 46TH ANNUAL COMPUTERS, SOFTWARE, AND APPLICATIONS CONFERENCE (COMPSAC 2022), 2022, : 1742 - 1749
  • [29] SolAnalyser: A Framework for Analysing and Testing Smart Contracts
    Akca, Sefa
    Rajan, Ajitha
    Peng, Chao
    2019 26TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC), 2019, : 482 - 489
  • [30] Detection of Vulnerabilities of Blockchain Smart Contracts
    He, Daojing
    Wu, Rui
    Li, Xinji
    Chan, Sammy
    Guizani, Mohsen
    IEEE INTERNET OF THINGS JOURNAL, 2023, 10 (14) : 12178 - 12185