xp下sysenter hook-RDMSR-WRMSR

本文介绍了在Windows XP系统中,如何利用sysenter、rdmsr和wrmsr指令进行系统调用的钩子技术。详细解析了初始化流程,包括KiInitSystem和KiLoadFastSyscallMachineSpecificRegisters函数,以及如何通过修改MSR_SYSENTER_EIP寄存器来实现自定义处理代码的插入。
摘要由CSDN通过智能技术生成

1. 关于sysenter sysexit wrmsr rdmsr请看cpu手册
P4_IA32 Intel Architecture Software Developer's Manual
24547110.pdf
page 3-763

2.xp初始化流程
KeInitSystem->KiInitMachineDependent->KiRestoreFastSyscallReturnState->KiLoadFastSyscallMachineSpecificRegisters->WRMSR

.text:00439A80
.text:00439A80                         ; 圹圹圹圹圹圹圹?S U B R O U T I N E 圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹圹?
.text:00439A80
.text:00439A80
.text:00439A80                         ; __stdcall KiLoadFastSyscallMachineSpecificRegisters(x)
.text:00439A80                         _KiLoadFastSyscallMachineSpecificRegisters@4 proc near
.text:00439A80                                                                 ; DATA XREF: KiRestoreFastSyscallReturnState()+31o
.text:00439A80 8B FF                                   mov     edi, edi
.text:00439A82 56                                      push    esi
.text:00439A83                                         db      3Eh
.text:00439A83 3E A1 20 F0 DF FF                       mov     eax, ds:0FFDFF020h
.text:00439A89 80 3D FC 20 48 00 00                    cmp     ds:_KiFastSystemCallIsIA32, 0
.text:00439A90 8B F0                                   mov     esi, eax
.text:00439A92 74 31                                   jz      short loc_439AC5
.text:00439A94 6A 00                                   push    0
.text:00439A96 6A 08                                   push    8
.text:00439A98 68 74 01 00 00                          push    174h
.text:00439A9D E8 2B 00 00 00                          call    _WRMSR@12       ; WRMSR(x,x,x)
.text:00439AA2 6A 00                                   push    0
.text:00439AA4 68 F0 76 40 00                          push    offset _KiFastCallEntry
.text:00439AA9 68 76 01 00 00                          push    176h
.text:00439AAE E8 1A 00 00 00                          call    _WRMSR@12       ; WRMSR(x,x,x)
.text:00439AB3 6A

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值