调试器总是在 ntdll.Kifastsystemcallret 中暂停
逆向工程
x64dbg
2021-06-17 21:44:42
1个回答
当任何应用程序正在执行系统调用时,通常会在 KiFastSystemCallRet 上暂停(应用程序暂停时 4 个线程的 windbg 调用堆栈)windbg 使用单独的线程来中断,因此当前线程在 DoDebugBreak 暂停
0:003> ~*k2
0 Id: da4.a8c Suspend: 1 Teb: 7ffdf000 Unfrozen
ChildEBP RetAddr
0019ead4 75c1cde0 ntdll!KiFastSystemCallRet
0019ead8 75c1ce13 USER32!NtUserGetMessage+0xc
1 Id: da4.a24 Suspend: 1 Teb: 7ffde000 Unfrozen
ChildEBP RetAddr
00b6fce8 77456a44 ntdll!KiFastSystemCallRet
00b6fcec 755e6a36 ntdll!NtWaitForMultipleObjects+0xc
2 Id: da4.ce8 Suspend: 1 Teb: 7ffdd000 Unfrozen
ChildEBP RetAddr
029ffec0 77456a44 ntdll!KiFastSystemCallRet
029ffec4 73e5a41c ntdll!NtWaitForMultipleObjects+0xc
# 3 Id: da4.d8c Suspend: 1 Teb: 7ffdc000 Unfrozen
ChildEBP RetAddr
02b9f7f8 774af20f ntdll!DbgBreakPoint
02b9f828 75a1ed6c ntdll!DbgUiRemoteBreakin+0x3c
0:003>
系统调用是从用户模式转换到内核模式的调用
正常使用sysenter指令
当您发出暂停 (f12 , esc) 以及在该函数中暂停时,请查看调用堆栈以查看您将返回的位置
(您也可以在 x64dbg 命令行中键入 printstack 以将调用堆栈转储到日志窗口)
17 call stack frames (EIP = 774570F4 , ESP = 000AE8EC , EBP = 000AE8FC ):
000AE900 ntdll._KiFastSystemCallRet@0
000AE910 uxtheme.74371A62
000AE920 uxtheme.74371A2F
000AE970 uxtheme.74371D38
000AE98C uxtheme.74371F20
000AE9D4 user32._GetRealWindowOwner@4+78
000AEE60 calc.00F51F4F
000AEE8C user32._InternalCallWinProc@20+23
000AEF04 user32._UserCallWinProcCheckWow@32+B3
000AEF60 user32._DispatchClientMessage@20+4B
000AEF88 user32.___fnDWORD@4+24
000AEFD4 ntdll._KiUserCallbackDispatcher@12+2E
000AFD50 calc.00F51CBC
000AFDE0 calc.00F6219A
000AFDEC kernel32.75A1ED6C
000AFE2C ntdll.___RtlUserThreadStart@8+27
000AFE44 ntdll.__RtlUserThreadStart@8+1B
其它你可能感兴趣的问题

