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
=> More informations about this toot | More toots from cxiao@infosec.exchange
@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
@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
text/gemini
This content has been proxied by September (3851b).