How arty3/stack-obfuscator works
Stack Obfuscator is a header-only C++ library for protecting function return addresses and proxying external calls across Windows and Linux, including Windows kernel mode. The principal workflow is application code invoking a protection macro, which applies return-address obfuscation or dispatches a call through a calling-convention-aware proxy. The header also contains thread-state and key-generation logic. The README documents broader platform and security capabilities; because only excerpts of the header were provided, some internal links are omitted rather than inferred.
Main entry points: Stack-Obfuscator.hpp Protection macros
Components 8
Public API
- Protection macros
include/Stack-Obfuscator.hpp
Protection Runtime
- Return address guard
include/Stack-Obfuscator.hpp - Safe call proxy
include/Stack-Obfuscator.hpp - Thread state
include/Stack-Obfuscator.hpp - Key generation
include/Stack-Obfuscator.hpp
Platform Support
- ABI dispatch
include/Stack-Obfuscator.hpp
Other components
- Application code
- External function
Connections 6
- Application code → Protection macros: invokes
README.md - Protection macros → Return address guard: protects return address
README.md - Protection macros → Safe call proxy: creates SafeCall
include/Stack-Obfuscator.hpp - Safe call proxy → ABI dispatch: selects convention
include/Stack-Obfuscator.hpp - Safe call proxy → External function: invokes target
README.md - Return address guard → Thread state: sets status
include/Stack-Obfuscator.hpp