GLORYHook
The first Linux hooking framework to allow merging two binary files into one!
Install / Use
/learn @tsarpaul/GLORYHookREADME
GLORYHook
The first Linux hooking framework to allow merging two binary files into one!
<p align="center"> <img src="https://raw.githubusercontent.com/tsarpaul/GLORYHook/master/glory-penguin.png" /> </p>How is this different?
Other hooking methods do not allow calling libraries from within the hook, so you must resort to writing shellcode or your own implementation for libc APIs. This is not the case with GLORYHook. Check out hook.c, you can call any libc API you want!
Use cases
- Debugging - Can't use LD_PRELOAD? Don't want to mess with injecting dependency shared objects and can't bother installing dependency libraries on the system each time? Just hook your file instantly and ship it with zero extra steps.
- File Infection/Backdoor - Can be used as an alternative for an LD_PRELOAD rootkit but with extra stealth sauce. Defenders contact me for how to detect.
Important Notes
GLORYHook supports only x64. Currently hooking is only supported on imports (e.g. libc functions). Currently interacting with globals in your hook is unsupported but will be added soon.
Installation
- Install my custom LIEF (I customized LIEF to make ELF manipulations easier):
git clone https://github.com/tsarpaul/LIEF
cd LIEF
python3 ./setup.py install
pip3 install -r requirements.txt
Usage

- Define gloryhook_<import_to_hook> in your hook file
gcc -shared -zrelro -znow hook.c -o hookpython3 glory.py ./file-to-hook ./hook -o ./hooked-file
Check hook.c and example.sh.
GLORY TO YOU
Related Skills
node-connect
353.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
