SANS Penetration Testing

Data, Data, Everywhere - What to do with Volumes of Nessus Output

[Editor's note: Here's a really nice article by Kevin Fiscus on a tool that'll help you analyze and manage a great deal of Nessus vulnerability scanner output. This is really helpful, cool stuff! Thanks, Kevin. -Ed.]

By Kevin Fiscus

Doing really good, high-value penetration testing is hard. You have to start with a solid, repeatable methodology on which you build a process implemented via tools and techniques. It is a technical endeavor that is, more often than not, remarkably creative. But, to do it well, you need to understand hacker techniques, cyber defense, protocols, packets, and even people. Sometimes, however, basic logistics get in the way. The problem, in many cases, is that the tools are simply too good, or rather, they give too much information but lack a particularly effective way for a penetration tester to use that information. Case in point: Nessus.

Nessus is a fantastic vulnerability scanner. It has the capability to perform both credentialed and uncredentialled scans of target environments, and test for tens of thousands of vulnerabilities across an enormous range of platforms. For the budget conscious among us, it is also one of the more cost effective commercial solutions on the market. Unfortunately, while superior in many ways, it is not known for its reporting capabilities. Tenable Network Security, the creators of Nessus, have additional products to provide more advance reporting capabilities, but purchasing them changes the cost structure considerably.

The problem, thus, is one of data overload from any vulnerability scanner, including Nessus. Particularly when performing internal, credentialed scans against network resources, the amount of data generated can be overwhelming. While generally presented in an easy-to-understand format, the data you'll be given includes each vulnerability individually. Nessus has the capability to view results by IP address or by vulnerability, so identifying the most vulnerable server by vulnerability count or the most common critical severity vulnerability is fairly easy. But what if you wanted to identify the most vulnerable server in terms of the common vulnerability scoring system (CVSS), or wanted to count the number of servers with at least one high or at least one critical severity vulnerability? These things can be difficult within the Nessus interface and are more difficult when looking at Nessus output reports. Fortunately, there are answers for nifty and high-value ways to slice and dice Nessus results.

Nessus has the ability to output reports in a variety of formats, one of which is XML. This has allowed the security community to create tools to parse Nessus results and convert them into a variety of other formats. The one I tend to like can be found at http://www.melcara.com and is called, very originally, "Nessus Parser." The current version, as of the writing of this posting, is v20a. And, it's free.

The Melcara Nessus Parser is a Perl program that converts Nessus XML output into a Microsoft Excel workbook. It doesn't just create a CSV file with basic scan results, it creates an entire workbook consisting of over TWENTY tabs. A brief tour of at least a few of these tabs will help illustrate the benefits of this tool.

The "Home Worksheet" tab contains summary information about the numbers and counts of vulnerabilities and vulnerable systems as shown below:

The "CVSS Score Total" tab includes, for each IP address scanned, Common Vulnerability Scoring System results and allows you to tune the final scores by introducing a score modifier. By changing the value of a few cells, you can increase the contributing factor of a medium severity from 1 to 1.25, a high severity to 1.5 and a critical to 1.75 (or any value you want). The spreadsheet has been formatted to allow easy sorting on any column.

A series of five tabs labeled Critical, High, Medium, Low, and Informational provide counts and details for each identified vulnerability. For each tab, it lists the type of vulnerability (plugin family), the vulnerability name (plugin name), the number of instances of that vulnerability identified, a description of the vulnerability, the recommended solution, and whether there are exploits for the vulnerability included in Canvas, Metasploit, or Core Impact. That last tidbit is really cool and helpful for penetration testers looking to move from scanning into outright exploitation of target systems.

The "Device Type" tab provides the IP address, fully qualified domain name, NetBIOS name, and device type for every tested system while the "HostConfigData" tab provides the number of vulnerabilities by severity for each IP address. This tab also provides information about minimum password length, password history length, minimum/maximum password age, complexity requirements and account lockout information if credentialed tests were run. The "portScanData" tab contains information about listening ports and services for each IP address while "InstalledSoftwareData" provides information about software identified to be installed on each target system.

The "UserAccount Data" tab provides information about user accounts found on each tested system, including where the account was found (local or Active Directory), the account name, and the SID and the type of account (e.g. Domain User, Domain Administrator, etc.). This tab also includes information about whether the password for the account has ever been changed, whether the account has been disabled, whether it has ever logged in, and information about certain group membership. Additional tabs provide information about Wireless Access Points and SSIDs detected, passed or failed compliance or policy checks, and various summary information.

Other than the "Home Worksheet", all of the tabs are formatted to allow for filtering and sorting of the data in any column, and because the data is in Excel, the workbooks can be expanded with graphs, charts, pivot tables, etc. That's pretty sweet. Also, got a whole bunch of Nessus results from several scans against several target environments? The Melcara Nessus Parser has the capability of taking multiple Nessus XML files as input, and track which file the results came from, for each row of data presented. Thus, if you wanted to scan five different locations individually, you could look at their results individually, as a whole, or any subset thereof.

Getting the Nessus Parser to run can be somewhat challenging. You, of course, need to install Perl and there are a whole set of CPAN modules that need to be installed for it to run. That said, it is my experience that the author of the tool is extremely helpful, should you run into problems. Once everything is set up, running the tool is easy and involves these steps:

Step 1: Export the results of your Nessus scans in XML (or .nessus) format
Step 2: Place all the XML files into a directory
Step 3: Execute the command "perl parse_nessus_xml.v20a.pl -d <directory>" where the directory is the location of the XML files.

The parser will look at all of the files in the selected directory, identify those that contain Nessus output, and generate an output report based on provided input. There are a couple of additional command line switches that can be used to control the output:

  • The default output file will be called "nessus_report_XXXXXXXXX" where the X's will be replace with data and time information. If you want to change the prefix of "nessus_report" to something else, you do it with the -o option
  • If you want to run the tool against an individual file instead of a directory, you can use the -f <filename> instead of -d <directory>.
  • The -r option allows you to change the severity of individual Nessus plugins by plugin ID.

The Melcara Nessus Parser can be of tremendous value in reviewing, sorting, analyzing and working with Nessus output. As a penetration tester, the ability to identify the most vulnerable targets or to find that one obscure vulnerability is awesome. As a defensive security professional using Nessus to attempt to improve security, the ability to take the output from a scanning tool like Nessus and truly work with the output is amazing.

If you are new to vulnerability scans, Nessus and/or penetration testing in general, or if you have been doing this type of thing for a while and want to take your skills to the next level, you will definitely want to check out SANS SEC560: Network Penetration Testing and Ethical Hacking. This course not only teaches you cool hacker tools and techniques, it also provides you with an industry proven methodology that ensures your penetrations tests provide real business value.

-Kevin Fiscus
SANS Certified Instructor

UPDATE: Diligent reader Vikneswaran Kunasegaran (@SecurityBazinga) noticed that the Melcara script didn't work on Kali Linux (and possibly some Debian systems) due to some missing dependencies. He wrote a handy little script that automatically pulls down those dependencies and gets your system ready. You could do what the script does manually, if you'd prefer, or just copy and paste it into a file, chmod it so that it is executable, and run it. Thanks, Vikneswaran. Nice work! Here's the script:

#!/bin/sh
#install dependencies for running nessus parser melcara.com#

#update#
sudo apt-get update

#install dependencies#
sudo cpan install XML::TreePP
sudo cpan install Data::Dumper
sudo cpan install Math::Round
sudo cpan install Excel::Writer::XLSX
sudo cpan install Data::Table
sudo cpan install Excel::Writer::XLSX::Chart

#Thank you Have Fun!#

Upcoming SANS Special Event - 2018 Holiday Hack Challenge

KringleCon

SANS Holiday Hack Challenge - KringleCon 2018

  • Free SANS Online Capture-the-Flag Challenge
  • Our annual gift to the entire Information Security Industry
  • Designed for novice to advanced InfoSec professionals
  • Fun for the whole family!!
  • Build and hone your skills in a fun and festive roleplaying like video game, by the makers of SANS NetWars
  • Learn more: www.kringlecon.com
  • Play previous versions from free 24/7/365: www.holidayhackchallenge.com

Player Feedback!

  • "On to level 4 of the #holidayhackchallenge. Thanks again @edskoudis / @SANSPenTest team." - @mikehodges
  • "#SANSHolidayHack Confession — I have never used python or scapy before. I got started with both today because of this game! Yay!" - @tww2b
  • "Happiness is watching my 12 yo meet @edskoudis at the end of #SANSHolidayHack quest. Now the gnomes #ProudHackerPapa" - @dnlongen
kringle_02

3 Comments

Posted May 8, 2014 at 2:11 PM | Permalink | Reply

Vikneswaran

Can there be a tutorial on how to use the script step by step because I am not able to run it properly without an error thanks for this info btw''

Posted June 18, 2014 at 3:08 AM | Permalink | Reply

Travis Schack

I have used this parser for awhile and it is a great tool to have in your arsenal! It provides multiple perspectives on your nessus results to help with the prioritization of mitigation steps.

Posted September 27, 2014 at 9:45 AM | Permalink | Reply

Michael

Hi Kevin,
Thanks for a good article on this subject.
I just wanted to provide you with an alternative to the Melcara Nessus Parser. We have developed a Nessus reporting solution which can export results to Word, Excel and SQLite. The Word export functionality let you customize your own Word report that our software will populate with data.
Check it out at http://www.namicsoft.com.
Kind regards,
Michael

Post a Comment






Captcha


* Indicates a required field.