The first Linux hooking framework to allow merging two binary files into one!
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!
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.
git clone https://github.com/tsarpaul/LIEF cd LIEF python3 ./setup.py install
pip3 install -r requirements.txt
gcc -shared -zrelro -znow hook.c -o hook
python3 glory.py ./file-to-hook ./hook -o ./hooked-file
Check hook.c and example.sh.