Creating custom scripts using VBscript
GFI LanGuard supports and runs scripts written in VBscript compatible languages. Use VBscript compatible languages to create custom scripts that can be run against your network targets.
Security auditing scripts can be developed using the script editor that ships with GFI LanGuard. This built–in script editor includes syntax highlighting capabilities as well as debugging features that support you during script development. Open the script editor from Start > Programs > GFI LanGuard > LanGuard Script DebuggerA GFI LanGuard module that allows you to write and debug custom scripts using a VBScript-compatible language..
NOTE
For more information on how to develop scripts using the built–in script editor, refer to the Scripting documentation help file included in Start > Programs > GFI LanGuard > LanGuard Scripting documentation.
NOTE
GFI does not support requests related to problems in custom scripts. You can post any queries that you may have about GFI LanGuard forums at http://forums.gfi.com/. Through this forum, you are able to share scripts, problems and ideas with other GFI LanGuard users.
Adding a vulnerability check that uses a custom VBScript (.vbs)
To create new vulnerability checks that use custom VBScripts, follow the steps described in this section:
1. Launch the Script Debugger from Start > Programs > GFI LanGuard > LanGuard Script Debugger.
2. Go on File > New.
3. Create a script. For this example, use the following sample script code.
Function Main
echo "Script has run successfully"
Main = true
End Function
4. Save the script in <LanGuard installation folder path> \Data\Scripts\myscript.vbs
.
1. Launch GFI LanGuard.
2. Click the GFI LanGuard button and select Configuration > Scanning Profile Editor. Alternatively, press CTRL + P to launch the Scanning Profiles Editor.
3. In the new window, add a new vulnerability by clicking Add under the list of vulnerability checks.
4. Go through the General, Description and References tabs while specifying the basic details such as the vulnerability name, short description, security level and OVALA standard that promotes open and publicly available security content, and standardizes the transfer of this information across the entire spectrum of security tools and services. ID (if applicable).
5. Click the Conditions tab and click on the Add button. This will bring up the check properties wizard.
6. Select Independent checks > VBScriptA Visual Basic Scripting language is a high-level programming language developed by Microsoft®. node and click Next.
7. Click Choose file and select the custom VBscript file that will be executed by this check. Click Next.
8. Select the relative condition setup in the wizard to finalize script selection. Click Finish to exit wizard.
9. Click OK to save new vulnerability check.