Lune

S&P2023顶会

Pyfet: Forensically Equivalent Transformation for Python Binary Decompilation

Ali Ahad, Chijung Jung, Ammar Askar, Doowon Kim, Taesoo Kim, Yonghwi Kwon

摘要

Decompilation is a crucial capability in forensic analysis, facilitating analysis of unknown binaries. The recent rise of Python malware has brought attention to Python decompilers that aim to obtain source code representation from a Python binary. However, Python decompilers fail to handle various binaries, limiting their capabilities in forensic analysis.This paper proposes a novel solution that transforms a decompilation error-inducing Python binary into a decompilable binary. Our key intuition is that we can resolve the decompilation errors by transforming error-inducing code blocks in the input binary into another form. The core of our approach is the concept of Forensically Equivalent Transformation (FET) which allows non-semantic preserving transformation in the context of forensic analysis. We carefully define the FETs to minimize their undesirable consequences while fixing various error-inducing instructions that are difficult to solve when preserving the exact semantics. We evaluate the prototype of our approach with 17,117 real-world Python malware samples causing decompilation errors in five popular decompilers. It successfully identifies and fixes 77,022 errors. Our approach also handles anti-analysis techniques, including opcode remapping, and helps migrate Python 3.9 binaries to 3.8 binaries.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization 引用了 An In-Depth Analysis of Disassembly on Full-Scale x86/x64 Binaries
  • RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization 引用了 T-Fuzz: Fuzzing by Program Transformation
  • Walking The Last Mile: Studying Decompiler Output Correction in Practice 引用了 PyLingual: Toward Perfect Decompilation of Evolving High-Level Languages
  • PyFEX: Uncovering Evasive Python-based Threats via Resilient and Exhaustive Path Exploration 引用了 PyLingual: Toward Perfect Decompilation of Evolving High-Level Languages
  • Binary rewriting without control flow recovery 引用了 RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and Sanitization
  • Neural Nets Can Learn Function Type Signatures From Binaries 引用了 An In-Depth Analysis of Disassembly on Full-Scale x86/x64 Binaries
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper4

  1. StackSight: Unveiling WebAssembly through Large Language Models and Neurosymbolic Chain-of-Thought DecompilationWeike Fang, Zhejian Zhou, Junzhou He, Weihang WangICML 2024 · 5 次引用
  2. Walking The Last Mile: Studying Decompiler Output Correction in PracticeJoshua Wiedemeier, Simon Klancher, Joel Flores, Max Zheng 等CCS 2025
  3. PyFEX: Uncovering Evasive Python-based Threats via Resilient and Exhaustive Path ExplorationMeng Wang, Yue Ma, Majid Garoosi, Wenting Fan 等CCS 2026
  4. PyLingual: Toward Perfect Decompilation of Evolving High-Level LanguagesJoshua Wiedemeier, Elliot Tarbet, Max Zheng, Sangsoo Ko 等S&P 2025

它引用的 Paper9

  1. T-Fuzz: Fuzzing by Program TransformationHui Peng, Yan Shoshitaishvili, Mathias PayerS&P 2018 · 326 次引用
  2. RetroWrite: Statically Instrumenting COTS Binaries for Fuzzing and SanitizationSushant Dinesh, Nathan Burow, Dongyan Xu, Mathias PayerS&P 2020 · 187 次引用
  3. Neural Nets Can Learn Function Type Signatures From BinariesZheng Leong Chua, Shiqi Shen, Prateek Saxena, Zhenkai LiangUSENIX Security 2017 · 175 次引用
  4. An In-Depth Analysis of Disassembly on Full-Scale x86/x64 BinariesDennis Andriesse, Xi Chen, Victor van der Veen, Asia Slowinska 等USENIX Security 2016 · 162 次引用
  5. Binary rewriting without control flow recoveryGregory J. Duck, Xiang Gao, Abhik RoychoudhuryPLDI 2020 · 77 次引用

相关 Paper

  1. Helping Johnny to Analyze Malware: A Usability-Optimized Decompiler and Malware Analysis User StudyKhaled Yakdan, Sergej Dechand, Elmar Gerhards-Padilla, Matthew SmithS&P 2016 · 128 次引用
  2. TransMap: Pinpointing Mistakes in Neural Code TranslationBo Wang, Ruishi Li, Mingkai Li, Prateek SaxenaFSE 2023 · 4 次引用
  3. Decomperson: How Humans Decompile and What We Can Learn From ItKevin Burk, Fabio Pagani, Christopher Kruegel, Giovanni VignaUSENIX Security 2022
  4. Bin2Wrong: a Unified Fuzzing Framework for Uncovering Semantic Errors in Binary-to-C DecompilersZao Yang, Stefan NagyUSENIX ATC 2025 · 6 次引用
  5. How far we have come: testing decompilation correctness of C decompilersZhibo Liu, Shuai WangISSTA 2020 · 53 次引用
黄昏的海面,两侧是细线勾勒的悬崖