go-ldpreload-backdoor icon indicating copy to clipboard operation
go-ldpreload-backdoor copied to clipboard

constructor attribute

Open pitust opened this issue 4 years ago • 0 comments

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).

pitust avatar May 09 '20 06:05 pitust