监视客户端Windowsregistry的运行密钥

我正在寻找方法来持续监视我们客户端计算机registry中不同的“运行密钥”(Autorun Entrys)。

我查看了不同的HIDS系统,但是他们对于我的使用(Tripwire)或者难以configuration和部署(OSSEC)的价格过高。

有没有人知道一个便宜又简单的应用程序,可以实现,或者有其他简单的方法,我可以做到这一点?

产品推荐是Serverfault上的主题。

不过,我可以告诉你如何使用Powershell自己做这个。

[String[]]$Exceptions = 'GoodProgram1','GoodProgram2' Foreach ($Computer In Get-ADComputer -Filter * -SearchBase 'OU=West,DC=CONTOSO,DC=COM') { Try { $RemoteRegistry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $Computer.Name) $Subkey = $RemoteRegistry.OpenSubKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Run') [String[]]$AutoRunEntries = $Subkey.GetValueNames() Foreach ($Entry In $AutoRunEntries) { If ($Exceptions -Contains $Entry) { Continue } Write-Warning "An unacceptable autorun entry $Entry was found on $($Computer.Name)!" } $RemoteRegistry.Close() } Catch { Write-Warning "Could not contact $($Computer.Name)" } } 

显然,这只是让你开始。 你会想自己做更多的阐述,因为在Windows中有很多其他的方法可以自动启动。

另一个想法可能更容易,更彻底的是找出如何将Sysinternals AutoRun,autorunssc.exe,命令行版本,集成到一个脚本。