This is for cases when you somehow restrict the user using the user shell - if the user can set LD_PRELOAD, then they can execute the code as their user on the remote computer, intercepting the standard library call.
A simple example would be if you disable the user login only for SFTP by setting your shell to the dynamically linked / bin / false - if they can change ~ / .ssh / environment or ~ /. ssh / authorized_keys, then they could add LD_PRELOAD = nefarious.so
Peter source share