How it works....
Open Audit (or more correctly Open-AudIT) audits the hardware and software it discovers on your computers, and posts its findings to a MySQL database. From there the data is presented in a clean and readable form via a set of PHP web pages.
Open Audit is the successor to Winventory, a similar open source project from which its code base is derived.
Open Audit uses a slightly more cunning method to post data to the database than its predecessor Winventory.
For Windows based PCs, a script called audit.vbs reads data from Microsoft's Windows Management Interface (WMI) and posts its findings to the server.
Instead of installing MyODBC connector on all of the audited machines, we simply gather the data using the audit.vbs script, and write it directly to the web server in the form of a POST to a web page.
Actually we post an XML formatted page using either a direct xml post, or by hooking into the local web browser and using that to post.
Therefore we need to set up the audit.config file to match the settings we have chosen for our web server, and the method chosen to post the page.
We do this by modifying audit.config, either manually or using the menu ( Admin> Audit Config) ** (This menu option is not available in current release, but may re-appear in later releases (AJH 16jan07), so you will need to edit the file by hand. We are in the process of re-coding this.)**
Note also that the defaults for most values are listed in audit.config.defaults
The main configuration options and their meanings are shown below....
[code]
audit_location = "r"
[/code]
("l"ocal or "r"emote depending on whether the machine you are auditing from is the same machine you are posting to (local) or not (remote))
[code]
verbose = "y"
[/code]
(If "y" then you can see the results from the audit.vbs script as it does its work. If "n" everything is almost silent, if you run cscript audit.vbs, then leaving this as verbose = "y" is probably the best option unless you have a HUGE network).
[code]
online = "yesxml"
[/code]
(this can be "yesxml" or "ie" and selects whether we submit the page via Internet explorer, or directly using XMLPOST, I would use yesxml since it doesn't waste the resource of launching ie for every audit. yesxml works for me with 80 or so machines in about ten minutes or so, depending on what else the machines are doing at the time)
[code]
strComputer = ""
[/code]
(Set this to "." to audit just the local machine, for pretty much any other purpose, set it to "")
[code]
ie_visible = "n"
[/code]
(only makes sense with online="ie" and lets you see the browser in operation)
[code]
ie_auto_submit = "y"
[/code]
(Ditto, but selects whether the page submits automatically or waits for user input, I would use "y" )
[code]
ie_submit_verbose = "n"
[/code]
(Does what it says. Submits the ie page with all of the information exposed as it is gathered)
[code]
ie_form_page = "http://myoaserver.local/openaudit/admin_pc_add_1.php"
[/code]
This is not too obvious, as it can be almost anything. The simplest case is to use
http://127.0.0.1/openaudit/admin_pc_add_1.php This will allow the script to post to the same box as the OA web server is running on.
Next we can use an IP address, something like
http://192.168.0.4/openaudit/admin_pc_add_1.php This allows us to post results from a machine other than the web server, AND from the web server.
Finally this can me something like
http://myopenauditbox.mydomain.myou/ope ... _add_1.phpThis allows us to post from anywhere so long as our DNS server can resolve myopenauditbox.mydomain.myou to the correct IP address and no firewall blocks our traffic (and our web server will accept requests from the IP address running the VBS script of course).
(In short this is the page that ie submits to, can be an IP or a machine name followed by the folder within
htmlroot on the web server running the OA web pages.
[code]
non_ie_page = "http://myoaserver.local/openaudit/admin_pc_add_2.php"
[/code]
( the page that yesxml submits to, and the page that the ie page calls next, so it has to be valid, see previous description)
[code]
nmap_subnet = "192.168.45." ' The subnet you wish to scan
[/code]
(Does what it says, but only used by the nmap script)
[code]
nmap_subnet_formatted = "192.168.045." ' The subnet padded with 0's
[/code]
(Does what it says, but only used by the nmap script, bit of a fudge, 'cos we should generate this from the above nmap_subnet)
[code]
nmap_ie_form_page = "http://myoaserver.local/openaudit/admin_nmap_input.php"
[/code]
(does what it you think it does, the same as the audit page ie_form_page, but for the nmap script, see previous ..ie_form_page descriptions)
[code]
nmap_ie_visible = "n"
[/code]
(likewise , also for the nmap script)
[code]
nmap_ie_auto_close = "y"
[/code]
(likewise , also for the nmap script)
[code]
nmap_ip_start = 1
[/code]
(start of ip range on subnet chosen above)
[code]
nmap_ip_end = 254
[/code]
(end of ip range on subnet chosen above)
[code]
nmap_tmp_cleanup = true
[/code]
Set this false if you want to leave the tmp files for analysis in your tmp folder
[code]
nmap_syn_scan = "y" ' Tcp Syn scan
nmap_udp_scan = "y" ' UDP scan
nmap_srv_ver_scan = "y" ' Service version detection.
nmap_srv_ver_int = 0 ' Service version detection intensity level. Values 0-9, 0=fast
[/code]
The above options add UDP and SYN scanning to the NMAP details, however this can be slow to scan large numbers of hosts (typically several hours for a class C subnet).
The extra details will allow you to see exactly what service type is being offered on discovered ports. Worth doing perhaps once, when setting up OA, and then perhaps once a month or so to keep the details reasonably up to date. Obviously if set to 'n' these options do nothing and only a basic nmap scan is performed, this would be sufficient for a lot of people who simply want to know what services are there.
Setting nmap_srv_ver_int = 0 runs reasonably quickly, nmap_srv_ver_int = 9 is very intense, and will take a long time (it took all day on my class C network
![Shocked :shock:](./images/smilies/icon_eek.gif)
)
![Idea :idea:](./images/smilies/icon_idea.gif)
For a full TCP/IP security audit, it may be worth while doing ONLY an nmap audit, regularly into a separate copy of OpenAudit, as the results for windows and "other" items will all appear together in the "other" table, making reporting and diagram creation a bit simpler.
[code]
input_file = ""
[/code]
(used to supply a list of PCs and their usernames and passwords, these users must have WMI access rights via the network. Note administrators without passwords will not by default have these rights, do you may have to create a user on each machine for this purpose, or set the local administrator user password. If you are using a domain, use a somain admin user to do this, or better still audit the entire domain using the audit_local_domain option ).
Older versions of Open-Audit (<Version 07.12.09) used the following email fields.
[code]
email_to = ""
[/code]
(Send failed audit emails to
whoever@whateverdomain.whatever)
[code]
email_from = ""
[/code]
(Send failed audit emails from
whoever@whateverdomain.whatever)
[code]
email_server = ""
[/code]
Later versions (>Version 07.12.09) support the following email fields.
[code]
use_audit_log = "n"
[/code]
Tells Open Audit to log its progress (Currently only time, machine name, connect to WMI, start Ok and finish OK for each machine in the run)
The idea is to expand this to include the result of each section of the audit, so we can tell where a particular audit comes unstuck.
Set this to "n" or "y". Default is "n"
[code]
keep_audit_log = "n"
[/code]
Tells Open Audit whether to create a new log every run, or append results to the current log. Set this to "n" or "y". Default is "n"
[code]
send_email = false
[/code]
Tells Open Audit whether or not to email its results. Set this to true or false. Default is false
[code]
email_to = "user@domain"
[/code]
The To: field specifies the user who will receive the email.
[code]
email_from = "user@domain"
[/code]
The From: field specifies the originating account, most mail systems will insist on this account also authenticating, and may well insist the from email address matches the authenticating user.
[code]
'email_sender = "Open-AudIT"
[/code]
The Sender, watch out for problems with this, by default this field is commented out in the script as a lot of spam filters will throw the mail away if they dont like this..
[code]
email_server = "aaa.bbb.ccc.ddd" ' IP address or FQDN
[/code]
IP or FQDN of the mail server
[code]
email_port = "25" ' The SMTP port
[/code]
Change this if your local situation uses a non standard port, for example if you pass everything to a spam filter first.
[code]
email_auth = "1" ' 0 = Anonymous, 1 = Clear-text Authentication, 2 = NTLM
[/code]
As it says, no auth, clear text auth or NTLM (For MS-Exchange most likely).
[code]
email_user_id = "user@domain" ' A valid Email account in user@domain format
[/code]
This will generally be the same as the From: field, but may not require the @.... part. Check with your mail server documentation
[code]
email_user_pwd = "abc123" ' The SMTP email password
[/code]
If auth is enabled, this must be the password for the email_user_id.
(NOTE: It would be advisable to use a unique account for mailing from OA, so if the password above is learned, no sensitive info can be gleaned by hackers.
DO NOT USE YOUR POSTMASTER OR ADMINISTRATOR ACCOUNTS, UNLESS YOU ABSOLUTELY MUST, AND UNLESS YOU ARE ABSOLUTELY CERTAIN NOBODY CAN SEE THIS PASSWORD. Don't blame us if you fail to heed this warning and drown under a sea of spam.
[code]
email_use_ssl = "false" ' True/False
[/code]
Use/don't use SSL for auth. May require a change to the Port value above.
[code]
email_timeout = "60" ' In seconds
[/code]
Needs no explanation. Increase this if you are not seeing all of your emails.
[code]
audit_local_domain = "y"
[/code]
(set this to Audit the domain chosen with the next variable)
[code]
random_order = false
[/code]
If set to true, Audits the domain in a random order to ensure that traffic is spread evenly over slow wan links.
[code]
local_domain = "LDAP://mydomain.local"
[/code]
(the AD domain to audit)
You can also specify an older style (Read NT4 or SAMBA domain ) with
domain_type = "nt"
local_domain = "WinNT://<domainname>"
something like...
[code]
'
' Set domain_type = 'nt' for NT4 or SAMBA otherwise leave blank or set to ldap
domain_type = "nt"
'
' Example Set Domain name for NT ONLY for LDAP use the above format
' NOTE This is Case Sensetive. See the example below.
'
local_domain = "WinNT://MYDOMAIN"
'
[/code]
If you set the domain_type to anything other than NT or dont set it at all, an LDAP domain is assumed.
[code]
hfnet = "n"
[/code]
(use hfnet **experimental** does anybody have this working reliably?)
[code]
Count = 0
[/code]
Not sure wht this does? Mark?
[code]
number_of_audits = 20
[/code]
(Maximum number of audit processes to spawn simultaneously when doing an audit from the domain)
[code]
script_name = "audit.vbs"
[/code]
(the name for the spawned processes, should always be audit.vbs, but you can add a path if you wish)
[code]
monitor_detect = "y"
[/code]
(adds monitor type, serial number etc to database)
[code]
printer_detect = "y"
[/code]
(adds printer type etc to database)
[code]
software_audit = "y"
[/code]
(audits software as well as hardware)
[code]
uuid_type = "uuid"
[/code]
(Changes the key to the database, can be UUID, MAC Address, or System name + Domain, I would stick with UUID)