lundi 29 avril 2019, 22:46 #4
App - Script - Bash System 1
I try to change the ld preload with
gcc -fPIC -g -c a.c
gcc -shared -o libmylib.so.1.0.1 a.o -lc
export LD_PRELOAD=./libmylib.so.1.0.1
the idea was to hack the funcition system() to made it cat the .passwd but i get
ERROR : ld.so : object ’./libmylib.so.1.0.1’ from LD_PRELOAD cannot be preloaded (cannot open shared object file) : ignored.
mardi 30 avril 2019, 09:29 #5
App - Script - Bash System 1
No. It’s a lot simpler than that. No need to replace system()