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 条
  • [1] SODA: A Generic Online Detection Framework for Smart Contracts
    Chen, Ting
    Cao, Rong
    Li, Ting
    Luo, Xiapu
    Gu, Guofei
    Zhang, Yufei
    Liao, Zhou
    Zhu, Hang
    Chen, Gang
    He, Zheyuan
    Tang, Yuxing
    Lin, Xiaodong
    Zhang, Xiaosong
    28TH ANNUAL NETWORK AND DISTRIBUTED SYSTEM SECURITY SYMPOSIUM (NDSS 2021), 2021,
  • [2] Power and Pitfalls of Generic Smart Contracts
    University of Verona, Dept. of Computer Science, Italy
    Int. Conf. Blockchain Comput. Appl., BCCA, 1600, (179-186):
  • [3] On the use of generic types for smart contracts
    Spoto, Fausto
    Migliorini, Sara
    Gambini, Mauro
    Benini, Andrea
    CLUSTER COMPUTING-THE JOURNAL OF NETWORKS SOFTWARE TOOLS AND APPLICATIONS, 2023, 26 (04): : 2099 - 2113
  • [4] Power and Pitfalls of Generic Smart Contracts
    Benini, Andrea
    Gambini, Mauro
    Migliorini, Sara
    Spoto, Fausto
    2021 THIRD INTERNATIONAL CONFERENCE ON BLOCKCHAIN COMPUTING AND APPLICATIONS (BCCA), 2021, : 179 - 186
  • [5] On the use of generic types for smart contracts
    Fausto Spoto
    Sara Migliorini
    Mauro Gambini
    Andrea Benini
    Cluster Computing, 2023, 26 : 2099 - 2113
  • [6] An Elasticity Framework for Smart Contracts
    Dustdar, Schahram
    Maria Garcia, Jose
    Fernandez, Pablo
    Ruiz-Cortes, Antonio
    2021 IEEE INTERNATIONAL CONFERENCE ON SMART DATA SERVICES (SMDS 2021), 2021, : 244 - 248
  • [7] Online Detection of Effectively Callback Free Objects with Applications to Smart Contracts
    Grossman, Shelly
    Abraham, Ittai
    Golan-Gueta, Guy
    Michalevsky, Yan
    Rinetzky, Noam
    Sagiv, Mooly
    Zohar, Yoni
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [8] LIREM: A Generic Framework for Effective Online Video Novelty Detection
    He, Chengkun
    Zhou, Xiangmin
    Wang, Chen
    CONCEPTUAL MODELING (ER 2022), 2022, 13607 : 145 - 160
  • [9] SmartBugs 2.0: An Execution Framework for Weakness Detection in Ethereum Smart Contracts
    di Angelo, Monika
    Durieux, Thomas
    Ferreira, Joao F.
    Salzer, Gernot
    2023 38TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE, 2023, : 2102 - 2105
  • [10] ADEFGuard: Anomaly detection framework based on Ethereum smart contracts behaviours
    Ndiaye, Malaw
    Diallo, Thierno Ahmadou
    Konate, Karim
    BLOCKCHAIN-RESEARCH AND APPLICATIONS, 2023, 4 (03):