Windows Server Cookbook for Windows Server 2003 and Windows 2000
Recipe 9.12. Monitoring Registry Activity
Problem
You want to monitor registry accesses. This could involve anything from watching what processes are using the registry to monitoring what a specific user is doing with the registry. Solution
There are two ways to monitor registry activity. You can view real-time access to the registry with the Sysinternals Registry Monitor (regmon.exe) tool. With it you can view the process name, the PID, and the operation performed (e.g., QueryKey, EnumerateValue, SetValue, etc.) for all the processes that have a key or value open. Figure 9-1 shows this tool. Figure 9-1. Sysinternals Registry Monitor
If you want to monitor registry activity over a long period of time or cannot keep a copy of Registry Monitor open at all times, another option is to enable registry auditing. With registry auditing enabled, you can get detailed information in the Security event log about the successful or failed attempts a particular user or group of users make to the registry. Here is how you set that up:
Discussion
To enable auditing in the registry, you have to complete two steps. The first consists of configuring what you want to audit in the registry, which you can do with the Registry Editor. (Table 9-4 lists all audit options.) After you've completed this, auditing isn't turned on yet. To do that, you have to go to the Local Policies snap-in (or Group Policy Object Editor in a domain environment) and enable auditing. At this point, any registry access to the keys you configured should be logged to the Security event log.
See Also
MS KB 315416 (HOW TO: Use Group Policy to Audit Registry Keys in Windows 2000) |