Abusing SUID and GUID Files

Command Description
chmod Modify file/dir permissions
find / -perm -u=s -type f 2>/dev/null Search for vulnerable binaries
find / -type f -perm -04000 -ls 2>/dev/null Search for vulnerable binaries

About

Permission On Files On Directories
SUID Bit User executes the file with permissions of the file owner -
SGID Bit User executes the file with the permission of the group owner. File created in directory gets the same group owner.
Sticky Bit No meaning Users are prevented from deleting files from other users.
permissions bits account
rwxrwxrwx 777 admin
rwxr-xr-x 755 user
rwsrw-rw- 4766 SUID
rwxrwxr-x 2775 GUID

Finding SUID binaries

# A
find / -perm -u=s -type f 2>/dev/null
# B
find / -type f -perm -04000 -ls 2>/dev/null