线程创建回调中如何阻止线程创建?
唯一想到的方法是DKOM,将进程线程设为系统线程.PsSetCreateThreadNotifyRoutine是执行在创建者上下文的,此时获取线程信息很可能失败.
然后看了PsSetCreateThreadNotifyRoutineEx 是执行在新线程的上下文,这里就可以得到线程信息,但不幸的 这个Ex函数在Win10上才能使用.
那么有没有一种在x64下不hook实现阻止线程创建的方法呢? 创建一个workitem,拿到TID后结束之。直接阻止貌似是不可能的。
仔细看了一下MSDN,新版函数确实爽:With PsSetCreateThreadNotifyRoutine, the callback is executed on the creator thread. With PsSetCreateThreadNotifyRoutineEx, the callback is executed on the newly created thread.要阻止线程创建,只要调用一下ZwTerminateThread(ZwCurrentThread())即可。 Tesla.Angela 发表于 2016-12-2 17:31
创建一个workitem,拿到TID后结束之。直接阻止貌似是不可能的。
仔细看了一下MSDN,新版函数确实爽:要阻 ...
也可以直接插个kernel APC
页:
[1]