Installing and Utilizing Nessus Security Scanner on Rocky Linux

Nessus is a renowned open-source network vulnerability scanner, extensively utilized for vulnerability assessments, penetration testing, and ethical hacking. It integrates the Common Vulnerabilities and Exposures (CVE) architecture to deliver one of the market’s most comprehensive scanning solutions. Nessus facilitates the identification of network vulnerabilities, misconfigurations, Denial of Service (DoS) vulnerabilities, and more.

Providing high-speed asset discovery, target profiling, configuration auditing, malware detection, and sensitive data discovery, Nessus is available in multiple versions: Nessus Essentials, a free tool, and Nessus Professional for advanced penetration testers and ethical hackers.

This guide details the installation of the Nessus Security Scanner on a Rocky Linux server and demonstrates setting up the Nessus CLI for terminal command management, ultimately showing you how to scan a server using Nessus.

Prerequisites

Before proceeding with this guide, ensure you have the following:

  • A Rocky Linux server (this example uses Rocky Linux 8 with the hostname ‘nessus-server‘).
  • A non-root user with sudo/root administration privileges.
  • SELinux set to ‘permissive‘ mode.

Installing Nessus via RPM File

Nessus is designed for enterprise-class security and can be installed on various operating systems, including Linux distributions, BSD, Windows, and macOS. The complete list of Nessus packages is available on the Nessus download page, offering various packages for Linux distributions, including the .deb file for Debian-based and the .rpm file for RHEL-based distributions.

For Rocky Linux, download the Nessus .rpm file and install it using the ‘rpm’ command.

Begin by installing curl with the following dnf command:

sudo dnf install curl

Next, download the Nessus RPM file using this curl command. The latest version at the time of writing is Nessus v10.4:

curl --request GET \
  --url 'https://www.tenable.com/downloads/api/v2/pages/nessus/files/Nessus-10.4.1-es8.x86_64.rpm' \
  --output 'Nessus-10.4.1-es8.x86_64.rpm'

Upon completion, the file ‘Nessus-10.4.1-es8.x86_64.rpm‘ will appear in your current directory.

Downloading Nessus

Install the package with this command:

sudo rpm -Uvh Nessus-10.4.1-es8.x86_64.rpm

After installation, you should see an output similar to this:

Installing Nessus

Start and enable the Nessus service:

sudo systemctl start nessusd
sudo systemctl enable nessusd

Verify the service status:

sudo systemctl is-enabled nessusd
sudo systemctl status nessusd

The Nessus service should be enabled and automatically start on boot, with a running status.

Starting Nessus

Configuring Firewalld

Post-installation, configure Firewalld to open port 8834 for the Nessus administration dashboard:

Add port 8834/tcp:

sudo firewall-cmd --add-port=8834/tcp --permanent

Reload Firewalld to apply changes:

sudo firewall-cmd --reload

Verify open ports:

sudo firewall-cmd --list-all

Configuring Firewalld

You can now access Nessus from your web browser.

Nessus Basic Configuration

Proceed to set up and start Nessus installation by installing Nessus Essentials. Ensure you have an email address ready to receive the activation code.

Access the server IP via a browser at https://[server_IP]:8834/. Select ‘Nessus Essentials‘ and click ‘Continue‘.

Nessus Essentials

Enter your name and email to receive the activation code and click ‘Email‘.

Get Activation Code

Input the activation code and continue.

Activate Nessus

After verification, create an admin user, then submit.

Create Admin User

Installation will commence, including plugin compilation. This takes time to complete.

Installing Plugins

Upon completion, access the Nessus dashboard as the admin user.

Nessus Dashboard

Setting up Nessus CLI

Nessus is installed in ‘/opt/nessus’. To enable CLI usage, append ‘/opt/nessus/bin’ and ‘/opt/nessus/sbin’ to the system’s $PATH environment variables.

First, list directories inside the installation directory:

ls /opt/nessus

Add Nessus paths to your $PATH:

echo 'export PATH="$PATH:/opt/nessus/bin:/opt/nessus/sbin"' >> ~/.bashrc

Reload the configuration:

source ~/.bashrc
echo $PATH

Nessus CLI should now be accessible:

which nessuscli
nessuscli help

Nessus PATH

Creating Your First Scan with Nessus

On the dashboard, select ‘Create a new scan‘.

Create Scan

Choose ‘Basic network scan‘.

Network Scan

Enter scan details (name, description, folder, target host) and click ‘Save‘. This example uses ‘scan-rocky-linux‘ targeting ‘192.168.5.100‘.

Scan Target

Under ‘My Scan’, locate your scan. Click the play button to start.

Start Scan

Your ‘scan-rocky-linux‘ is now running.

Running Scan

Click ‘scan-rocky-linux‘ for scan results, and check ‘Vulnerabilities‘ for detailed information.

Scan Host Summary

Vulnerabilities List

Conclusion

Congratulations! You have successfully installed the Nessus Security Scanner on a Rocky Linux server. This guide helped you set up Nessus and configure the CLI, enabling you to run and manage scans directly from the terminal. Additionally, you’ve learned to create scans and identify security vulnerabilities using Nessus.

Frequently Asked Questions (FAQ)

1. What is Nessus used for?

Nessus is used for vulnerability scanning, vulnerability assessments, penetration testing, and ethical hacking to identify security weaknesses in networks and systems.

2. Is Nessus free to use?

Nessus Essentials is free for limited use, while Nessus Professional requires a subscription for advanced features suitable for professional penetration testers and ethical hackers.

3. Can Nessus run on other operating systems?

Yes, Nessus is compatible with multiple operating systems, including Linux, BSD, Windows, and macOS.

4. How do I access the Nessus interface?

You can access Nessus through a web browser using the server’s IP address followed by port 8834 (e.g., https://192.168.5.100:8834/).

5. What are Nessus plugins?

Nessus plugins are scripts used to detect vulnerabilities based on version, configuration, and patch information.