能力值:
( LV2,RANK:10 )
2 楼
发现PsGetContextThread也是c00000005
能力值:
( LV2,RANK:10 )
3 楼
PETHREAD peth;
NTSTATUS nts1 = PsLookupThreadByThreadId(PsGetCurrentThreadId(), &peth);
typedef NTSTATUS(*PSGETCONTEXTTHREAD)(PETHREAD Thread, PCONTEXT Context, KPROCESSOR_MODE AccessMode);
PSGETCONTEXTTHREAD psgetcontextthread = (PSGETCONTEXTTHREAD)GetFunctionAddr(L"PsGetContextThread");
CONTEXT context_1;
RtlZeroMemory(&context_1, sizeof(CONTEXT));
NTSTATUS nts2 = psgetcontextthread(peth, &context_1, KernelMode);
NTSTATUS nts3 = psgetcontextthread(peth, &context_1, UserMode);
DbgPrint("%llx %llx %llx, %llx", nts1, nts2, nts3, context_1.Rip); 在驱动自定义的IOCTRL里执行这代码。
打印结果为
0 c000000d c0000005, 0
不管是kernelmode还是usermode都失败。
能力值:
( LV2,RANK:10 )
4 楼
请问X64在内核中到底调用哪个函数去获取用户线程的寄存器信息
能力值:
( LV2,RANK:10 )
5 楼
This function returns the usermode context of the specified thread. This function will fail if the specified thread is a system thread. It will return the wrong answer if the thread is a non-system thread that does not execute in user-mode.
能力值:
( LV2,RANK:10 )
6 楼
我用这个函数也是这个错误码,0xc000000005 STATUS_ACCESS_VIOLATION 也不知道为什么
能力值:
( LV4,RANK:50 )
7 楼
context 这个缓冲区必须在r3 地址。