First I have to provide some context.
I can set procmon to run at some non-default altitude by making two changes in key 'HKLM\SYSTEM\CurrentControlSet\Services\PROCMON24\Instances\Process Monitor 24 Instance':
- Changing the Altitude value from its default '385200' to the required value; eg. '136500'
- And adding a special permission to the key: user:Everyone type:Deny permissions:('set value' | 'delete')
The reason for changing the Altitude is obvious. The reason for add a special permission is less obvious: without this procmon will simply reset the Altitude to its default value.
Okay, here is my question:
I cannot programmatically remove the added permission or change that key or its values. This is not surprising because the permission denies 'everyone' that access.
However I can easily remove that permission using regedit. I just select the permission and remove it.
So what trick is regedit using to override that permission?
I can see it is running as the current user, not 'SYSTEM'. I can use psexec to run a remove script as 'SYSTEM' but that is denied access too.