我需要获取所有Win-Kernel对象的访问权限列表;
我所做的:
for (int i=0; i<9999; i++)
GetKernelObjectSecurity( i, ... ) //result in security_descriptor
GetSecurityDescriptorDacl( security_descriptor, ... ) // result in lpbDaclPresent
if (lpbDaclPresent)
//lpbDaclPresent - need to get
我走对了吗?
顺便说一句,我有:
约300个不带DACL的手柄
约有100个DACL手柄
(在Windows 7上测试)
最佳答案
如果要通过句柄进行暴力破解,请不要在9999处停止。遍历所有32位值。
或者,您可以枚举所有Usermode-Process-Handles:
http://forum.sysinternals.com/howto-enumerate-handles_topic18892.html
此方法的优点是,您知道Handles原始进程可以在需要时使用DuplicateHandle。
关于c++ - 获取所有Windows内核对象及其安全性权限,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13044991/