Install Nessus Scanner on Ubuntu 22.04 Best Security Scanner
In this guide, we’ll walk you through How To Install Nessus Scanner on Ubuntu 22.04. You will also learn how to Create the First Scan with Nessus on Ubuntu 22.04. This comprehensive tutorial aims to equip you with the knowledge to leverage Nessus, a powerful tool for vulnerability assessment, on your Ubuntu 22.04 system.
Nessus is a widely-used open-source network vulnerability scanner that utilizes the Common Vulnerabilities and Exposures (CVE) architecture. This allows for seamless integration and cross-linking with other security tools adhering to the same standards. At its core, Nessus employs the Nessus Attack Scripting Language (NASL), a relatively straightforward language designed to describe specific threats and potential attack vectors.
Nessus boasts a modular architecture, comprising centralized servers that orchestrate scanning operations and remote clients that enable administrator interaction. This architecture allows administrators to incorporate NASL descriptions of potential vulnerabilities, tailoring scans to specific environments and requirements. This makes Install Nessus Scanner on Ubuntu 22.04 a vital step for securing your system.
Steps To Install and Configure Nessus Scanner on Ubuntu 22.04
Before we dive into the installation process, it’s essential to ensure your Ubuntu 22.04 server is properly prepared. This guide assumes you have logged in as a non-root user with sudo privileges and have set up a basic firewall. If you haven’t already done so, refer to a guide on Initial Server Setup with Ubuntu 22.04 for detailed instructions.
1. Install Nessus Security Scanner on Ubuntu 22.04
The first step is to update your system’s package index to ensure you have the latest package information. Use the following command:
sudo apt update
Download Nessus Installer
Next, you’ll need to download the Nessus installer package. Visit the Nessus Downloads page to obtain the latest installer. Alternatively, you can use curl
to download the installer directly from the command line. Be sure to replace the filename with the correct version number:
curl --request GET
--url 'https://www.tenable.com/downloads/api/v2/pages/nessus/files/Nessus-10.4.1-ubuntu1404_amd64.deb'
--output 'Nessus-10.4.1-ubuntu1404_amd64.deb'
Once the download is complete, install the Nessus security scanner using the following command:
sudo dpkg -i Nessus-10.4.1-ubuntu1404_amd64.deb
You should see an output similar to this:
**Output**
- You can start Nessus Scanner by typing /bin/systemctl start nessusd.service
- Then go to https://hostname:8834/ to configure your scanner
Manage Nessus Scanner Service
Now that Nessus is installed, you need to start and enable the service to ensure it runs automatically on boot. Execute the following commands:
sudo /bin/systemctl start nessusd.service
sudo systemctl enable nessusd
To verify that the Nessus scanner is active and running, use the following command:
sudo systemctl status nessusd
The output should indicate that the service is active and running:
**Output**
● nessusd.service - The Nessus Vulnerability Scanner
Loaded: loaded (/lib/systemd/system/nessusd.service; enabled; vendor prese>
Active: **active** (**running**) since Mon 2022-11-14 09:42:33 UTC; 41s ago
Main PID: 2693 (nessus-service)
Tasks: 13 (limit: 4575)
Memory: 48.5M
CPU: 48.661s
CGroup: /system.slice/nessusd.service
└─2693 /opt/nessus/sbin/nessus-service -q
└─2694 nessusd -q
...
Configure Firewall For Nessus
Assuming you are using the UFW firewall, you need to allow traffic to the Nessus port (8834) through the firewall. Run the following command:
sudo ufw allow 8834/tcp
Reload the firewall to apply the new rule:
sudo ufw reload
2. Access Nessus Scanner Dashboard
With Nessus installed and the firewall configured, you can now access the web interface. Open your web browser and navigate to the following address, replacing <server-ip>
with your server’s IP address:
https://<server-ip>:8834
You will be presented with the Nessus Scanner welcome page, where you’ll need to choose a deployment option. For this guide, we’ll select Nessus Essentials, the free version for educators, students, and hobbyists.
[Image of Nessus welcome page with Nessus Essentials selected]
Next, you’ll need to register to receive an activation code. Enter your information in the provided form.
[Image of Nessus email registration form]
Enter the activation code you received via email and click "Continue".
[Image of Nessus activation code entry field]
Create an administrator user account for Nessus and click "Submit".
[Image of Nessus admin user account creation form]
Nessus will now prepare the files needed to scan your assets. Once complete, you’ll be greeted with the Nessus scanner dashboard.
[Image of Nessus scanner dashboard]
Now that you have your Nessus scanner set up, let’s create your first scan to understand how to Install Nessus Scanner on Ubuntu 22.04.
3. Create First Scan with Nessus on Ubuntu 22.04
Let’s walk through scanning your Ubuntu system for vulnerabilities using the Nessus web dashboard. From the dashboard, click on My Scans and then click Create a new scan.
[Image of Nessus dashboard with "Create a new scan" highlighted]
Select a scan template for your new scan. We’ll use the ‘Basic Network Scan’ template for this example.
[Image of Nessus scan template selection page with "Basic Network Scan" highlighted]
Enter a name and description for your scan, specify the folder to store the scan results, and enter the target server’s IP address. Click "Save" to save the new scan configuration.
From the "My Scans" page, you’ll see the newly created scan. Click the "Launch" button to start the scan. And that is all it takes to get your first scan running after you Install Nessus Scanner on Ubuntu 22.04.
4. Set up the Nessus command line on Ubuntu 22.04
To interact with Nessus from the command line, you need to configure your environment.
First, add the Nessus binary directories to your system’s PATH:
echo 'export PATH="$PATH:/opt/nessus/bin:/opt/nessus/sbin"' >> ~/.bashrc
Then, reload the ~/.bashrc
configuration:
source ~/.bashrc
You can now use the nessuscli
command. Verify the configuration by checking the location of the binary and displaying the help menu:
# which nessuscli
# nessuscli help
**Output**
Usage: nessuscli <command> [<options>]
Usage: nessuscli <command> help
Bug Reporting Commands:
bug-report-generator
bug-report-generator --quiet [--full] [--scrub]
User Commands:
rmuser [username]
chpasswd [username]
adduser [username]
lsuser
Dump Commands:
dump --plugins
Fetch Commands:
fetch --register <serial>
fetch --register-offline <license.file>
fetch --check
fetch --code-in-use
fetch --challenge
fetch --security-center
fetch --scanner-health-stats
Node Commands:
node link --key=<key> --host=<host> --port=<port>
node unlink
node status
Fix Commands:
fix [--secure] --list
fix [--secure] --set <name=value>
fix [--secure] --get <name>
fix [--secure] --delete <name>
fix [--secure] --show
fix [--secure] --show <name>
fix --list-interfaces
fix --reset
Certificate Commands:
import-certs
mkcert-client
mkcert [-q]
Backup Tool:
backup --create <backup file filename>
backup --restore <backup file path>
Software Update Commands:
update
update --all
update --plugins-only
update <plugin archive>
Conclusion
In this guide, you have successfully learned to Install and Configure the Nessus scanner on Ubuntu 22.04. Nessus is a valuable tool for vulnerability scanning and network security assessment, helping you identify potential security risks in your systems and networks. This ensures better protection and reduces your attack surface.
Here are some additional resources you might find helpful:
How To Set up Nessus Scanner on Debian 11
Install Nessus Scanner on Windows Server 2022
Debian 13 Release Date and Download
Alternative Solutions for Vulnerability Scanning on Ubuntu 22.04
While Nessus is a powerful and popular vulnerability scanner, several alternative solutions are available that you might consider. Here are two different approaches:
1. OpenVAS:
OpenVAS (Open Vulnerability Assessment System) is a free and open-source vulnerability scanner that provides a comprehensive vulnerability management solution. It is a fork of Nessus when it became proprietary. OpenVAS is a powerful alternative, often preferred for its open-source nature and strong community support.
-
Explanation: OpenVAS operates similarly to Nessus, using a central server to manage scans and a client interface to interact with the scanner. It uses a regularly updated feed of Network Vulnerability Tests (NVTs) to identify vulnerabilities. OpenVAS offers a wide range of scanning capabilities, including network discovery, vulnerability detection, and compliance auditing. It provides detailed reports on identified vulnerabilities, along with recommendations for remediation.
-
Installation and Usage:
-
Installation: OpenVAS can be installed on Ubuntu 22.04 using the following commands:
sudo apt update sudo apt install openvas sudo openvas-setup
The
openvas-setup
command will configure the OpenVAS environment, including creating users, downloading NVT feeds, and starting the necessary services. This process can take a significant amount of time. - Usage: After installation, you can access the OpenVAS web interface by navigating to
https://localhost:9392
in your web browser. You can then create and launch scans, view reports, and manage your vulnerability assessment environment. - Command Line Interface: OpenVAS also offers a command-line interface (CLI) for interacting with the scanner. The
omp
command allows you to manage scans, tasks, and reports from the terminal.
-
2. Lynis:
Lynis is a security auditing tool specifically designed for Linux and Unix-based systems. Unlike Nessus and OpenVAS, which focus on network vulnerabilities, Lynis performs a deep system scan to identify security weaknesses and hardening opportunities.
-
Explanation: Lynis is a command-line tool that performs hundreds of security tests on the host system. It checks for vulnerable software packages, configuration errors, insecure services, and other potential security issues. Lynis generates a detailed report with recommendations for improving the system’s security posture. It’s lightweight, easy to use, and doesn’t require a central server or web interface. Lynis is excellent for performing local security audits and ensuring your system is properly hardened.
-
Installation and Usage:
-
Installation: Lynis can be installed on Ubuntu 22.04 using the following commands:
sudo apt update sudo apt install lynis
-
Usage: To perform a system audit, run the following command:
sudo lynis audit system
Lynis will then perform a series of security tests and generate a report in the
/var/log/lynis.log
file. You can review the report to identify potential security issues and follow the recommendations provided by Lynis to harden your system. Lynis also provides helpful suggestions during the scan process. -
Example Output (Snippet):
... [+] Hardening tips --------------------- * Consider deploying a malware scanner like rkhunter or chkrootkit to search for suspicious files. [FILE-7524] https://cisofy.com/lynis/controls/FILE-7524/ * Harden the system by setting kernel parameters. [KRNL-5830] https://cisofy.com/lynis/controls/KRNL-5830/ * Install a tool like debsums for integrity checking of packages. [PKGS-7372] https://cisofy.com/lynis/controls/PKGS-7372/ ...
-
These alternative solutions offer different approaches to vulnerability scanning and security auditing. OpenVAS provides a comprehensive vulnerability management solution similar to Nessus, while Lynis focuses on local system hardening. Choosing the right tool depends on your specific needs and requirements. Install Nessus Scanner on Ubuntu 22.04 is one way to protect your server, but exploring alternatives ensures you have a well-rounded security strategy.