STACK_TEXT:
ee654004 ee76b5cd 8661063c ee654034 ee76b5cd test!GetSystemName+0x8 [d:\TestCode\fristdriver.cpp @ 204]
ee654028 ee76ba8b 8661e528 00000000 ee76ba99 test!IsOk+0xd [d:\TestCode\fristdriver.cpp @ 214]
ee654034 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0xb [d:\TestCode\fristdriver.cpp @ 443]
ee654040 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65404c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654058 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654064 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654070 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65407c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654088 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654094 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6540a0 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6540ac ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6540b8 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6540c4 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6540d0 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6540dc ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6540e8 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6540f4 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654100 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65410c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654118 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654124 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654130 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65413c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654148 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654154 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654160 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65416c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654178 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654184 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654190 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65419c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6541a8 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6541b4 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6541c0 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6541cc ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6541d8 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6541e4 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6541f0 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6541fc ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654208 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654214 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654220 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65422c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654238 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654244 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654250 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65425c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654268 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654274 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654280 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65428c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654298 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6542a4 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6542b0 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6542bc ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6542c8 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6542d4 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6542e0 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6542ec ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee6542f8 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654304 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654310 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65431c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654328 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654334 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654340 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65434c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654358 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654364 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654370 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee65437c ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654388 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
ee654394 ee76ba99 8661e528 00000000 ee76ba99 test!NtOpenThreadHookCode+0x19 [d:\TestCode\fristdriver.cpp @ 450]
堆栈溢出了。
代码是这样的
STACK_COMMAND: .tss 0x28 ; kb
FOLLOWUP_IP:
test!GetSystemName+8 [d:\TestCode\fristdriver.cpp @ 204]
ee76b598 ff150cd876ee call dword ptr [test!_imp__IoGetCurrentProcess (ee76d80c)]
FAULTING_SOURCE_CODE:
200:
201:
202: PCHAR GetSystemName()
203: {
> 204: PEPROCESS pProcessInfo = PsGetCurrentProcess();
205: PCHAR pSystemName = (PCHAR)pProcessInfo + g_NamePostion;
206: return pSystemName;
207: }
208:
209:
__declspec(naked) VOID NtOpenThreadHookCode()
{
_asm
{
push dword ptr [ebp-34h]
push dword ptr [ebp-20h]
}
if (IsOk())
{
_asm
{
mov eax,g_NtOpenThreadChangeAddr
call eax
MOV EBX ,g_NtOpenThreadHookAddrRet //这行出现问题
JMP EBX
}
}
else
{
_asm
{
MOV EAX,g_ObOpenObjectByPointer
CALL EAX
MOV EBX ,g_NtOpenThreadHookAddrRet
JMP EBX
}
}
}
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!