Permission Vulnerabilities - samuel-richardson/Sam-Tech-Journal GitHub Wiki
Permissions
- Permission octal numbers: r=4,w=2,x=1.
- 4000 or u+s means a suid which is executed by the owner of the file.
- World writable file o+w can also be exploited.
Finding These files
- Find suid
find / -perm -4000 2>/dev/null
- Find world-writable in /etc/
find /etc/ -perm /o+w -type -f 2>/dev/null
- Finding a world-writable in the whole system
find / -perm /o+w -type f -ls 2>/dev/null | grep -v sys | grep -v proc