Matthew McCorkle

Day 3 - Lynis - 100 tools in 100 days!

1 . Introduction
2 . My Setup
3 . What is Lynis?
4 . Why use Lynis?
5 . How to use Lynis?
6 . Summary


This post is designed to teach you what the tool Lynis accomplishes and how to use it.


1. Introduction

Welcome to the third blog post of 100 tools in 100 days.
In this post and concurrent posts, I will introduce you to a tool in Kali or Parrot Linux.
I will discuss use cases for the tool.
Finally, I will show a quick how-to to get you started using it.


2. My Setup

For running the Lynis tool, I used Kali Linux in a VmWare Workstation 16 Player virtualized environment.


3. What is Lynis?

Lynis is a security and auditing tool.

The creators have made a free and open-source solution as well as a paid enterprise solution.

Lynis allows for a user or administrator to perform a local in-depth scan of a system to find vulnerabilities, perform a health check and find weaknesses in configuration.

Lynis only works on Linux systems, so if you have other systems to scan you may want to consider other solutions.

Find Lynis at the creator’s GitHub here or their website here.


4. Why use Lynis?

For personal use:

For enterprise solutions:


5. How to use Lynis?

On any Linux system

Step 1: 
Clone Lynis from GitHub:

git clone https://github.com/CISOfy/lynis.git



Step 2:
Change directory into the lynis folder that was cloned.

cd lynis


Step 3:
Run Lynis in system audit mode:
./lynis audit system



Step 3b:
Want to run Lynis in privileged scan mode? Try:

sudo ./lynis audit system

Type Y and hit enter when prompted.

Results:
The results of the Lynis audit are displayed in your terminal window.

At the bottom of the results, we have warnings and suggestions.

These are actions you can take to harden your system.

Additionally, Lynis gives you a hardening index which is a gauge of how hardened your system is.
Note: This is just a gauge for system hardening and not a gauge for actual system security.

As you can see my hardening index is not as great as it could be, but that is okay as this is a virtual machine I throw away at the end of writing each blog.

6. Summary

This blog post showed you a very brief overview of what Lynis is, and some of its capabilities.

We briefly discussed how to install and use Lynis and how to read the audit report for implementing system hardening.

Play around with Lynis and see if you can implement some of the suggestions Lynis has for your system’s security.

More resources can be found on the Lynis GitHub here.

Thanks for reading!
If you have suggestions for what tool to cover next, contact me!