|
[求助]求大神指教怎么理解object Hook精髓!
大概就是你这个意思,很多地方都会调用到的。 object hook就是修改这个object结构里的一个函数指针,而这个函数指针在某些API里会被调用,所以hook后就会运行到你指定的函数。 struct OBJECT_HEADER { struct OBJECT_TYPE { struct OBJECT_TYPE_INITIALIZER { // 下面这些函数指针,在某些API里会调用的 OB_DUMP_METHOD DumpProcedure; OB_OPEN_METHOD OpenProcedure; OB_CLOSE_METHOD CloseProcedure; OB_DELETE_METHOD DeleteProcedure; OB_PARSE_METHOD ParseProcedure; OB_SECURITY_METHOD SecurityProcedure; OB_QUERYNAME_METHOD QueryNameProcedure; OB_OKAYTOCLOSE_METHOD OkayToCloseProcedure; } } } 常见的hook是直接修改的代码,而object hook就是替换object对象里的函数指针,这个函数指针在某处会被调用运行,达到hook的效果。 看下面这个函数流程 ObOpenObjectByPointer(OpenProcess里就调用了这个函数)-> ObpCreateHandle->ObpIncrementHandleCount-> ObCheckObjectAccess -> ObGetObjectSecurity () { ObjectType->TypeInfo.SecurityProcedure(xxx) //SecurityProcedure就是那个函数指针 } 简化就是ObOpenObjectByPointer函数最后会调用ObGetObjectSecurity函数,而ObGetObjectSecurity函数里会调用object结构里的那个函数指针。 什么精髓,就是程序要运行到一个地方,而这个地方被你修改了。上面流程描述的是object结构里的SecurityProcedure会执行,SecurityProcedure被你修改了,那就是所谓的object hook了。 其他还有那么多xxxProcedure具体在哪里调用,你去wrk里搜索,都可以找到的。 |
|
[原创]浅谈之创建自己的对象
应该是个好东西 |
|
[求助]重载内核后对Object Hook的处理
你也可以想办法让他不调用hook的函数, wrk里指明了调用的路线 ObOpenObjectByPointer(name)-> ObpCreateHandle->ObpIncrementHandleCount-> ObCheckObjectAccess -> ObGetObjectSecurity () { ObjectType->TypeInfo.SecurityProcedure(xxx) //能否在新内核里修改这个地方,调用原始的method。 } |
|
[分享]32/64位跨平台反汇编引擎BeaEngine使用简介
好东东!~~~ |
|
有没有关于API汇编实现的书籍或者文档
nt源码 reactos源码 wrk源码,基本可以满足你对任何API具体实现的了解了,不过基本是c,不是汇编 |
|
[原创]写花指令
好文!~~~ |
|
[分享]experiment : R3测试程序框架
应该是个好东东,支持下!~~~ |
|
[原创]EasyDebugger 1.3代码开放
大放血啊,av组合必然掀起一阵腥风血雨 |
|
[原创]AGP 开放一个版本的代码
这个牛逼,v5 |
|
[求助]r3下hook CreateProcessA正常但hook CreateProcessW会出错,上源码
你可以把代码写到exe工程里,调试通过了,再移植到dll里,这样好调试些。 |
操作理由
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 }}
勋章
兑换勋章
证书
证书查询 >
能力值