Kernel address usually range from 0x80000000 and above. So, the basic code would be:
for(i = 0x80000000; i < 0xFFFFFFFF; i++){
PsSetCreateProcessNotifyRoutine((PCREATE_PROCESS_NOTIFY_ROUTINE)i, TRUE);
}
That's the basic form. It will remove ALL notify routines in the kernel.(execution takes a few minute...slow!)
To exclude CE:
for(i = 0x80000000; i < 0xFFFFFFFF; i++){
if( i >= CE_DriverBase && i <= (CE_DriverBase + CE_DriverSize) ) continue;
PsSetCreateProcessNotifyRoutine((PCREATE_PROCESS_NOTIFY_ROUTINE)i, TRUE);
}
Or, you can disable it only for GG like this:
for( i = Dump_wmimmc_Base; i < (Dump_wmimmc_Base + Dump_wmimmc_Size); i++){
PsSetCreateProcessNotifyRoutine((PCREATE_PROCESS_NOTIFY_ROUTINE)i, TRUE);
}
To exclude or target specific driver, you must find their address range, but it's trivial. (for CE, just peek into its DriverObject, for dump_wmimmc.sys, use PsSetLoadImageNotifyRoutine)
You can also render PsSetCreateProcessNotifyRoutine useless by filling up all 8 slots with dummy routines before GG loads dump_wmimmc.sys.
Well, it's easy, ....which means defeating PsSetCreateProcessNotifyRoutine won't disturb GG much
