It’s been asked before but never answered from what I’ve read so I figured I’d throw it out there again. Is it possible to get the process creation flags during the process create notify callback (or really at any other time before execution begins)?
I’d like to be able determine if the process is created with any of the DEBUG or SUSPEND flags. After poking around with WinDbg through all of the various structures, they don’t seem to be saved anywhere directly. And even if they were, I’m not about to access EPROCESS/PEB fields anyway. I don’t like hooking usermode functions and kernel hooking is out of the question on x64. ZwQuerySystemInformation is not available in Win8 and it’s also undocumented which I want to stay away from.
It really seems like not providing these flags during the callback is a big oversight on MSFT’s part. If we get similar flags during IRP_MJ_CREATE in a file filter, process creation flags would also be nice. So kernel or user mode, is it possible to query the process creation options in a safe, clean, documented way? And just for my own edification are there any dirty, undocumented, BSOD causing ways?
And just to preempt the “what are you trying to do?” question, if a process is created with DEBUG or SUSPEND flags, I need to notify a usermode service to do some “house keeping” to get things ready for the follow on actions related to debugging.