In order to use OAv2 I will need to be able to use it in a non-domain, non-networked environment. I currently have 30 locations which are not networked together in any way, nor is there a server in any of the locations. Each location has 1-6 Windows workstations and 1 laptop that stays there. So, roughly 120 computers total. I also have a couple Windows servers but they're not as important to audit.
Here's how I currently use Open-AudIT:
Setup a scheduled task that runs a download script (shown below) which downloads the openaudit script from the webserver, runs it on the computer, then cleans everything up. The reason I do it this way is so I can change the openaudit script server-side and have the changes affect all computers which have the download script scheduled without having to manually update the script on every computer individually.
If OAv2 can't do this or something similar, then I'm not sure I'll be able to use it. I would really like to use OAv2 as the framework and build are so much more robust. Is this a capability in OAv2 or is there something in the works for this?
download script that I have scheduled on each computer to run every night (someone here on the forums posted this a while back and it's been awesome for OpenAudIT):
Code:
'Declare variables
Dim oXMLHTTP
Dim oStream
Dim WSHShell
Dim AuditFiles(1)
Dim objFile
Dim objRandom
Dim CleanupFiles(2)
'Input variables
OAURL = "http://www.OpenAuditServerURL.com/OpenAuditReleaseCandidate/"
AuditFiles(0)="audit.vbs"
AuditFiles(1)="list_export_config.php"
'Create Objects
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set objRandom = CreateObject( "System.Random" )
'Get Script folder
scriptFullName = WScript.ScriptFullName
TargetDir = Left ( scriptFullName, _
InStrRev ( scriptFullName, WScript.ScriptName) - 1 )
'Retrieve Audit Files
For Each objFile in AuditFiles
'Check if file exists and delete if possible
If (fso.FileExists(TargetDir & objFile)) Then
Set aFile = fso.GetFile(TargetDir & objFile)
aFile.Delete
End If
Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
oXMLHTTP.Open "GET", OAURL & "/" & objFile, False
oXMLHTTP.setOption 2, 13056
oXMLHTTP.Send
If oXMLHTTP.Status = 200 Then
'Try to download from root
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write oXMLHTTP.responseBody
oStream.SaveToFile TargetDir & objFile
oStream.Close
Else
oXMLHTTP.Open "GET", OAURL & "/scripts/" & objFile, False
oXMLHTTP.Send
If oXMLHTTP.Status = 200 Then
'Try to download from scripts folder
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write oXMLHTTP.responseBody
oStream.SaveToFile TargetDir & objFile
oStream.Close
Else
'Error downloading, exiting script
WScript.Quit(2)
End If
End If
Next
'Check if file exists and delete if possible
If (fso.FileExists(TargetDir & "audit.config")) Then
Set aFile = fso.GetFile(TargetDir & "audit.config")
aFile.Delete
End If
'Rename php file to config
fso.MoveFile TargetDir & AuditFiles(1), TargetDir & "audit.config"
'Execute audit
WSHShell.Run "cscript """ & TargetDir & AuditFiles(0) & """", 2, true
'Cleanup
CleanupFiles(0)=TargetDir & "audit.config"
CleanupFiles(1)=TargetDir & AuditFiles(0)
CleanupFiles(2)=TargetDir & AuditFiles(1)
For Each objFile in CleanupFiles
If (fso.FileExists(objFile)) Then
Set aFile = fso.GetFile(objFile)
aFile.Delete
End If
Next