BnS Buddy (at least) implements multi-client support by adding Evengard's anti-GameGuard bypass into clients, since even though GameGuard is no longer being used, it still has the functionality of preventing clients from detecting each other. Evengard never shipped source, and I would like to not ship mystery binaries (or run them as admin myself, for that matter) if at all possible.
A quick analysis of the bnsnogg binaries show that it's a winmm.dll proxy generated through Dll_Wrapper_Gen. I expect the majority of the binary deals with spoofing GameGuard, but they mention IAT hooking in their thread so I suppose that's what's being employed here.
If I'm right, the functions being hooked are GetCurrentProcessId, CreateFileW, and CreateMutexW... I'm not immediately sure what GetCurrentProcessId would be useful for, but the CreateFileW hook I suspect is for redirecting config lookups to get past the launcher verification, which leaves CreateMutexW for bypassing the client check -- which makes sense, since named mutexes would be a good fit for this task.
So, I think that stripping the name from all mutexes as they're being created would prevent the clients from looking themselves up. Something like:
HANDLE WINAPI MyCreateMutex(
_In_opt_ LPSECURITY_ATTRIBUTES lpMutexAttributes,
_In_ BOOL bInitialOwner,
_In_opt_ LPCTSTR lpName
) {
return CreateMutex(lpMutexAttributes, bInitialOwner, NULL);
}
However, a test using Dll_Wrapper_Gen proxying version.dll and the IAT patching from agent.c did not yield anything promising... the DLL got loaded, but received no CreateMutexW calls. Perhaps I'm doing something wrong.
BnS Buddy (at least) implements multi-client support by adding Evengard's anti-GameGuard bypass into clients, since even though GameGuard is no longer being used, it still has the functionality of preventing clients from detecting each other. Evengard never shipped source, and I would like to not ship mystery binaries (or run them as admin myself, for that matter) if at all possible.
A quick analysis of the bnsnogg binaries show that it's a
winmm.dllproxy generated through Dll_Wrapper_Gen. I expect the majority of the binary deals with spoofing GameGuard, but they mention IAT hooking in their thread so I suppose that's what's being employed here.If I'm right, the functions being hooked are
GetCurrentProcessId,CreateFileW, andCreateMutexW... I'm not immediately sure whatGetCurrentProcessIdwould be useful for, but theCreateFileWhook I suspect is for redirecting config lookups to get past the launcher verification, which leavesCreateMutexWfor bypassing the client check -- which makes sense, since named mutexes would be a good fit for this task.So, I think that stripping the name from all mutexes as they're being created would prevent the clients from looking themselves up. Something like:
However, a test using Dll_Wrapper_Gen proxying
version.dlland the IAT patching fromagent.cdid not yield anything promising... the DLL got loaded, but received noCreateMutexWcalls. Perhaps I'm doing something wrong.