githubEdit

shared object injection

SUID (S , 04000)→ privilege which file run with creator privilege not user who’s run it

we start to know which file run with SUID

find / -type f -perm -u=s -ls 2>/dev/null
#  or
find / -type f -perm 04000 -ls 2>/dev/null
image.png

Strace → tool which use to spectate of system calls function

.so → use to run library before the system library

so this c code which will inject

we create a file and we start to convert this file to library

then run the main file suid-so



why we choose this library /home/user/.config/libcalc.so ?

which return value 3 that’s mean Strace success to open it like all marked green in photo

but these libraries which load from places the user can’t open or edit it but this place /home/user/.config/libcalc.so the user can edit it and inject a malicious code

Last updated