Setuid Binaries and Capabilities

Here we show different methods how we can abuse setuid binaries and other capabilities to escalate privilege.


Check for setuid binaries

find / -type f -perm -u=s 2>/dev/null

Above command we can check for all the setuid binaries. If we found any binaries we can check them using GTFOBins found below.


Check for capabilities

capsh --print
getcap -r /

To abuse setuid binaries or capabilities we can check the website GTFOBins.

GTFOBins

Last updated