
The LD_PRELOAD trick (2016) - peter_d_sherman
http://www.goldsborough.me/c/low-level/kernel/2016/08/29/16-48-53-the_-ld_preload-_trick/
======
peter_d_sherman
Related:

[https://stackoverflow.com/questions/426230/what-is-the-ld-
pr...](https://stackoverflow.com/questions/426230/what-is-the-ld-preload-
trick)

[https://rafalcieslak.wordpress.com/2013/04/02/dynamic-
linker...](https://rafalcieslak.wordpress.com/2013/04/02/dynamic-linker-
tricks-using-ld_preload-to-cheat-inject-features-and-investigate-programs/)

While, from a security perspective, I am not all that happy about LD_PRELOAD,
I feel that it is much like a double-edged sword, while it has negative use-
cases, it has positive use-cases as well: E.g., program debugging, that is, to
give more transparency and insight into programs at runtime...

So the jury is out on this one, for now...

A secure Unix would disable setting LD_PRELOAD and/or log/notify the
user/sysadmin if/when it was set, and compilers/linkers/loaders on that secure
Unix would not honor it, and possibly log/warn if it were encountered... you
know, multiple levels of checking...

