hi guys! i have .exe(injector) and .dll projects. i want to know which injector my .dll project interacts with. i will terminate if my injector is not used. how can I do that? thanks!
1. Shared Secret: Have your injector write a unique value (like a hardcoded GUID or HMAC key) into a specific memory address or a named pipe before injection.Quote:
hi guys! i have .exe(injector) and .dll projects. i want to know which injector my .dll project interacts with. i will terminate if my injector is not used. how can I do that? thanks!
WriteProcessMemory(hTargetProc, lpRemoteAddr, &SECRET_KEY, sizeof(SECRET_KEY), NULL);
if (memcmp(&local_key, &SECRET_KEY, sizeof(SECRET_KEY)) != 0) {
FreeLibraryAndExitThread(hModule, 0);
}