Re:I Built an Ld_preload Worm
by marcosdumay on Tuesday April 30, 2024 @12:27PM
(#40212822)
> E.g. you can scan function tables, remap pages r/w, and interpose functions.
Your code doesn't start doing those things without notice due to external interference.
But a linker will add them, on your behalf, without raising any flags.
The OpenBSD folks have some good ideas against these issues, although they are targeted at things like ROP exploits. E.g. pledge, which disables certain syscalls, and immutable memory maps (https://marc.info/?l=openbsd-tech&m=166203784715942).
A really scary version of the xz backdoor is if it had an entire implementation of openssh in its own ctor function. Then it wouldn't even need to interpose anything. It's way harder to get rid of ctors.