It checks your Linux system and reports in a well formatted file what you should probably do to have a safer system. It doesn't need root privileges
It is inspired by the configuration recommendations of a GNU/Linux system guide by the ANSSI (the french National Agency of Information System Security)
The order is not relevant
- Check the Umask
- List the active processes (and processes listening on the network)
- Check permission of sensitives files
- List executable with Setuid and owned by root
- List the accounts
- Check the session expiration (TMOUT environnement variable)
- Check for automatic update
- List your enabled repositories
- List files editables by everyone
- List directories editables by everyone
- Check unowned files
- Give the executable right to the script
chmod +x script.sh
. - Run it (you don't need root privileges)
./script.sh
. - Grab your favourite drink and wait until the script ends.
I had to improve the security of a CentOS server and read the ANSSI's guide. I listed the points I could easily do and thought it would be better to have a script doing most of it for me. So I'm sharing it.