SUID
General method to find files with SUID bit
If there's a particular binary found that has the SUID
bit set, refer to https://gtfobins.github.io/ to potentially find an exploit.
Example
Suppose the binary /usr/bin/base64
is found to contain the SUID bit. This can be exploited to view the contents of the /etc/shadow
file.
The unshadow
command can be used on the shadow.txt
and passwd.txt
files to create a file that is crack-able by John the ripper.
Subsequently, the password for a user with more privileges than the current one may be cracked. This will allow us to access that account to further escalate our privileges. For example, the cracked user may have SUID
bits set, or sudo privileges for certain binaries that may contain exploits to access the root shell.
Last updated