09 July 2006

Find world writeable/executable or suid/sgid files

# Find suid/sgid files
find / -type f \( -perm -04000 -o -perm -02000 \) \-exec ls -lg {} \;

# Find world writable files
find / -type f \( -perm -002 \) -exec ls -lg {} \;

# Find world executable files
find / -type f \( -perm -001 \) -exec ls -lg {} \;

# Find unowned files
find / -nouser -o -nogroup

No comments:

Post a Comment