关于内核重载中基址重定位的一点解释

来源:互联网 发布:业务跟踪软件 编辑:程序博客网 时间:2024/06/02 07:16

*relocationAddressPtr = *relocationAddressPtr - imageNtHeadersPtr->OptionalHeader.ImageBase + (ULONG)oldKernelBasePtr;

*relocationAddressPtr中的值是应该是相对于文件加载首地址的地址

relocationAddressPtr是新的重定位表中的地址,因为此时还没有被重定位,所以*relocationAddressPtr是相对ImageBase的地址,但是需要用到的是旧内核的地址,所以要加上oldKernelBasePtr。
0 0
原创粉丝点击