Posted on Leave a comment

Beginners guide to Lynis

Hello, aspiring ethical hackers. In this blogpost, you will learn about a tool called Lynis, the security auditing and hardening tool for UNIX based systems like Linux, macOS, BSD and others. It performs an in-depth security scan to test security defenses and provide suggestions for further system hardening.

This tool audits the following features on the system.

  1. General system information.
  2. System tools.
  3. Operating system.
  4. Boot and other services.
  5. Kernel vulnerabilities.
  6. Memory and processes.
  7. Users, groups and authentication
  8. Kerberos
  9. Shells
  10. File systems
  11. USB devices
  12. Storage
  13. NFS
  14. Name Services
  15. Ports and packages
  16. Networking
  17. Printers and Spool
  18. Email and messaging software
  19. Firewalls
  20. Web servers
  21. SSH and SNMP
  22. Databases
  23. PHP (in web server)
  24. Logging and log files
  25. Insecure services
  26. Banners
  27. Scheduled Tasks
  28. Accounting
  29. Time and synchronization
  30. Cryptography
  31. Virtualization
  32. Containers
  33. Security frameworks
  34. System tools and malware
  35. File permissions etc.

Let’s see how to run Lynis for the first time. For this, we will be using Kali Linux. It can be installed on Kali as shown below.

Lynis 1

After the installation is successful, run the command shown below to run it to audit the entire system.

lynis audit system
Lynis 2

It runs as shown below.

Lynis 3

While auditing, wherever there is scope for hardening, lynis adds a suggestion as shown below.

Lynis 4
Lynis 5
Lynis 6
Lynis 7

After the entire system is audited, Lynis provides summary of the entire audit as shown below.

Lynis 11
Lynis 12
Lynis 13

Below the summary, you can find each suggestion as shown below.

Lynis 8
Lynis 9
Lynis 10

You can harden your system based on these suggestions. You can also find this information in the log reports of Lynis.

Lynis 14
Lynis 15
Lynis 16
Lynis 17

Follow Us
Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.