Lune

FSE2021顶会

StateFormer: fine-grained type recovery from binaries using generative state modeling

Kexin Pei, Jonas Guan, Matthew Broughton, Zhongtian Chen, Songchen Yao, David Williams-King, Vikas Ummadisetty, Junfeng Yang, Baishakhi Ray, Suman Jana

摘要

Binary type inference is a critical reverse engineering task supporting many security applications, including vulnerability analysis, binary hardening, forensics, and decompilation. It is a difficult task because source-level type information is often stripped during compilation, leaving only binaries with untyped memory and register accesses. Existing approaches rely on hand-coded type inference rules defined by domain experts, which are brittle and require nontrivial effort to maintain and update. Even though machine learning approaches have shown promise at automatically learning the inference rules, their accuracy is still low, especially for optimized binaries.

We present STATEFORMER, a new neural architecture that is adept at accurate and robust type inference. STATEFORMER follows a twostep transfer learning paradigm. In the pretraining step, the model is trained with Generative State Modeling (GSM), a novel task that we design to teach the model to statically approximate execution effects of assembly instructions in both forward and backward directions. In the finetuning step, the pretrained model learns to use its knowledge of operational semantics to infer types.

We evaluate STATEFORMER's performance on a corpus of 33 popular open-source software projects containing over 1.67 billion variables of different types. The programs are compiled with GCC and LLVM over 4 optimization levels O0-O3, and 3 obfuscation passes based on LLVM. Our model significantly outperforms stateof-the-art ML-based tools by 14.6% in recovering types for both function arguments and variables. Our ablation studies show that GSM improves type inference accuracy by 33%.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis 引用了 A Tough Call: Mitigating Advanced Code-Reuse Attacks at the Binary Level
  • Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • Finding the dwarf: recovering precise types from WebAssembly binaries 引用了 Neural Nets Can Learn Function Type Signatures From Binaries
  • Finding the dwarf: recovering precise types from WebAssembly binaries 引用了 Debin: Predicting Debug Information in Stripped Binaries
  • A Taxonomy of C Decompiler Fidelity Issues 引用了 Debin: Predicting Debug Information in Stripped Binaries
  • A Taxonomy of C Decompiler Fidelity Issues 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • DeepInfer: Deep Type Inference from Smart Contract Bytecode 引用了 Finding the dwarf: recovering precise types from WebAssembly binaries
  • DeepInfer: Deep Type Inference from Smart Contract Bytecode 引用了 Neural Nets Can Learn Function Type Signatures From Binaries
  • Neural Nets Can Learn Function Type Signatures From Binaries 引用了 A Tough Call: Mitigating Advanced Code-Reuse Attacks at the Binary Level
  • Debin: Predicting Debug Information in Stripped Binaries 引用了 Neural Nets Can Learn Function Type Signatures From Binaries
  • Debin: Predicting Debug Information in Stripped Binaries 引用了 SOK: (State of) The Art of War: Offensive Techniques in Binary Analysis
  • SymLM: Predicting Function Names in Stripped Binaries via Context-Sensitive Execution-Aware Code Embeddings 引用了 Debin: Predicting Debug Information in Stripped Binaries
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper35

  1. SymLM: Predicting Function Names in Stripped Binaries via Context-Sensitive Execution-Aware Code EmbeddingsXin Jin, Kexin Pei, Jun Yeon Won, Zhiqiang LinCCS 2022 · 56 次引用
  2. Finding the dwarf: recovering precise types from WebAssembly binariesDaniel Lehmann, Michael PradelPLDI 2022 · 29 次引用
  3. TRACED: Execution-aware Pre-training for Source CodeYangruibo Ding, Benjamin Steenhoek, Kexin Pei, Gail E. Kaiser 等ICSE 2024 · 29 次引用
  4. DeepInfer: Deep Type Inference from Smart Contract BytecodeKunsong Zhao, Zihao Li, Jianfeng Li, He Ye 等FSE 2023 · 24 次引用
  5. A Taxonomy of C Decompiler Fidelity IssuesLuke Dramko, Jeremy Lacomis, Edward J. Schwartz, Bogdan Vasilescu 等USENIX Security 2024 · 23 次引用

它引用的 Paper18

  1. SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens 等S&P 2016 · 1,085 次引用
  2. A Tough Call: Mitigating Advanced Code-Reuse Attacks at the Binary LevelVictor van der Veen, Enes Göktas, Moritz Contag, Andre Pawlowski 等S&P 2016 · 227 次引用
  3. Neural Nets Can Learn Function Type Signatures From BinariesZheng Leong Chua, Shiqi Shen, Prateek Saxena, Zhenkai LiangUSENIX Security 2017 · 175 次引用
  4. Debin: Predicting Debug Information in Stripped BinariesJingxuan He, Pesho Ivanov, Petar Tsankov, Veselin Raychev 等CCS 2018 · 148 次引用
  5. Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 次引用

相关 Paper

  1. TYGR: Type Inference on Stripped Binaries using Graph Neural NetworksChang Zhu, Ziyang Li, Anton Xue, Ati Priya Bajaj 等USENIX Security 2024 · 10 次引用
  2. TypeForge: Synthesizing and Selecting Best-Fit Composite Data Types for Stripped BinariesYanzhong Wang, Ruigang Liang, Yilin Li, Peiwei Hu 等S&P 2025
  3. Beyond Classification: Inferring Function Names in Stripped Binaries via Domain Adapted LLMsLinxi Jiang, Xin Jin, Zhiqiang LinNDSS 2025
  4. NeuDep: neural binary memory dependence analysisKexin Pei, Dongdong She, Michael Wang, Scott Geng 等FSE 2022 · 8 次引用
  5. Hieronym: Leveraging Hierarchical Multi-Source Information for Function Renaming in Stripped BinaryXiaoling Zhang, Jian Sun, Dawei Wang, Chongyu Wang 等CCS 2026
黄昏的海面,两侧是细线勾勒的悬崖