Pages

Wednesday, December 10, 2025

Automating Verification for Nessus Scans

 The Challenge of Scan Verification

As vulnerability managers and security engineers we rely on credentialed scans to provide accurate visibility into our environment. An uncredentialed scan is essentially a surface-level check, missing most critical vulnerabilities that require authenticated access (like missing patches or insecure configurations).

When managing Tenable environments (Nessus or Tenable.sc), confirming that every asset in a large scan successfully ran with credentials is a critical, yet highly inefficient task. Since the definitive check demands manually reviewing Nessus Plugin ID 19506 (Nessus Scan Information) for the credentialed=true value on every host, this drill-down approach is simply too time-consuming.

The Solution: check-scans.sh

To solve this problem and reclaim time, I developed a simple Bash script called check-scans.sh.

This script automates the verification process, allowing vulnerability managers to confirm scan integrity quickly and efficiently without having to manually sift through the user interface.

The Script's Core Utility

The primary purpose of check-scans.sh is straightforward: verify that scans were conducted with credentials.

It targets the operational need to ensure that the foundational data used for patching and risk analysis is reliable. If Plugin 19506 is missing or shows credentialed=false, the script flags that asset, pointing you directly to the hosts that require re-scanning or troubleshooting.

How to Implement and Run the Script

The script is available in my GitHub repository. It requires minimal setup, making it easy to integrate into your existing workflow.

1. Getting the Script

You can find the source code and usage details here: https://github.com/2bitninja/check-scans

To get the script, clone the repository and navigate into the directory:

git clone https://github.com/2bitninja/check-scans.git

2. Prepare for Execution

Make the script executable:

chmod +x check-scans.sh

3. Running the Check

Due to the nature of interacting with the Nessus/Tenable installation directories and files, you will need elevated privileges (e.g., being in the tns group or using sudo) to execute it successfully.

Execute the script:

sudo ./check-scans.sh

The script will handle the heavy lifting, giving you an immediate, verifiable result of your credentialed scan coverage.

Conclusion

Operational efficiency in security is often achieved through small, focused automations. By leveraging a simple script like check-scans.sh, you eliminate a manual administrative burden, ensuring your security team can maintain a high standard of data quality for all vulnerability assessments.

Feel free to check out the script, use it, and let me know if you have any suggestions for improvements!

How does this version look? I focused on explaining the technical necessity and the workflow benefit.

No comments:

Post a Comment