Project 0xA11C: Deoxidizing the Rust Malware Ecosystem
This talk presents a methodology for reverse engineering Rust-compiled malware by addressing the challenges posed by its unique binary structures, custom calling conventions, and static linking. The researchers demonstrate how to reconstruct the pcln table, identify user-generated functions, and recover type information to improve analysis in IDA Pro. They introduce a set of standalone scripts designed to automate these tasks, enabling analysts to effectively decompile and hunt for Rust-based threats. The presentation highlights the shift of various APT and ransomware groups toward Rust to evade traditional detection mechanisms.
Reverse Engineering Rust Malware: Why Your Current Toolchain is Failing
TLDR: Rust-compiled malware is becoming a staple for threat actors due to its complex binary structures and aggressive static linking that break traditional decompilation workflows. This research introduces AlphaGolang, a set of scripts designed to reconstruct the pcln table and recover function names, and FeatureProof, a middleware library for building more resilient IDA Pro plugins. If you are a researcher or pentester, you need to move beyond standard disassembly and start automating the recovery of Rust-specific metadata to avoid missing critical logic.
Reverse engineering has always been a game of cat and mouse, but the shift toward memory-safe languages like Rust has fundamentally changed the board. While developers love Rust for its performance and safety, we are seeing a surge in its adoption by threat actors—from APTs like BlueNoroff to various ransomware groups—specifically because it makes our lives as analysts miserable. The binary structures produced by the Rust compiler are not just different; they are actively hostile to the standard "load and decompile" workflow we have relied on for decades.
The Rust Decompilation Problem
When you load a Rust binary into IDA Pro or Ghidra, you are rarely looking at clean, readable code. The compiler produces massive binaries due to heavy static linking, which pulls in every dependency as a distinct, often unlabelled, function. If you are hunting for user-generated logic, you are effectively looking for a needle in a haystack of thousands of library functions.
The core issue is the loss of metadata. The pcln (program counter line) table, which maps code addresses to function names and source files, is often stripped or mangled. Without this, your decompiler sees a sea of sub_140001234 calls. Furthermore, Rust uses custom calling conventions that vary by function, meaning your decompiler’s stack analysis is frequently wrong. When the stack is misinterpreted, the entire decompilation of that function collapses into a mess of local variables that don't exist.
Automating the Recovery
The research presented at Black Hat 2024 focuses on a methodology to "deoxidize" these binaries. Instead of fighting the decompiler, you need to feed it the information it is missing. The AlphaGolang project provides a roadmap for this. By identifying the pcln table, you can programmatically reconstruct the function names.
The process starts with a simple YARA rule to identify the Rust binary, followed by scripts that parse the binary to locate the missing table. Once you have the table, you can use idb2pat or similar tools to generate signatures, but the real power comes from automating the identification of user-generated code.
# Example of identifying Rust-specific structures in IDA
def find_rust_metadata(ea):
# Logic to locate the pcln table offset
# and restore function names
pass
By isolating the user-generated functions from the static-linked library code, you can focus your analysis on the actual malicious payload. This is the difference between spending three days on a sample and three hours.
Dealing with the "Panic" Path
One of the most interesting findings is how Rust handles errors. When a Rust program panics, it needs to unwind the stack to clean up resources. This process relies on UNWIND_INFO structures that are embedded in the binary. These structures contain the file path, line number, and column number where the panic occurred.
This is a goldmine for researchers. If you can parse these structures, you get a map of the source code directly from the binary. We have developed structures to parse this information, which allows us to identify the exact source file and line number for critical code paths. This metadata is often left intact even in "stripped" binaries, providing a massive advantage to anyone willing to write a parser for it.
The Future of Your Toolchain
If you are a pentester or bug bounty hunter, you cannot afford to ignore these binaries. The industry is moving toward Rust, and if your toolkit is limited to standard disassemblers without custom scripts, you are missing the most interesting parts of the malware.
The FeatureProof library is a direct response to the brittleness of current IDA Python scripts. Instead of writing one-off, fragile scripts that break every time a new version of IDA is released, this library provides a stable middleware layer. It allows you to define structures and logic that persist across different versions of your analysis tools.
Defenders should focus on the fact that these binaries are large and contain unique, identifiable strings related to the Rust standard library and specific crate versions. While the logic is hard to reverse, the "fingerprint" of a Rust binary is often quite distinct. Monitoring for these specific patterns in your environment can help you catch these threats before they execute.
Stop treating Rust binaries as black boxes. The metadata is there; you just need to know how to extract it. Start by integrating these scripts into your workflow, and you will find that the "un-reverseable" code is actually quite transparent once you strip away the compiler's obfuscation. The next time you encounter a massive, unlabelled Rust binary, don't just look at the disassembly—look for the structures that the compiler left behind.
Vulnerability Classes
Up Next From This Conference
Similar Talks

Hacking Apple's USB-C Port Controller

Unmasking the Snitch Puck: The Creepy IoT Surveillance Tech in the School Bathroom




