Lune

FSE2023顶会

DeepInfer: Deep Type Inference from Smart Contract Bytecode

Kunsong Zhao, Zihao Li, Jianfeng Li, He Ye, Xiapu Luo, Ting Chen

摘要

Smart contracts play an increasingly important role in Ethereum platform. It provides various functions implementing numerous services, whose bytecode runs on Ethereum Virtual Machine. To use services by invoking corresponding functions, the callers need to know the function signatures. Moreover, such signatures provide crucial information for many downstream applications, e.g., identifying smart contracts, fuzzing, detecting vulnerabilities, etc. However, it is challenging to infer function signatures from the bytecode due to a lack of type information. Existing work solving this problem depended heavily on limited databases or hard-coded heuristic patterns. However, these approaches are hard to be adapted to semantic differences in distinct languages and various compiler versions when developing smart contracts. In this paper, we propose a novel framework DeepInfer that first leverages deep learning techniques to automatically infer function signatures and returns. The novelties of DeepInfer are: 1) DeepInfer lifts the bytecode into the Intermediate Representation (IR) to preserve code semantics; 2) DeepInfer extracts the type-related knowledge (e.g., critical data flows, constant values, and control flow graphs) from the IR to recover function signatures and returns. We conduct experiments on Solidity and Vyper smart contracts and the results show that DeepInfer performs faster and more accurate than existing tools, while being immune to changes in different languages and various compiler versions.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Nurgle: Exacerbating Resource Consumption in Blockchain State Storage via MPT Manipulation 引用了 Demystifying DeFi MEV Activities in Flashbots Bundle
  • COBRA: Interaction-Aware Bytecode-Level Vulnerability Detector for Smart Contracts 引用了 Learning to Fuzz from Symbolic Execution with Application to Smart Contracts
  • Are We There Yet? Unraveling the State-of-the-Art Smart Contract Fuzzers 引用了 Demystifying DeFi MEV Activities in Flashbots Bundle
  • Are We There Yet? Unraveling the State-of-the-Art Smart Contract Fuzzers 引用了 Learning to Fuzz from Symbolic Execution with Application to Smart Contracts
  • Towards Automatic Discovery of Denial of Service Weaknesses in Blockchain Resource Models 引用了 Nurgle: Exacerbating Resource Consumption in Blockchain State Storage via MPT Manipulation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper12

  1. Demystifying DeFi MEV Activities in Flashbots BundleZihao Li, Jianfeng Li, Zheyuan He, Xiapu Luo 等CCS 2023 · 29 次引用
  2. Are We There Yet? Unraveling the State-of-the-Art Smart Contract FuzzersShuohan Wu, Zihao Li, Luyi Yan, Weimin Chen 等ICSE 2024 · 24 次引用
  3. Nurgle: Exacerbating Resource Consumption in Blockchain State Storage via MPT ManipulationZheyuan He, Zihao Li, Ao Qiao, Xiapu Luo 等S&P 2024 · 21 次引用
  4. COBRA: Interaction-Aware Bytecode-Level Vulnerability Detector for Smart ContractsWenkai Li, Xiaoqi Li, Zongwei Li, Yuqing ZhangASE 2024 · 4 次引用
  5. Towards Automatic Discovery of Denial of Service Weaknesses in Blockchain Resource ModelsFeng Luo, Huangkun Lin, Zihao Li, Xiapu Luo 等CCS 2024 · 4 次引用

它引用的 Paper19

  1. Unsupervised Translation of Programming LanguagesBaptiste Rozière, Marie-Anne Lachaux, Lowik Chanussot, Guillaume LampleNeurIPS 2020 · 606 次引用
  2. Learning to Fuzz from Symbolic Execution with Application to Smart ContractsJingxuan He, Mislav Balunovic, Nodar Ambroladze, Petar Tsankov 等CCS 2019 · 288 次引用
  3. Retrieval-based neural source code summarizationJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun 等ICSE 2020 · 242 次引用
  4. Neural Nets Can Learn Function Type Signatures From BinariesZheng Leong Chua, Shiqi Shen, Prateek Saxena, Zhenkai LiangUSENIX Security 2017 · 175 次引用
  5. MAVEN: A Massive General Domain Event Detection DatasetXiaozhi Wang, Ziqi Wang, Xu Han, Wangyi Jiang 等EMNLP 2020 · 143 次引用

相关 Paper

  1. BugSweeper: Function-Level Detection of Smart Contract Vulnerabilities Using Graph Neural NetworksUisang Lee, Changhoon Chung, Junmo Lee, Soo-Mook MoonAAAI 2026
  2. Smart Learning to Find Dumb ContractsTamer Abdelaziz, Aquinas HoborUSENIX Security 2023
  3. Recasting Type Hints from WebAssembly ContractsKunsong Zhao, Zihao Li, Weimin Chen, Xiapu Luo 等FSE 2025 · 2 次引用
  4. Reentrancy Vulnerability Detection and Localization: A Deep Learning Based Two-phase ApproachZhuo Zhang, Yan Lei, Meng Yan, Yue Yu 等ASE 2022 · 56 次引用
  5. Smarter Contracts: Detecting Vulnerabilities in Smart Contracts with Deep Transfer LearningChristoph Sendner, Huili Chen, Hossein Fereidooni, Lukas Petzi 等NDSS 2023
黄昏的海面,两侧是细线勾勒的悬崖