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

Detailed graphic tutorial on installing centos7 virtual machine in Virtualbox

1. Download centos7 Download address: https://mir...

Detailed explanation of the correct use of the count function in MySQL

1. Description In MySQL, when we need to get the ...

Analysis of the reasons why Vue3 uses Proxy to implement data monitoring

Vue data two-way binding principle, but this meth...

Detailed explanation of where the image pulled by docker is stored

20200804Addendum: The article may be incorrect. Y...

Command to view binlog file creation time in Linux

Table of contents background analyze method backg...

The use of anchor points in HTML_PowerNode Java Academy

Now let's summarize several situations of con...

Introduction to nesting rules of html tags

There are many XHTML tags: div, ul, li, dl, dt, d...

How are spaces represented in HTML (what do they mean)?

In web development, you often encounter characters...

Linux 6 steps to change the default remote port number of ssh

The default ssh remote port in Linux is 22. Somet...

A few experiences in self-cultivation of artists

As the company's influence grows and its prod...

How to manage docker through UI

Docker is being used in more and more scenarios. ...

Implementation of Nginx load balancing/SSL configuration

What is load balancing? When a domain name points...