Lynis is an open source command line and an audit tool for Linux/UNIX specialists. It is designed to scan the system configuration and create an overview of information and system security issues. Developers behind the Lynis project announce that the software tends to become a stable solution for creating a “safety system.” The audience for Lynis is security specialists, system auditors and network administrators. The software includes a central management tool, an implementation and reporting plan, and various plugins.It can be used successfully on enterprise environments as well as on small and medium enterprises.
Lynis, created by CISOfy, is a security verification tool for Linux and UNIX operating systems. It complies with information security standards such as ISO27001, HIPAA and PCI DSS. Lynis is designed for companies and organizations but can also be used to test Ubuntu’s normal installations by providing a high degree of definition and expertise.
Lynis is a cross-platform application. It has been successfully tested on various GNU/Linux distributions including CentOS, Arch Linux, BackTrack, ClearOS, Fedora, Gentoo, Red Hat Enterprise Linux, Kali, Linux Mint, Knoppix, Mageia, PCLinuxOS, Sabayon, SuSE, Ubuntu, and Debian on several BSD flavors such as DragonFly BSD, PC-BSD, NetBSD, OpenBSD FreeBSD, and Mac OS X, AIX, OpenSolaris, and the HP-UX operating system.
The application is written entirely in UNIX Shell scripting language and has no dependencies.
The program can be installed or downloaded directly from the official website.
Lynis installation on Linux distributions:
Debian / Ubuntu / Linux Mint: $ sudo apt-get install lynis
RHEL / CentOS: $ sudo yum install lynis
openSUSE: $ sudo zypper install lynis
Mageia: $ sudo urpmi lynis
Arch Linux and derivative distributions: $ sudo pacman -S lynis
If you don’t have the latest package of Lynis you can use the software repository from CISOfy.
Install Lynis on RHEL/CentOS/Fedora
$ sudo yum update ca-certificates curl nss openssl
$ sudo nano /etc/yum.repos.d/cisofy-lynis.repo
[lynis]
name=CISOfy Software – Lynis package
baseurl=https://packages.cisofy.com/community/lynis/rpm/enabled=1
gpgkey=https://packages.cisofy.com/keys/cisofy-software-rpms-public.keygpgcheck=1
For RHEL/CentOS: $ sudo yum install lynis
For Fedora: $ sudo dnf install lynis
Install Lynis on Debian/Ubuntu/LinuxMint
$ sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys C80E383C3DE9F082E01391A0366C67DE91CA5D5F
$ sudo sh -c “echo ‘deb https://packages.cisofy.com/community/lynis/deb/ stable main’ >> /etc/apt/sources.list.d/lynis.list”
$ sudo apt install apt-transport-https
$ sudo apt update
$ sudo apt install lynis
Install Lynis on openSUSE
$ sudo rpm –import https://packages.cisofy.com/keys/cisofy-software-rpms-public.key
$ sudo zypper addrepo –gpgcheck –name “CISOfy Lynis repository” –priority 1 –refresh –type rpm-md https://packages.cisofy.com/community/lynis/rpm/ lynis
$ sudo zypper refresh
$ sudo zypper install lynis
The report that Lynis generates might be a little confusing at first. The entire report is divided into sections. The results use a color code from green to red to indicate the severity of the problem. The purpose of this report is to let you know the potential issues.
Lynis is a program that makes an operating system audit. It means it checks if different folders exist, if there are security holes, if the configuration files are ok, etc.
To create Lynis Cronjobs for a daily system scan report, use the following command: # Crontab -e