精易论坛

标题: 对LdrQueryImageFileExecutionOptions进行hook的问题 [打印本页]

作者: nianyueripe    时间: 2025-2-11 14:06
标题: 对LdrQueryImageFileExecutionOptions进行hook的问题
LdrQueryImageFileExecutionOptions这个api是系统用于检测ifeo状态的,我用.版本 2.支持库 spec
模块句柄 = GetModuleHandleA (“ntdll.dll”)
调试输出 (模块句柄)
api函数地址1 = GetProcAddress (模块句柄, “LdrQueryImageFileExecutionOptions”)
调试输出 (api函数地址1)
VirtualProtect (api函数地址1, 8, 64, OldProtect1)
oldData1 = 指针到字节集 (api函数地址1, 8)
newDate1 = { 184 } + 到字节集 (&hookLdrQueryImageFileExecutionOptions) + { 255, 224 }
写到内存 (newDate1, api函数地址1, 8)
.子程序 hookLdrQueryImageFileExecutionOptions, 整数型
返回 (0)


hook了这个api,使得ifeo失效,但是实际测试时ifeo仍然生效,请问一下代码是否有误和正确的方法以及LdrQueryImageFileExecutionOptions的具体api声明




作者: dnxl    时间: 2025-2-11 15:09
LdrQueryImageFileExecutionOptions最后是ret 0x18
也就是这个函数的参数有24字节,按每个参数4字节算24\4=6个参数
你这样HOOK不会崩么




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4