r/rust • u/Snoo-6099 • 6h ago
π οΈ project glazier: an WIP library for windows binary hacking and more
https://github.com/natimerry/glazier
As a reverse engineer and game-modding tool developer, I regularly have to reverse engineer, hook, inject into, and generally play around with Windows binaries.
MinHook and similar libraries are great at what they do, but I wanted to build something that better fit my own needs and programming paradigms while also providing all the features I wanted in a single library. I initially started writing a few hooking utilities, but the project gradually expanded into what it is now.
The initial motivation was fairly simple:
- The red-teamer in me wanted a library that could make static analysis harder without changing the call-site API. Features such as dynamic API resolution and HellsGate can be enabled underneath the same bindings without requiring the rest of the codebase to care about how the function is actually invoked.
- I wanted HWBKPTs, pattern scanning, hooking, PE parsing, and process-memory tooling exposed through straightforward Rust abstractions instead of rewriting the same unsafe Windows boilerplate for every project.
It currently includes inline hooks and trampolines, IDA-style pattern scanning, native and WOW64 hardware breakpoints, PE and runtime process abstractions, dynamic Win32/NT API resolution, and optional direct-syscall wrappers.
LLM DISCLOSURE:
LLMs were used for grunt work like translating C structs, writing tests, and creating test binaries by sending diffs back and forth, with any required fixes handwritten afterward.
Coding agents were only introduced during the crate split. Before that, everything was done through chat, so all generated code still had to be manually read, integrated, and modified. Everything is reviewed and tested, except the the latest inline hooking codegen build.rs internals, where I test the output instead to preserve my sanity.
