News for hackers. Stuff that matters.
Re:Userland rootkits are lame (2022) by benob on Monday July 01, 2024 @01:01AM (#40842643)
What are uses of LD_PRELOAD that make us keep it?
Re:Userland rootkits are lame (2022) by viraptor on Monday July 01, 2024 @01:06AM (#40842668)
Replacing allocators https://github.com/jemalloc/jemalloc/wiki/Getting-Started

Pretending you're running on a remote system https://github.com/viraptor/libremotec

Cheat in games https://github.com/ProfessionallyEvil/LD_PRELOAD-rand-Hijack...

Fixing bugs where the upstream can't do it.

Re:Userland rootkits are lame (2022) by LukeShu on Monday July 01, 2024 @01:10AM (#40842697)
Some uses of LD_PRELOAD off the top of my head:

- GNU stdbuf (BSDs use an env-var instead of hijacking libc)

- fakeroot

- gprofng's data collector

- For a long time it was necessary to use LD_PRELOADto hack around a bug in flashplayer because flashplayer used memcpy when it should have used memmove.

Re:Userland rootkits are lame (2022) by mappu on Monday July 01, 2024 @02:03AM (#40842983)
Do you mean the functionality itself (inherent in the capabilities of a dynamic ELF loader) or specifically that it uses an environment variable? Maybe moving it to static configuration in ld.so.conf would cut down on abuse.
Re:Userland rootkits are lame (2022) by xioxox on Monday July 01, 2024 @03:03AM (#40843287)
tsocks is quite useful for proxying a program's network access over ssh using SOCKS. I use it for accessing geo-blocked servers using command line tools without a full VPN.
Re:Userland rootkits are lame (2022) by worthless-trash on Monday July 01, 2024 @01:05AM (#40842664)
Fixing bugs in a function in a library. Overriding libraries.
Re:Userland rootkits are lame (2022) by freeone3000 on Monday July 01, 2024 @01:57AM (#40842944)
Patching the binary seems like a better way to do this.
Re:Userland rootkits are lame (2022) by worthless-trash on Monday July 01, 2024 @04:11AM (#40843610)
Better long term,but also much harder. Some anti cheat software will be tripped if you do this as they checksum the binaries on disk, that of course can be worked around so its just a matter of understanding your adversary.
Re:Userland rootkits are lame (2022) by saagarjha on Monday July 01, 2024 @06:14PM (#40851375)
Patching libraries is error-prone and annoying.