I am sure everyone understand how important is to keep your Linux system regardless if you run CentOS, Red Hat Enterprise Linux or Ubuntu Linux in secure state. There is plenty tools available free or paid to achieve one goal to make sure your system is up to standard and meet security requirements. Lately I was playing with this small but very fast and great auditing tool called Lynis.
Lynis is an auditing tool for Unix (specialists). It scans the system and available software, to detect security issues. Beside security related information it will also scan for general system information, installed packages and configuration mistakes.This software aims in assisting automated auditing, software patch management, vulnerability and malware scanning of Unix based systems. It can be run without prior installation, so inclusion on read only storage is no problem (USB stick, cd/dvd).
Examples of audit tests:
- Available authentication methods
- Expired SSL certificates
- Outdated software
- User accounts without password
- Incorrect file permissions
- Firewall auditing
This tool is fast and you can install it very easily and fast almost on all Linux distributions available today. This scans your system for security holes, look for expired SSL certs, incorrect file permissions, outdated packages and more. Once the scan is completed you can see rating 0 to 100 for your system and suggestions on findings and how to fix them 🙂
Here are steps to install and run Lynis Auditing tool on CentOS:
su wget http://www.rootkit.nl/files/lynis-1.3.0.tar.gz tar xzvf lynis-1.3.0.tar.gz cd lynis-1.3.0
Now you are ready to run the audit on your Linux system. The -c flag will check full system, once the script starts it will stop/pause for your input after each category of scan. In order to have it done quick and without stops you can use the -Q flag in the line.
su cd lynis-1.3.0 sh lynis -c --auditor "sysadmin" -Q ## to see all available flags/options run this ## sh lynis -h
Once the scan is completed you are presented with the score, findings and suggestions for your system.