Skip to content
Rust Binary Analysis, Feature by Feature (37c3) episode artwork

Dec 28, 2023 42 min

Rust Binary Analysis, Feature by Feature (37c3)

from Chaos Computer Club - archive feed Hosted by Ben H

A walkthrough of the assembly code idioms the Rust compiler uses to implement the language’s core features (as they appear in Klabnik’s and Nichols’ “The Rust Programming Language”) - starting with simple match expressions and all the way to monomorphized functions and iterator chains. You attempt to analyze a binary file compiled in the Rust programming language. You open the file in your favorite disassembler. Twenty minutes later you wish you had never been born. You’ve trained yourself to think like g++ and msvc: Here’s a loop, there’s a vtable, that’s a global variable, a library function, an exception. Now you need to think like the Rust compiler. Maybe you’ve heard about “sum types” and “generics” and “iterators”, maybe you haven’t, and in both cases you are going to have an exceptionally bad time. This talk will get you familiar with the assembly code idioms the Rust compiler uses to implement the language’s core features (as they appear in Klabnik’s and Nichols’ “The Rust Programming Language”), and more generally, the frame of mind required for reverse-engineering such programs. How is an Option represented using the same amount of memory as a plain T? How do monomorphized generic functions complicate RE work? What's the right approach to untangle many-layered, unintuitive iterator chains? We will tackle these questions and many more. Includes a publicly available lab setup with several sample programs that showcase core Rust features as compiled to assembly. about this event: https://events.ccc.de/congress/2023/hub/event/rust_binary_analysis_feature_by_feature/

Episode details come from the podcast's RSS feed.

Embed this episode

Ready to play

Rust Binary Analysis, Feature by Feature (37c3)

0:00 42:10

No transcript yet.

Requests help us decide what to transcribe next.

Frequently asked questions

How long is this episode of Chaos Computer Club - archive feed?

This episode is 42 minutes long.

When was this Chaos Computer Club - archive feed episode published?

This episode was published on December 28, 2023.

Can I download this Chaos Computer Club - archive feed episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.