Analysis of the use of Linux vulnerability scanning tool lynis

Analysis of the use of Linux vulnerability scanning tool lynis

Preface: Lynis is a security audit and hardening tool for Unix systems that can perform deep security scans. Its purpose is to detect potential incidents and provide suggestions for future system hardening. The software scans for general system information, vulnerable packages, and potential misconfigurations.

feature:

  • Vulnerability Scanning
  • System hardening
  • Intrusion Detection
  • Center Management
  • Customized behavior planning
  • Report
  • Security Panel
  • Continuous monitoring
  • Technical Support

Target:

  • Automatic security audit
  • Compliance testing
  • Vulnerability Detection

Helps to:

  • Configuration Management
  • Software patch management
  • System hardening
  • Penetration Testing
  • Malware Scanning
  • Intrusion Detection

1. Install the software package

yum install epel-release install epel source

yum --enablerepo=epel -y install lynis

You can also install it using the following method

Method 1: root@kali:~# wget https://cisofy.com/files/lynis-2.2.0.tar.gz
Method 2: root@kali:~# curl https://cisofy.com/files/lynis-2.2.0.tar.gz -o lynis.tar.gz
Method 3: Open the page directly with your browser: https://cisofy.com/download/lynis/, then select download, after downloading, unzip, compile and install

2. Scanning system

# lynis audit system

or

lynis --check-all

If you always need to enter the Enter key to execute the above command, you can use the -c and -Q options to skip user input:

$ sudo ./lynis -c -Q

3. View logs

Logs are saved in /var/log/lynis-report.dat

Search for "warning" "suggestion" to find suggestions

# grep -E "^warning|^suggestion" /var/log/lynis-report.dat

4. Create Lynis scheduled tasks

If you want to create a daily scan report for your system, you can set up cron:

$ crontab -e
Add a cron task:

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

30 22 * ​​* * /usr/bin/lynis -c --auditor "automated" --cronjob > /var/log/lynis/report.txt
The above task will perform a scan at 10:30 every night and save the output information to the /var/log/lynis.log log file.

You may also be interested in:
  • Python script to implement Web vulnerability scanning tool
  • Python environment powerful pip-audit security vulnerability scanning tool

<<:  How to set npm to load packages from multiple package sources at the same time

>>:  Causes and solutions to the garbled character set problem in MySQL database

Recommend

Install Zookeeper under Docker (standalone and cluster)

After starting Docker, let's take a look at t...

How to use Spark and Scala to analyze Apache access logs

Install First you need to install Java and Scala,...

JavaScript BOM Explained

Table of contents 1. BOM Introduction 1. JavaScri...

Detailed analysis and usage of tcpdump command under Linux

Introduction To put it simply, tcpdump is a packe...

Native JavaScript implementation of progress bar

The specific code for JavaScript to implement the...

HTML commonly used meta encyclopedia (recommended)

The Meta tag is an auxiliary tag in the head area...

This article teaches you how to play with CSS combination selectors

CSS combination selectors include various combina...

Let’s talk about the symbol data type in ES6 in detail

Table of contents Symbol Data Type The reason why...

MySql inserts data successfully but reports [Err] 1055 error solution

1. Question: I have been doing insert operations ...

When is it appropriate to use dl, dt, and dd?

dl:Definition list Definition List dt:Definition t...

Summarize how to optimize Nginx performance under high concurrency

Table of contents Features Advantages Installatio...

Web Theory: Don't make me think Reading Notes

Chapter 1 <br />The most important principl...

Implementation of running SQL Server using Docker

Now .net core is cross-platform, and everyone is ...