Performing Nessus Scans on CMS Nodes

These instructions were developed using Nessus 2.2.5 for Linux.

Starting the Nessus Client

  1. Nessus is now installed on cmssrv15 for you (so you can go to step 2) but if you want to download it anyway, you can download Nessus package from www.nessus.org
  2. The first time you start Nessus, you get asked about your preferred "SSL paranoia level."  Choosing "1" will work
  3. Read http://security.fnal.gov/Nessus/Fermilab_Security_Scanning_using_Nessus.htm for details on how to log on.  I had to make the change described at  http://security.fnal.gov/Nessus/Fermi_Nessus_Scanning_FAQ.htm#_Toc61246788.  Look on that page if you get other errors connecting (e.g., I had some mismatch between my DN in the Fermilab phone directory and the Active Directory, both of which need to match).  If you need more help, you can contact nessus-users@fnal.gov.
  4. So far, it has been my experience that if you do not get an error immediately after pressing the "Login" button on the client, then you are being logged in; note that this takes several seconds (around 20 seconds) where the client appears to be hanging.  If you are successful, it moves you to the "Plugins" tab.

Configuring the Nessus Client for Scanning CMS Nodes

  1. Login to cmssrv15 (as yourself, not root); type "kx509; kxlist -p" to generate the certificate and key files.
  2. Start the Nessus client and log in.
  3. Click the "Plugins" tab:
    1. click the "Enable all" button
    2. check the "Enable dependencies at runtime" option
  4. Click the "Scan Options" tab:
    1. Choose a port scanner.  We used NMAP but that appears to have disappeared as of 2005-10-25.  So I chose the Nessus TCP Scanner.  If this is not there in the list anymore, then send e-mail to nessus-users@fnal.gov for advice.
    2. Uncheck the "Safe checks" option in order to run all checks (note that this means that some potentially dangerous checks will be performed on the host; so if you do not want this, leave this option checked).
    3. Set the range of ports to scan to 1-65535
  5. Click the "Target" tab:
    1. Enter a comma separated list of hosts you want to scan.  If you want to scan a large number of hosts, you can list them one per line in a text file and then read it in by clicking the "Read file..." button and selecting the appropriate .
    2. Click the "Start Scan" button.
  6. When the scan is complete, a new window will pop up showing you the results.  Save the file in NBE format by clicking the "Save Report..." button, choosing "NBE" as the "Report file format" and choosing a name that indicates the range of hosts followed by the date in YYYY-MM-DD format and ending with the ".nbe" extension.  For example, if you scanned all of the cmssrv* nodes on 2005-Oct-25, then you could name the file cmssrv_2005-10-25.nbe.

Importing Scan Results into the Database

NOTE: It is a limitation of Nessus (not nessus-php) that only the date (not the time) is saved in the nessus report.  This means that if you scan a node and import the data, then fix the problems, scan the node again the same day and then reimport it (at any time), your old scan data for that day will be overwritten.  It would be best just to wait until the next day and do another scan then import it (note that it is the scan date, not the import date that is important).
  1. Log in as root@cmssrv15
  2. Copy or move your .nbe file to /root/nessus/nessus_nbe_reports/
  3. cd /root/nessus/nessus-php-0.4
  4. ./add-nbe -n /root/nessus/nessus_nbe_reports/<report_name>
    1. You will see:
      Welcome to Nessus-PHP's "add-nbe" interface.
      Skipping script retrieval.
      Adding report data for host <hostname>
      <plus one similar line for each additional host report stored in this .nbe file>
  5. Now you should be able to view this new data at https://cmssrv15.fnal.gov/nessus  (your CN for your DOE grids cert will need to be added to /etc/httpd/conf.d/nessus-php.conf and your DOE grid cert will need to be loaded into your browser).  Note that you MUST use https in the URL.
  6. Make sure you analyze this report for any "Security Holes".