If you are working with multiple Nexpose vulnerability scanners it makes sense to want to generate a bunch of Nexpose Scan Templates on one Nexpose Seurity Console and distribute to a bunch of other Nexpose Security Console’s. There is not much documentation I could find on doing this so luckily it is fairly easy. Follow the instructions below to first export a Nexpose Scan Template from a Nexpose Security Console and then import a Nexpose Scan Template to another Nexpose Security Console. The scan templates are stored as XML so exporting consists of copying the XML file from the server running Nexpose to either your local machine or to another server running Nexpose.
Export Nexpose Scan Template:
You will first want to SSH to the server running Nexpose and list the contents of the custom Scan Templates directory and actually you will want to list the contents of two directories to make sure you are listing all of the available scan templates. The below commands are for a Linux server running Nexpose though I am sure you could use similar paths for a Windows server running Nexpose. Issue the below commands once you are logged into the Linux server running Nexpose as root.
List Nexpose Scan Templates:
- ls -alh /opt/rapid7/nexpose/shared/scanTemplates/custom/global/
- ls -alh /opt/rapid7/nexpose/shared/scanTemplates/custom/silo/default/
Once you have the exact filename of the scan template you want to download you will just use SCP to copy it from the server running Nexpose similar to the below example command.
Export Nexpose Scan Template Using SCP From Linux Server:
- scp firstname.lastname@example.org:/opt/rapid7/nexpose/shared/scanTemplates/custom/silo/default/scan-template-_-from-nexpose.xml .
The above command will copy the Nexpose scan template from the server running Nexpose to the current directory from which the SCP command was entered. You have now successfully exported a Nexpose Scan Template. Now follow the directions below to import the Nexpose Scan Template to another server running Nexpose.
Import Nexpose Scan Template:
All you really need to do to import a Nexpose Scan Template is copy it to the server running Nexpose in the proper directory and restart Nexpose. Below are examples of how you would do this. Please note you want to copy it to the new Nexpose server in the /opt/rapid7/nexpose/shared/scanTemplates/custom/global/ directory as shown in the below example.
Copy Exported Nexpose Scan Template To New Nexpose Server:
- scp scan-template-_-from-nexpose.xml email@example.com:/opt/rapid7/nexpose/shared/scanTemplates/custom/global/
Now that the exported Nexpose Scan Template is on the new Nexpose server all you need to do is restart Nexpose and it will automatically pick up the new Scan Template. You can restart Nexpose using the directions in this article.