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

React implements the expansion and collapse function of complex search forms

Give time time and let the past go. In the previo...

CentOS 7 set grub password and single user login example code

There are significant differences between centos7...

Vue implements a search box with a magnifying glass

This article shares with you how to use Vue to im...

Summary of the data storage structure of the nginx http module

Starting from this section, we will explain the i...

Summary of uncommon js operation operators

Table of contents 2. Comma operator 3. JavaScript...

Problems encountered in using MySQL

Here are some problems encountered in the use of ...

How to prevent event bubbling in JavaScript

What we need to pay attention to is that the char...

VUE+Canvas implements the game of God of Wealth receiving ingots

Welcome to the previous canvas game series: 《VUE ...

20 excellent foreign web page color matching cases sharing

This article collects 20 excellent web page color ...

Mac node deletion and reinstallation case study

Mac node delete and reinstall delete node -v sudo...

Detailed explanation of error handling examples in MySQL stored procedures

This article uses an example to describe the erro...

Vue implements internationalization of web page language switching

1. Basic steps 1: Install yarn add vue-i18n Creat...

Detailed steps for installing and configuring MySQL 5.7

1. Download MySQL 1. Log in to the official websi...