Windows Registry Monitoring (im_regmon)
This module periodically scans the Windows registry and generates event records if a change in the monitored registry entries is detected.
|This module is only available on Windows.|
|To examine the supported platforms, see the list of installer packages in the Available Modules chapter.|
The following directives are required for the module to start.
This mandatory directive specifies the name of the registry entry.
It must be a string type expression.
Wildcards are also supported.
See the File directive of im_file for more details on how wildcarded entries can be specified.
More than one occurrence of the RegValue directive can be specified.
The path of the registry entry specified with this directive must start with one of the following:
If set to TRUE, this boolean directive indicates that the 64 bit registry view should be monitored. The default is TRUE.
This specifies the digest method (hash function) to be used to calculate the checksum.
The default is
This directive specifies a single registry path or a set of registry values (using wildcards) to be excluded from the scan. More than one occurrence of the Exclude directive can be used.
If set to TRUE, this boolean directive specifies that registry entries set with the RegValue directive should be scanned recursively under subkeys.
This directive specifies how frequently, in seconds, the module will check the registry entry or entries for modifications.
The default is 86400 (1 day).
The value of ScanInterval can be set to
The following procedures are exported by im_regmon.
Trigger the Windows registry integrity scan. This procedure returns before the scan is finished.
The following fields are used by im_regmon.
A list of event fields in key-value pairs.
The calculated digest (checksum) value.
The name of the digest used to calculate the checksum value (for example,
The current time.
One of the following values:
The name of the system where the event was generated.
The calculated digest (checksum) value from the previous scan.
The size of the registry entry’s value from the previous scan.
The name of the registry entry where the changes were detected.
The severity name:
The WARNING severity level value:
The size of the registry entry’s value after the modification.
This example monitors the registry entry recursively, and scans every 10 seconds. Messages generated by any detected changes will be written to file in JSON format.
<Extension json> Module xm_json </Extension> <Input regmon> Module im_regmon RegValue 'HKLM\Software\Policies\*' ScanInterval 10 </Input> <Output file> Module om_file File 'C:\test\regmon.log' Exec to_json(); </Output> <Route regmon_to_file> Path regmon => file </Route>
The im_regmon module provides a start_scan() procedure that can be called to invoke the scan. The following configuration will trigger the scan every day at midnight.
<Extension json> Module xm_json </Extension> <Input regmon> Module im_regmon RegValue 'HKLM\Software\*' Exclude 'HKLM\Software\Program Groups\*' ScanInterval 0 <Schedule> When @daily Exec start_scan(); </Schedule> </Input> <Output file> Module om_file File 'C:\test\regmon.log' Exec to_json(); </Output> <Route dailycheck> Path regmon => file </Route>