[AntiCheat] Allow process synchronization

This commit is contained in:
momo5502 2017-01-30 18:57:26 +01:00
parent 2e6f8b1f9d
commit dc9171f136
2 changed files with 9 additions and 4 deletions

View File

@ -427,7 +427,7 @@ namespace Components
if (!AddAccessDeniedAce(pDacl, ACL_REVISION, dwPoison, psidArray[0])) return GetLastError();
// Standard and specific rights not explicitly denied
static const DWORD dwAllowed = ~dwPoison & 0x1FFF;
static const DWORD dwAllowed = (~dwPoison & 0x1FFF) | SYNCHRONIZE;
if (!AddAccessAllowedAce(pDacl, ACL_REVISION, dwAllowed, psidArray[1])) return GetLastError();
// Because of ACE ordering, System will effectively have dwAllowed even

View File

@ -19,10 +19,15 @@ namespace Worker
printf("Attaching to parent process %d...\n", this->processId);
HANDLE processHandle = OpenProcess(SYNCHRONIZE, FALSE, this->processId);
if ((!processHandle || processHandle == INVALID_HANDLE_VALUE) && !Runner::isProcessAlive())
if ((!processHandle || processHandle == INVALID_HANDLE_VALUE))
{
printf("Unable to attach to parent process\n");
return;
printf("Passive attach failed, trying actively...\n");
if (!Runner::isProcessAlive())
{
printf("Unable to attach to parent process\n");
return;
}
}
printf("Successfully attached to parent process\n");