Lynis is an extensible security audit tool for computer systems running Linux and Unix derivatives. It assists system administrators and security professionals with scanning a system and its security defenses, with the final goal being system hardening.
It performs an in-depth security scan and runs on the system itself. The primary goal is to test security defenses and provide tips for further system hardening. It will also scan for general system information, vulnerable software packages, and possible configuration issues. Lynis commonly used by system administrators and auditors to assess the security defenses of their systems.
It is used for several different purposes. Typical use cases for Lynis include:
Compliance testing (e.g., PCI, HIPAA, SOx)
By using this scanning method, the tool can run with almost no dependencies. Also, the more components it discovers, the more extensive the audit will be. In other words: Lynis will always perform scans that are tailored to your system. No audit will be the same.
Kali Linux comes pre-installed with Lynis, in case you don’t have it on your machine, just run the following command:
apt install lynis
Now to run the scan on your system just type:
lynis audit system
A complete system check will run locally on your system and give you a comprehensive log on what is suggested and what is High Risk:
As we can see the result are huge, most of them just suggestion on some of the software to install or to edit some configurations.
If you want to check one each one or just one of the suggestions you can type:
lynis show details TEST-ID as TEST-ID is the ID of the process at the end of the security concern.
Let’s try one of these security suggestions:
Lynis is a great tool to harden your system locally or remotely, give it a try!!