3 ms·
If you can do that, you can (generally) do `cp /bin/foo ./ && modify foo && ./foo`
by yjftsjthsd-h 8y ago
If you can do that, you can (generally) do `cp /bin/foo ./ && modify foo && ./foo`
- peterwwillis 8y agoIt depends on assumptions in the way a system is hardened. For example, a home directory mounted noexec. In theory, LD_PRELOAD will not mmap a file in a noexec area. But if you can find an installed library with functions that mirror some other application you have, and you can LD_PRELOAD that library before executing the target application, you might be able to force the library to call unexpected routines. (That's a stretch, granted) Another would be possible RCE. Say you can get a server-side app to set environment variables, like via header injection. Then say you can upload a file. Can you make that server-side app set LD_PRELOAD to the file, and then wait for it to execute an arbitrary program?