|
[求助]windows核心编程中的 IAT Hook 是否存在线程问题??
原来如此, 多谢各位指点 :) |
|
[求助]windows核心编程中的 IAT Hook 是否存在线程问题??
多谢这位仁兄回复, InLine Hook 在x86, x64, alpha系列cpu上需要使用不同的反汇编库(而且大多是病毒模块, 可能被杀毒软件误杀), 觉得还是IAT Hook 稳定一些 :) . 而且可能我的问题没说清楚, 我的意思是Jeffrey 这样的大师应该不会犯这种低级错误吧?? 还是我的理解有误, <<核心>>中的代码本来就没多线程问题?? 很多IAT Hook的代码都是改自<<核心>>中的代码, 那不是都可能存在多线程问题?? 我觉得他的代码有两点问题 1 : Hook LoadLibrary*后, 若两线程同时调用LoadLibrary, 可能同时修改同一个模块的IAT表, 可能存在访问冲突 (此问题可以用临界区解决) 2 : Hook LoadLibrary*后, 他对本进程所有模块的的IAT表都进行修改(使用WriteProcessMemory), 某线程可能此时访问正在被修改中的IAT表, 可能call 到其它地址去。(若真有多线程问题, 此问题就有点麻烦) 不知道我的理解是否有问题? 还是说由于使用VirtualProcect, WriteProcess, 不会存在这样的访问冲突?? |
|
[求助]windows核心编程中的 IAT Hook 是否存在线程问题??
qihoocom 是个高手, 多谢指点, 有辛拜读你的<<另类挂钩-RING3数据包监视>>, :) 有点不理解你说的不需要writeprocessmemory是什么意思 ? IAT Hook 都是需要使用WriteProcessMemory的吧, 请看您的代码中 void SuperHookDeviceIoControl() { ... WriteProcessMemory(GetCurrentProcess() , lpAddr , &myaddr , sizeof(ULONG), &btw ); ... } 可能我的问题没说清楚, 我的意思是Jeffrey 这样的大师应该不会犯这种低级错误吧?? 还是我的理解有误, <<核心>>中的代码本来就没多线程问题?? 很多IAT Hook的代码都是改自<<核心>>中的代码, 那不是都可能存在多线程问题?? 我觉得他的代码有两点问题 1 : Hook LoadLibrary*后, 若两线程同时调用LoadLibrary, 可能同时修改同一个模块的IAT表, 可能存在访问冲突(此问题可以用临界区解决) 2 : Hook LoadLibrary*后, 他对本进程所有模块的的IAT表都进行修改(使用WriteProcessMemory), 某线程可能此时访问正在被修改中的IAT表, 可能call 到其它地址去。(若真存在多线程问题, 此问题就有点麻烦) 不知道我的理解是否有问题? 还是说由于使用VirtualProcect, WriteProcess, 不会存在这样的访问冲突?? |
|
[求助]windows核心编程中的 IAT Hook 是否存在线程问题??
如果写两个线程, 同时写某个全局全量, 是会造成访问冲突的, 兄弟的意思是WriteProcessMemory自带了临界区还是什么呢?? 还望指点一下 |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值