Scanning a Subnet with Nmap
...
There are a few options for subnet scanning using Nmap. Assuming you have Nmap installed on the Open-AudIT server (and if it's a Windows server, make sure you have the Nmap path in your PATH system variable) you can:
- Start an Nmap scan directly from the web interface via Admin -> Discovery -> Discover Subnet.
- Use the audit_subnet.(vbs|sh) scripts from the command line.
- If you're on Windows, use the audit_subnet_windows.vbs script on the command line.
...
This is provided to the scripts using the command line option subnet=
You can test the script by setting the debugging level to > 0 also on the command line. debugging=3
The first two options will provide logging to the file
Options
...
The command line arguments are as follows, variable [default] (valid options):
create_file [n] (y|n) - create a text file names COMPUTERNAME_YYYYMMDDHHMMSS.xml in the directory the audit script is run.
debugging [1] (0-3) - Verbosity of the output to the command line. Set to "0" for no output.
submit_online [y] (y|n) - Submit the audit result to the web server upon completion.
url [http://localhost/index.php/system] (string) - The URL of the Open-AudIT server to submit the audit to. The variable submit_online must be set to "y".
subnet [] () - As above, the subnet, range or ip address to scan.
syslog [y] (y|n) - Log to open-audit/other/open-audit.log which can be viewed details as script proceeds. This file is viewable in the web interface by going to at Admin -> Logging Logs -> View Log.You can also output to a file instead of submitting to the web server. On the command line specify submit_online=y create_file=y.Logs.
echo_output [n] (y|n) - Upon completion echo the resulting XML to the command window.