Adding a vulnerability check that uses a custom VB (.vbs) script
Use the script editor which ships with GFI LANguard N.S.S. to create custom scripts that can be run against your network targets to identify specific vulnerabilities. To create new vulnerability checks that use custom vbscripts you must do as follows:
- Step 1 : Create the script
- Step 2: Add the new vulnerability check:
The following are examples of how this is done.
Step 1 : Create the script
1. Launch the Script Debugger from Start } Programs } GFI LANguard Network Security Scanner 7.0 } LNSS Script Debugger.
2. Go on File } New...
3. Create a script. For this example use the following dummy script code.
Function Main
echo "Script has run successfully"
Main = true
End Function
4. Save the script in `C:\Program Files\GFI\LANguard Network Security Scanner 7.0\Data\Scripts\myscript.vbs'.
Step 2: Add the new vulnerability check:
1. Open the GFI LANguard N.S.S. configuration interface.
2. Expand the Configuration } Scanning Profiles node and select the scanning profile where the new vulnerability check will be added.
3. Click on the Vulnerabilities tab.
4. From the middle pane, select the category in which the new vulnerability check will be included (for example, DNS Vulnerabilities).
Screenshot 129 - The new vulnerability check dialog
5. Click on the Add button. This will bring up the new vulnerability check dialog.
6. Specify the basic details such as the vulnerability name, short description, security level,
and BugtraqID/URL (if applicable). Optionally, you can also specify how long the check takes to execute.
7. Click on the Add... button. This will bring up the check triggering conditions dialog.
Screenshot 130 - The check triggering conditions dialog
8. From the `Check type:' drop down select `VBScript' and specify the triggering condition in the `Condition' field.
9 Click on the
(open) button and select the custom VBscript file that will be executed by this check. For this example select `myscript.vbs'.
10. Click on Add to include the vulnerability check to the list.
11. Select the relative vulnerability check box so that it is include it in the next network vulnerability scan.
Testing the vulnerability check/script used in our example
Scan your local host computer using the scanning profile where the new check was added.
In the scan results, a vulnerability warning will be shown in the Vulnerabilities } Miscellaneous Alerts node of the scan results.