2025-10-21 –, Europe
The ubiquitous file command, powered by the C library libmagic, is a cornerstone of file identification—but its use in memory-safe environments has always been a security trade-off. This lightning talk explores our ongoing effort to port libmagic to Rust, addressing the long-standing challenge of safely embedding file identification in modern, memory-safe applications.
We’ll dive into the motivations behind this port: the inherent risks of running C parsers on untrusted input, and how Rust’s safety guarantees can mitigate these concerns without sacrificing performance. The project aims for near-full compatibility with libmagic’s rule format, ensuring seamless integration for existing users while unlocking new possibilities for portability across Rust’s supported platforms.
Attendees will get a sneak peek at the current state of the implementation, which already identifies common file types like MS-DOS executables, ELF binaries, and scripts. We’ll also discuss the roadmap, including plans to publish a Rust crate, complete a CLI tool equivalent to file, and create bindings for other languages.
Quentin has been working as an incident responder for several years before focusing on endpoint threat detection. He recently dedicated all his time developing several open-source projects. His main topics of interest are ranging from threat detection to bug hunting but what he likes the most is to develop tools and open-source them when he judges it is relevant enough to do so.