Nessus Training Session 1 - Installation, Configuration, and Maintenance
Total Page:16
File Type:pdf, Size:1020Kb
Nessus Training Session 1 - Installation, Configuration, and Maintenance Prepared by Ramsey Dow <[email protected]> for NWACC Contents Prerequisites for Nessus Installation Nessus Software Activation Code Scan server Installation Ubuntu Server 13.04 Windows Server 2012 R2 Maintenance and Troubleshooting Verifying that Nessus is running Starting, stopping and restarting the Nessus daemon Checking your plugin feed Updating your plugin feed Managing users from the command line Updating your shell environment for Nessus Refreshing Tenable policy templates Upgrading Nessus Uninstalling Nessus Useful Web Sites and Resources Nessus Vulnerability Scanner Other Security Tools National Vulnerability Database Vendor Resources Prerequisites for Nessus Installation Note: The Useful Web Sites and Resources section at the end of this handout has a list of all of the important URIs referenced herein. Please keep that attachment handy as you work through the instructions contained herein. Nessus Software First, you must acquire the software. Download the correct distribution package from Tenable’s Nessus download page. Browse to http://www.tenable.com/products/nessus/select-your-operating-system Right click to expand the operating system of your choice Download the appropriate package (typically 64-bit in this day and age) Click on the Agree button to initiate the download Be sure to confirm the integrity of the installation package by comparing the downloaded file’s MD5 checksum with the one listed in the MD5.asc file. Download https://static.tenable.com/marketing/MD5.asc Verify the hash of the file you downloaded with that in the MD5.asc file I tend to use md5deep, a freely available cryptographic hashing utility. (Don’t let the name fool you, it does SHA–256, too.) md5deep -m MD5.asc * 2>/dev/null The -m switch invokes matching mode, which prints the full pathname of every file with a matching hash in the match file, MD5.asc. It should go without saying, but do not use files that fail this integrity check. Here we can see that the Ubuntu version I downloaded is OK: � ~/Downloads $ md5deep -m MD5.asc * 2>/dev/null /Users/ramsey/Downloads/Nessus-5.2.3-ubuntu1110_amd64.deb Activation Code You need to have an Activation Code handy. Recently, scanner activation has been made an integral part of the installation process. If you don’t have an Activation Code then you won’t be able to complete the installation process. If you have a ProfessionalFeed then you will have received this code in an email from Tenable. You can also get it from the Tenable Support Center. If you are just experimenting you can install Nessus Home instead of the commercial version. You can pick up an Activation Code from the Nessus Home page. A brief word is in order about Nessus Home. It is similar to the commercial version of Nessus, but is definitely missing some plugins. Notably absent are the SCADA plugins and the robust compliance checking system. In addtion, Nessus Home can only scan 16 IPs at a time. Recently, Nessus Home scans have started complaining when scanning non-RFC 1918 address space. Complaints aside, Nessus still scans these addresses. Scan server Nessus can be installed on a wide variety of contemporary operating systems, including FreeBSD, Solaris, several flavors of Linux, and Windows. For this training we will be installing Nessus on both Ubuntu Server 13.04 and Windows Server 2012 R2. Nessus is a Linux application and it definitely runs best on Linux. Lots of people run Nessus on Windows, however, so we will definitely be taking a look at that. Because of its heritage, Nessus operates better on Linux, especially when scanning large networks (e.g., 10,000+ hosts). I definitely recommend running the Nessus server on Linux. A Nessus scan server should be configured with a minimum of 2 GiB of RAM. If you plan to scan large numbers of hosts then 4 GiB would be better. Nessus stores data from past scans. You can delete historical scan data, but keeping it on the server allows you to browse it, filter on it, modify results, and produce differential reports. I recommend configuring your Nessus scan server with about 64 GB of disk. Nessus runs fine in a VM. Just make sure that its network adapter is bridged or problems will ensue. Finally, Tenable recommends against running a host-resident firewall on your Nessus server. It is certainly possible, but might cause problems. I run a kernel-resident packet filter on Casaba’s Internet-facing Nessus scanner and we have no problems. Installation Ubuntu Server 13.04 These instructions detail how to install Nessus on Ubuntu Linux. The installation process is slightly different with each supported operating system. The Nessus 5.2 Installation and Configuration Guide has detailed instructions for each supported platform. These instruction assume a fresh Nessus install. Refer to Upgrading Nessus in the Maintenance and Troubleshooting section, hereafter, for details on performing an upgrade installation. Make sure that you have satisfied all of the requirements: You have the right Nessus distribution package You have the right kind of Activation Code You have a properly configured server on which to deploy Nessus Now you need to get the software on to your server. I use scp: scp Nessus-5.2.3-ubuntu1110_amd64.deb [email protected]:. Finally, login to the server and install Nessus as root. sudo dpkg -i Nessus-5.2.3-ubuntu1110_amd64.deb Wait while Nessus to finish installing itself. Eventually you will receive a notice to browse to https://localhost:8834/ to complete the installation. (Actually, it will refer to the hostname, but localhost will work fine.) Browse to https://localhost:8834/ and follow the instructions. First you will be prompted to enter the name and password for the Nessus administrator. On the next screen you will have to enter your Activation Code. After your scanner instance has been successfully activated it will begin to download the latest plugin set from Tenable’s plugin distribution servers. There are over 50,000 plugins, so the installation may take ten minutes or so to run to completion. Eventually you will be presented with the Nessus login screen. Windows Server 2012 R2 These instructions detail how to install Nessus on Windows Server 2012 R2. These instruction assume a fresh Nessus install. Refer to Upgrading Nessus in the Maintenance and Troubleshooting section, hereafter, for details on performing an upgrade installation. Make sure that you have satisfied all of the requirements: You have the right Nessus distribution package You have the right kind of Activation Code You have a properly configured server on which to deploy Nessus A couple of additional notes apply to Windows installations. First, antivirus and antimalware software might flag Nessus as hostile. If that happens, temporarily disable protections for the duration of the installation. Second, you need to disable IE Enhanced Security Configuration for administrators for the duration of the installation. This step is required because part of the Nessus installation process is browser-driven. Failure to disable IE Enhanced Security Configuration for the Administrator user will prevent the installation from succeeding. Run Server Manager Click on Local Server Find IE Enhanced Security Configuration, currently set to on Click on on Disable it for Administrators Click the OK button You can safely re-enable IE Enhanced Security Configuration for administrators after the browser-based portion of the installation has run to completion (i.e., when the login screen first appears). The actual installation process follows and is straightforward. Double-click the Nessus-5.2.3-x64.msi installer pacakge Click the Next > button Accept the license agreement and click the Next > button Accept the default installation location and click the Next > button Confirm the installation by clicking the Install button Click the Yes button when asked to elevate privileges Opt to install custom NDIS layer drivers if asked Click the Finish button when the install completes Note that you will only be asked to install NDIS layer drivers once. If you uninstall and then reinstall Nessus you won’t be asked again. Unfortunately, this is the case with the video, so we aren’t prompted as to whether we want to allow NDIS driver installation. When you perform your install you will be asked. Respond affirmatively. This driver is required for low- level packet manipulation. After the installer is dismissed, IE will attempt to load http://localhost:8834/. You will be prompted to connect via SSL instead. Click on the supplied link. WARNING: If you navigate away from the installation sequence before you specify the Nessus administrator’s user name and password then your installation will be broken. In such a case the fastest way to rectify things is to uninstall and then reinstall Nessus. IE will warn you that the site’s certificate is self-signed. Click the Continue to this website (not recommended) link. Click the Get started > button Enter a user name and password for your Nessus administrator user. I tend to use my name, but you can name the account anything you want. Click the Next > button when you are ready to proceed. Now you will be prompted to enter your Activation Code. Clicking the Next > button will trigger an outbound connection to Tenable activation servers. Click the Optional Proxy Settings button if you need to specify a web proxy. Click the Next > button when ready. Once your scanner instance is activated you will need to click the Next: Download plugins < button. There are over 50,000 plugins, so the download will take about 10 minutes or so on a reasonable network. Once all plugins have been downloaded the browser will refresh to the scanner’s login page.