Adds GetTickCount() sleep patching detection

This commit is contained in:
Alberto Ortega 2015-01-01 13:08:47 +01:00
parent 417963345c
commit abb13ad351
3 changed files with 19 additions and 0 deletions

View File

@ -93,3 +93,12 @@ int gensandbox_drive_size2() {
}
return FALSE;
}
int gensandbox_sleep_patched() {
DWORD time1;
time1 = GetTickCount();
Sleep(500);
if ((GetTickCount() - time1) > 450 ) return FALSE;
else return TRUE;
}

View File

@ -12,4 +12,6 @@ int gensandbox_drive_size();
int gensandbox_drive_size2();
int gensandbox_sleep_patched();
#endif

View File

@ -116,6 +116,14 @@ int main(int argc, char *argv[])
}
else print_not_traced();
printf("[*] Checking if Sleep() is patched using GetTickCount() ... ");
if (gensandbox_sleep_patched() == TRUE) {
print_traced();
write_log("Sandbox traced by checking if Sleep() was patched using GetTickCount()");
write_trace("hi_sandbox_sleep_gettickcount");
}
else print_not_traced();
/* Hooks detection tricks */
printf("\n[-] Hooks detection\n");
printf("[*] Checking function DeleteFileW method 1 ... ");