SUID
Last updated
Last updated
🗒️ (Set owner User ID) - is a type of special access permission given to a file. A file with SUID always executes as its the owner, regardless of the user passing the command.
Allows unprivileged users to run scripts or binaries with root
permissions, and it's limited to the execution of that specific binary.
This is not privilege escalation, but can be used to obtain an elevated session
e.g.
the sudo
binary
The exploitation of SUID binaries to get privesc depends on:
the owner of the SUID file - e.g.
look for root
user's SUID binaries
access permissions - x
executable permissions are required to execute the SUID binary
📌 welcome
file has the SUID
permission applied(in the permissions tab there is a s mentioned which means suid permission
It calls greetings
binary
Here we have removed the greeting binary and made a same binary with the same name and we have given the content through which we can get a /bin/bash session