在内核空间中查找当前procrs的基址

may*_*sam 1 windows kernel dump driver portable-executable

嗨,我将在内核驱动程序中转储其他进程

并使用KeStackAttachProcess更改驱动程序当前上下文

在用户模式地址改变之后如何找到当前进程的基地址我需要基地址将其转换为PIMAGE_DOS_HEADER(并解析它以查找部分)可以使用PEB?

还有其他方法吗?

Ser*_*bry 6

有一个特殊的API函数:

NTKERNELAPI
PVOID
PsGetProcessSectionBaseAddress(
    __in PEPROCESS Process
    );
Run Code Online (Sandbox Code Playgroud)

您可以在EPROCESS结构中使用SectionBaseAddress字段:

+0x128 SectionBaseAddress : 0x00400000 Void
Run Code Online (Sandbox Code Playgroud)

它可能在不同的OS版本中有所不同.