Nessus Reporting Karma

Null Meet Pune May 2011

21 May 2011

This talk focused on the latest Nessus reporting format, and how to use it in your own  project. Consuming XML and making sense of the data. WE also discussed about ways to eliminate false positives and multiple entries pointing to same issue.

Abstract

Slides

AI Generated Summary

AI Generated Content Disclaimer

Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.

“Nessus Reporting Karma” is an interactive session covering Nessus vulnerability scanner reporting formats, custom report parsing, and the building of an integrated vulnerability management system with a PHP frontend and Oracle database backend. The deck walks through the available report formats and the structure of the .nessus XML versions. It then shows a working PHP proof-of-concept parser and the analysis features (false positive handling, vulnerability grouping, and inventory cross-referencing) that motivated the custom build.

Summary

The session opens by declaring itself not a talk but an interactive session, presenting what has been worked on so far to give back what was learned from the community and explicitly asking for opinions, suggestions, and comments on how to improve it. The agenda lists the points to discuss: Nessus reporting in various formats, how to customize, understanding the Nessus XML format, PHP code as a proof of concept for parsing logic, and analysis as the real pain, covering reclassification and false positives.

The format survey covers four options: HTML, NBE, dot nessus v1, and dot nessus v2. The v1 format has three basic sections (Target, Policies, Reports) with the repeated ReportItem holding data fields combined in one place, while v2 clearly separates all fields so CVSS vectors and plugin output each get their own tags. The format continuously evolves: recently added tags include exploit_available, exploit_framework_canvas, canvas_package, exploit_framework_metasploit, and metasploit_name, enabling automated correlation with exploitation frameworks. Customized HTML reports are acknowledged as a decent option, though the deck admits not being good at that, and simply opening the Nessus file in Excel is demonstrated as well.

For parsing, the deck surveys existing options before writing new code: Seccubus (described as a very good option providing periodic scans with report comparison), a PHP interface, and a number of Python and Perl options. Custom parser writing is only required for integrating with existing infrastructure tools (inventory, security checking tools), when more customization is needed than provided, or for better control over scan frequency and granularities. The PHP proof-of-concept uses simplexml_load_file to read the file, prints the policy name, iterates over ReportHost entries, dumps all HostProperties tags, and then walks each ReportItem echoing every field, from port and severity through CVSS vector and exploit availability flags to see-also references.

The actual work section shows what was built: a PHP frontend for uploading reports to a database backed by Oracle, integration with an inventory management tool, and analysis features including known false positive identification by plugin ID, grouping common vulnerabilities together, classification of network versus server devices, and Excel-based report extraction. Its reports layer auto-removes false positives by plugin ID and plugin output, groups vulnerabilities by common suggestion, finds missing systems against the inventory, detects device detail changes between snapshots, and tracks repeated vulnerabilities over time keyed on the inventory systemid. Plugin detail extraction differs by version: up to Nessus 4.2 the command-line query interface works, while versions above 4.2 use the XML-RPC interface. The road ahead plans a similar interface for OpenVAS, XML-RPC for remote initialization and control, and MySQL as an alternative database option. The closing thanks the audience for still being seated and invites comments and suggestions.

Key Themes

Notable Points

  1. Takeaway: understanding Nessus XML formats enables powerful custom reporting.
  2. Takeaway: integrating vulnerability data with asset inventory provides organizational context.
  3. Takeaway: automated false positive identification by plugin ID reduces analysis burden.
  4. Takeaway: grouping vulnerabilities by common remediation streamlines patching efforts, and historical tracking reveals vulnerability trends and persistent issues.
  5. The .nessus v1 format divides into Target, Policies, and Reports sections with the ReportItem repeated per problem, while v2 splits into Policy and Report host sections and separates every field into its own tag, per the specification at cgi.tenable.com/nessus_v2_file_format.pdf.
  6. The v2 format’s recently added tags: exploit_available (boolean), exploit_framework_canvas (boolean), canvas_package (name), exploit_framework_metasploit (boolean), and metasploit_name (name).
  7. Existing parsing options cited: seccubus.com for periodic scans with report comparison, the nessusphp interface at enterprise.bidmc.harvard.edu/pub/nessusphp/, plus Python and Perl alternatives.
  8. The PHP proof of concept reads files with simplexml_load_file and iterates ReportHost and ReportItem elements, extracting port, protocol, svc_name, pluginID, pluginName, pluginFamily, severity, risk_factor, synopsis, description, solution, cve, cvss_base_score, cvss_vector, xfref, bid, plugin_output, exploit availability (Metasploit and CANVAS with package names), and see_also.
  9. The built system pairs a PHP upload frontend with an Oracle database, and its report queries auto-remove false positives by plugin ID and plugin output parameters, group vulnerabilities by common suggestion, find missing systems against the inventory, detect device detail changes between snapshots, and track repeated vulnerabilities over time keyed on the inventory systemid.
  10. Plugin extraction commands: Nessus -Spq localhost 1241 (with user and pass) for Nessus 4.2 and below, XML-RPC for versions above 4.2; the roadmap adds an OpenVAS interface, XML-RPC remote initialization and control, and MySQL as an alternative to Oracle.

Notable Quotes

“This is not a talk.”

“I am here presenting what I have worked so far to give back what I learned from community.”

“Analysis : the real pain”

“Frankly I am not good at that”

“Disclaimer : I am bad at db design and co-relation”

“Thanks for still being seated.”