scary, maybe
Sam Halliday <[email protected]>
| Newsgroups | gmane.linux.lfs.security |
|---|---|
| Message-ID | <[email protected]> |
just out of interest, please everybody try to run this script and (maybe) scare yourselves...
#!/bin/bash
# start of script
echo "Script to find global writable files and directories"
echo "Files others can write to:"
find /{bin,home,opt,root,tmp,var,boot,etc,lib,sbin,usr} -perm -o+w -type f
echo "Directories others can write to:"
find / -perm -o+w -type d
echo "To remove the global writing to all these files, please type"
echo
echo "find / -perm -o+w -type f -exec chmod o-w '{}' ';'"
echo
echo "The folders /tmp /tmp/.font-unix /tmp/.X11-unix /var/mail /var/tmp are supposed"
echo "to be globally writable, so fix any extra vulnerable directories by hand."
# end of script
OR substitute something like
{bin,home,opt,root,tmp,var,boot,etc,lib,sbin,usr}
in instead of just searching / both times (if you are on on a network for example)
cheers!
Sam
--
Pascal Users:
The Pascal system will be replaced next Tuesday by Cobol. Please modify your programs accordingly.
--
Unsubscribe: send email to [email protected]
and put 'unsubscribe lfs-security' in the subject header of the message