nt!KiFastCallEntry:
8504e360 b923000000 mov ecx,23h
8504e365 6a30 push 30h
8504e367 0fa1 pop fs ;加载内核fs段,30>>3=6,在GDT表索引为6,在0环指向一个KPCR结构
8504e369 8ed9 mov ds,cx ;修改段寄存器
8504e36b 8ec1 mov es,cx ;修改段寄存器
8504e36d 648b0d40000000 mov ecx,dword ptr fs:[40h] ;ecx = TSS
8504e374 8b6104 mov esp,dword ptr [ecx+4] ;esp = TSS:ESP0,切换堆栈,ESP0指向内核KTRAP_FRAM结构
8504e377 6a23 push 23h ;保存3环SS段
8504e379 52 push edx ;保存3环esp
8504e37a 9c pushfd ;保存eflags
8504e37b 6a02 push 2
8504e37d 83c208 add edx,8 ;edx在KiFastSystemCall里保存了3环的esp,有2个返回地址,这里平栈
8504e380 9d popfd ;复位当前标志寄存器
8504e381 804c240102 or byte ptr [esp+1],2 ;清除保存的3环标志寄存器
8504e386 6a1b push 1Bh ;保存cs
8504e388 ff350403dfff push dword ptr ds:[0FFDF0304h] ;保存EIP,KUSER_SHARED_DATA->fastcallret
8504e38e 6a00 push 0 ;error code
8504e390 55 push ebp ;保存各个寄存器
8504e391 53 push ebx ;保存各个寄存器
8504e392 56 push esi ;保存各个寄存器
8504e393 57 push edi ;保存各个寄存器
8504e394 648b1d1c000
逆向分析KiFastCallEntry
最新推荐文章于 2024-07-10 08:51:49 发布