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

Use of Linux file command

1. Command Introduction The file command is used ...

Two ideas for implementing database horizontal segmentation

introduction With the widespread popularity of In...

Introduction to JavaScript built-in objects

Table of contents 1. Built-in objects 2. Math Obj...

Summary of MySQL's commonly used database and table sharding solutions

Table of contents 1. Database bottleneck 2. Sub-l...

jQuery plugin to implement accordion secondary menu

This article uses a jQuery plug-in to create an a...

Summary of 6 Linux log viewing methods

As a backend programmer, you deal with Linux in m...

How to configure Openbox for Linux desktop (recommended)

This article is part of a special series on the 2...

CSS World--Code Practice: Image Alt Information Presentation

Using the <img> element with the default sr...

Get the IP and host name of all hosts on Zabbix

zabbix Zabbix ([`zæbiks]) is an enterprise-level ...

Briefly talk about mysql left join inner join

Preface I have been busy developing a cold chain ...

Detailed explanation of json file writing format

Table of contents What is JSON Why this technolog...

WeChat applet realizes left-right linkage

This article shares the specific code for WeChat ...

Explain how to analyze SQL efficiency

The Explain command is the first recommended comm...

Summary of Linux command methods to view used commands

There are many commands used in the system, so ho...