There are times when you need to find all files that may prove useful for escalating privilege either during penetration testing, forensic analysis or securing a Linux server.
Doing so is as simple as using the infamous
find command is one the most powerful tools in every Linux user arsenal, and IMHO every Linux user should know how to use these tools i.e.
strace and others to their full potential.
Find all files that are SUID AND both Writeable & Executable by Others.
find / -type f -perm -u+s -perm -o+wx
This commands reads like this:
/ and find all files
(-type f) where they have their user
Execute bit set to
s and are writable and executable by everyone.