Ancestors

Written by Cindʎ Xiao 🍉 on 2024-09-06 at 23:12

I have made an update to this thread about Rust panic location metadata in binaries, as well as to the associated blog post! I made a correction to my description of how developers can strip the panic location metadata from their binaries.

The attached screenshot shows a binary that was built using the Rust compiler's unstable location-detail feature, which excludes panic location metadata from the final binary.

Even using this feature isn't enough to strip all the location metadata, though; by default, Rust binaries statically link in a precompiled version of the standard library, which still contains the location metadata. Therefore, this binary was also built using Cargo's unstable build-std feature, which builds the Rust standard library from source, now with the location-detail flag specified during the compilation.

See the updated Rust binaries without panic metadata section of my blog post, for more details!

[#]rust #rustlang #ReverseEngineering #MalwareAnalysis

=> View attached media

=> More informations about this toot | More toots from cxiao@infosec.exchange

Written by brk, a.k.a. @evanrichter on 2024-09-07 at 02:09

@cxiao for a N of 1, a binary of mine with location info stripped got a 6% reduction in binary size 🤯

=> More informations about this toot | More toots from brk@infosec.exchange

Toot

Written by Cindʎ Xiao 🍉 on 2024-09-07 at 02:13

@brk that's crazy :mind_blown:

I wonder how much more you get if you also remove panic message strings / panic message formatting code. I gotta find some time to make my way down everything in https://github.com/johnthagen/min-sized-rust

=> More informations about this toot | More toots from cxiao@infosec.exchange

Descendants

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113093850638624415
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
266.147858 milliseconds
Gemini-to-HTML Time
1.019738 milliseconds

This content has been proxied by September (3851b).