Samy Ghannad

Finding Files Owned by root, Writable and Executable by Everyone

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.
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. find, sed, awk, grep, strace and others to their full potential.

Find all files that are SUID AND both Writeable & Executable by Others.

1
find  / -type f -perm -u+s -perm -o+wx

This commands reads like this:
Search / and find all files (-type f) where they have their user Execute bit set to s and are at least writable and executable by everyone.