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

Function InitTarget

Driver/events.h:55–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void InitTarget() {
56 process::target_pid = readlocal<ULONG64>(readlocal<ULONG64>(process::STRUCT_OFFSET_ADDRESS));//double reading because STRUCT_OFFSET_ADDRESS saves a pointer that has pid
57 //print("\n[+] process::target_pid: %d", process::target_pid);
58 if (process::target_pid != 0) {
59 status::SUCESSFUL();
60 }
61 else {
62 status::ERROR();
63 }
64}
65
66void GetBase() {
67 if (NT_SUCCESS(PsLookupProcessByProcessId((HANDLE)process::target_pid, &process::target_process))) {

Callers 1

mainthreadFunction · 0.85

Calls 2

SUCESSFULFunction · 0.85
ERRORFunction · 0.85

Tested by

no test coverage detected