PowerShell Script to Manage Scan Result in Nessus Professional, leveraging on the Nessus API.
NOTE: This script only works in Powershell 6/7.
This script exports and downloads Nessus scans based on the scan Name or ID.
The actions herein are based on the Nessus Professional API https://developer.tenable.com/reference/navigate
This script is only compatible with Powershell 6/7.
You can download and install Powershell 7 Here https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4
# copy the files to the computergit clone https://github.com/Johnng007/Nessus-Pro-API# Execution.NessusAPI.ps1
# Export and Download with a scan Name.NessusAPI.ps1 -Name NameofScan# Export and Download with Scan ID.NessusAPI.ps1 -ID IDNumber# Export and Download in a certain Format.NessusAPI.ps1 -Name NameofScan -Format htmlNB: format could be(nessus,csv,html,pdf)# Specify the Server URL.NessusAPI.ps1 -Name NameofScan -Format html -Server https://localhost:8834NB: Defaults to https://localhost:8834
You can either use a scan name or a scan id but not both.
On script execution, a check is done to determine the powershell version in use, if its below 6, the user is prompted to auto download and install powershell 7.
If the format parameter is not specified it defaults to html.
If the server parameter is not specified it defaults to https://localhost:8834 .
The server parameter accepts Nessus Cloud URL as well https://cloud.tenable.com
Want to check out other Black Widow Tools?
Forensicator - Live Forensics and Incidence Response Script. https://github.com/Johnng007/Live-Forensicator
Anteater - A python based web reconnaisence tool. https://github.com/Johnng007/Anteater
v1.0 10/01/2024 Initial Release.