go-ldpreload-backdoor
go-ldpreload-backdoor copied to clipboard
constructor attribute
AFAIK when a ashared library is loaded, its symbols can be defined as a constructor (in C it is done with __attribute__((__constructor__))
(under GCC). This lets you run any code once the linker finished loading stuff.
What I propose is instead of hooking some function like strrchr
, we simply define some entrypoint as a constructor (possibly by post-processing the ELF binary).