Creating Packet Traces of Nessus Scans
Nessus 3 UNIX scanners have the ability to save all of their generated packets as a convenient libpcap compatible file. This means you can save your scans and view them under applications such as TCPDUMP or Wireshark. Please note that this feature is not available on Nessus 4.
Why is this Useful?
There are many reasons to do this.
Having a network trace can greatly assist in diagnosing your environment as well what Nessus is attempting. Tenable's support group often encounters customers who are scanning hosts that are firewalled or are being screened with an intrusion prevention system which is spoofing responses. Having exact packet logs of what is occurring can help diagnose the results.
When new devices are encountered, having a packet dump of what has occurred is very useful for sending information to Tenable's research group. This helps our team write better plugins with the exact bytes and responses being seen in the wild.
Saving a packet dump is also a good way to "prove" that a system was scanned. Text reports can easily be manipulated. Manipulating the 1000s of network connections, three way handshakes and specific protocols can be faked but requires much more effort.
If you have a product like the Passive Vulnerability Scanner which can accept libpcap network traces, these packet traces can be replayed at a later date. If your PVS is updated with newer rules than when the scan occurred, you may be able to conclude new information about vulnerabilities on a network scanned some time ago.
And lastly, having a pure network log of a full vulnerability scan can be very useful for stress testing your network intrusion detection or prevention system. Replaying network scans at a high rate of speed can test how well your network monitoring systems are working.
How is this accomplished?
Within your scan policy settings, there is a setting named 'Save a packet capture of the scan'. In the Nessus 3 client beta, this option is found under the 'Options' tab as shown below:
When a scan is completed, the results will be found in the 'tmp' directory. On RedHat systems, this is /opt/nessus/var/nessus/tmp. Files will be named for the target system IP addresses as well as the process ID of the nessusd instance which performed the scan. Below is a screen shot which shows some example traces:
The trace files can be readily read by TCPDUMP and Wireshark. To view this data under TCPDUMP, use the -r option to specify the source trace file as shown below:
A screen shot of a Nessus scan as viewed under Wireshark is shown below:
Keep your Traces as Secure as your Scan Results
If you do record network traces of your scan results, please treat them as sensitive information. These traces may contain passwords, vulnerabilities and sensitive data that should not be given to unauthorized people.