本文编写于 416 天前,最后修改于 357 天前,其中某些信息可能已经过时。

method1

change LD_PRELOAD=./libc.2.26.so in shell to assign libc

export LD_LIBRARY_PATH= <pwd>
export LD_PRELOAD= <libc path>    #SET LD_PRELOAD TO SUBSTITUTE
unset LD_PRELOAD    #DELETE ENV VAR AFTER DEBUG

method2

set LD_PRELOAD when debug pwntools exp

io = process(['./bin'],env={"LD_PRELOAD":"./libc-2.23.so"})