623 B
623 B
Download pwninit from https://github.com/io12/pwninit/releases/download/3.3.1/pwninit
wget https://github.com/io12/pwninit/releases/download/3.3.1/pwninit
Download dependencies
apt install patchelf
Execute pwninit
``./pwninit --bin <bin_to_be_patched> --libc <custom_libc> --ld <custom_loader>```
The loader is not necessary most of the times so you can ignore the --ld part. Typically pwninit finds it for you.
If everything is find pwninit will create a patched binary (suffix _patched).
If you open this in gdb (or ldd <prog>) you can see that it uses your custom libc and not the system one.