Unsafe's Betrayal: Abusing Unsafe Rust in Binary Reverse Engineering via Machine Learning
Sangdon Park, Xiang Cheng, Taesoo Kim

TL;DR
This paper introduces a machine learning-based tool to identify unsafe code in Rust binaries, aiding in reverse engineering and bug detection, and demonstrates its effectiveness in recalling memory-safety bugs and improving fuzzing efficiency.
Contribution
The paper presents textttrustspot, a novel machine learning approach for identifying unsafe Rust functions in binaries, enhancing reverse engineering and bug detection capabilities.
Findings
Recalls 92.92% of memory-safety bugs
Covers only 16.79% of binary code
Reduces fuzzing time in targeted analysis
Abstract
Memory-safety bugs introduce critical software-security issues. Rust provides memory-safe mechanisms to avoid memory-safety bugs in programming, while still allowing unsafe escape hatches via unsafe code. However, the unsafe code that enhances the usability of Rust provides clear spots for finding memory-safety bugs in Rust source code. In this paper, we claim that these unsafe spots can still be identifiable in Rust binary code via machine learning and be leveraged for finding memory-safety bugs. To support our claim, we propose the tool textttrustspot, that enables reverse engineering to learn an unsafe classifier that proposes a list of functions in Rust binaries for downstream analysis. We empirically show that the function proposals by textttrustspot can recall of memory-safety bugs, while it covers only of the entire binary code. As an application, we…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Reliability and Analysis Research · Software Engineering Research · Software Testing and Debugging Techniques
