Add NumberOfProcessors via GetSystemInfo detection re #27

This commit is contained in:
Alberto Ortega 2015-05-09 01:27:35 +02:00
parent 1817c3fd0d
commit 882a67a33e
3 changed files with 16 additions and 0 deletions

View File

@ -133,3 +133,9 @@ int gensandbox_sleep_patched() {
else return TRUE;
}
int gensandbox_one_cpu_GetSystemInfo() {
SYSTEM_INFO siSysInfo;
GetSystemInfo(&siSysInfo);
return siSysInfo.dwNumberOfProcessors < 2 ? TRUE : FALSE;
}

View File

@ -16,4 +16,6 @@ int gensandbox_drive_size2();
int gensandbox_sleep_patched();
int gensandbox_one_cpu_GetSystemInfo();
#endif

View File

@ -175,6 +175,14 @@ int main(void)
}
else print_not_traced();
printf("[*] Checking if NumberOfProcessors is < 2 via GetSystemInfo() ... ");
if (gensandbox_one_cpu_GetSystemInfo() == TRUE) {
print_traced();
write_log("Sandbox traced by checking if NumberOfProcessors is less than 2 via GetSystemInfo()");
write_trace("hi_sandbox_NumberOfProcessors_less_2_GetSystemInfo");
}
else print_not_traced();
/* Hooks detection tricks */
printf("\n[-] Hooks detection\n");
printf("[*] Checking function DeleteFileW method 1 ... ");