Hi,
Thanks for the reply, but I still think, that the registry filtering doesn’t cover ALL registry operations. I have double checked it, with both Process / Registry Monitor and also with a very simple registry filter driver, that only executed a KdPrint() with Argument1 and PID for ALL callbacks recevied on the routine registered with CmRegisterCallbackEx. In both cases (Process Monitor and our driver) the only thing I see (except open & close) is a RegNtPreQuerySecurity / RegNtPostQuerySecurity pair for a key, on which I execute NtSaveKey (for example).
This is an example from a Process Monitor log:
…
173 12:58:55.4948082 PM ntsavekey.exe 2176 RegOpenKey HKLM\SYSTEM\CurrentControlSet\Services\CLFS REPARSE Desired Access: Read/Write
174 12:58:55.4948454 PM ntsavekey.exe 2176 RegOpenKey HKLM\System\CurrentControlSet\Services\CLFS SUCCESS Desired Access: Read/Write
217 12:58:58.5507911 PM ntsavekey.exe 2176 RegQueryKeySecurity HKLM\System\CurrentControlSet\Services\CLFS SUCCESS
266 12:59:02.4259138 PM ntsavekey.exe 2176 RegCloseKey HKLM\System\CurrentControlSet\Services\CLFS SUCCESS
…
The user mode code that successfully reads and saves the registry key is:
…
// open registry key
objName.Buffer = L"\REGISTRY\MACHINE\SYSTEM\CurrentControlSet\Services\CLFS";
objName.Length = (USHORT)(wcslen(objName.Buffer) * sizeof(WCHAR));
objName.MaximumLength = objName.Length;
InitializeObjectAttributes(
&objAttr,
&objName,
OBJ_CASE_INSENSITIVE,
NULL,
NULL );
printf(“BEFORE NtOpenKey: press any key to continue…\n”);
_getch();
status = NtOpenKey(
&keyHandle,
GENERIC_READ | GENERIC_WRITE,
&objAttr );
if (!NT_SUCCESS(status))
{
keyHandle = NULL;
printf(“ERROR: could NOT open registry key, error 0x%08x\n”, status);
retVal = -4;
__leave;
}
printf(“AFTER NtOpenKey / BEFORE NtSaveKey: press any key to continue…\n”);
_getch();
// save key to file
status = NtSaveKey(
keyHandle,
fileHandle );
if (!NT_SUCCESS(status))
{
printf(“ERROR: could NOT save key to file, error 0x%08x\n”, status);
retVal = -5;
__leave;
}
printf(“key successfully saved to file\n”);
printf(“AFTER NtSaveKey: press any key to continue…\n”);
_getch();
…
On request, I can send a full user-mode example 
Any ideas?
Sandor LUKACS