MCPcopy Create free account
hub / github.com/Astronaut00/DoubleDataPointer / GetKernelDirBase

Function GetKernelDirBase

Driver/core.cpp:69–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67 return process_dirbase;
68 }
69 ULONG_PTR GetKernelDirBase()
70 {
71 PUCHAR process = (PUCHAR)PsGetCurrentProcess();
72 ULONG_PTR cr3 = *(PULONG_PTR)(process + 0x28); //dirbase x64, 32bit is 0x18
73 return cr3;
74 }
75 uint64_t TranslateLinearAddress(uint64_t directoryTableBase, uint64_t virtualAddress);
76 NTSTATUS ReadPhysicalAddress(uint64_t TargetAddress, PVOID lpBuffer, SIZE_T Size, SIZE_T* BytesRead);
77 NTSTATUS WritePhysicalAddress(uint64_t TargetAddress, PVOID lpBuffer, SIZE_T Size, SIZE_T* BytesWritten);

Calls

no outgoing calls

Tested by

no test coverage detected