MCPcopy Create free account
hub / github.com/Spuckwaffel/Kernel-Thread-Driver / GetBase

Function GetBase

Driver/events.h:66–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void GetBase() {
67 if (NT_SUCCESS(PsLookupProcessByProcessId((HANDLE)process::target_pid, &process::target_process))) {
68 ULONG64 base = (ULONG64)PsGetProcessSectionBaseAddress(process::target_process);
69 ULONG64 StructAddress = readlocal<ULONG64>(process::STRUCT_OFFSET_ADDRESS); //no double because direct writing
70 writelocal<ULONG64>(&base, (PVOID)StructAddress);
71 status::SUCESSFUL();
72 }
73 else {
74 status::ERROR();
75 }
76}
77
78void Read() {
79 readd StructAddress = {};

Callers 1

mainthreadFunction · 0.70

Calls 2

SUCESSFULFunction · 0.85
ERRORFunction · 0.85

Tested by

no test coverage detected