re #45 Add uptime test

This commit is contained in:
Alberto Ortega 2015-12-22 21:12:54 +01:00
parent 6b27791837
commit eac42caae3
3 changed files with 11 additions and 0 deletions

View File

@ -159,3 +159,8 @@ int gensandbox_less_than_onegb() {
return (statex.ullTotalPhys/1024) < 1048576 ? TRUE : FALSE; return (statex.ullTotalPhys/1024) < 1048576 ? TRUE : FALSE;
} }
int gensandbox_uptime() {
/* < ~12 minutes */
return GetTickCount() < 0xAFE74 ? TRUE : FALSE;
}

View File

@ -22,4 +22,6 @@ int gensandbox_one_cpu_GetSystemInfo();
int gensandbox_less_than_onegb(); int gensandbox_less_than_onegb();
int gensandbox_uptime();
#endif #endif

View File

@ -138,6 +138,10 @@ int main(void)
&gensandbox_less_than_onegb, &gensandbox_less_than_onegb,
"Sandbox traced by checking if pysical memory is less than 1Gb", "Sandbox traced by checking if pysical memory is less than 1Gb",
"hi_sandbox_pysicalmemory_less_1Gb"); "hi_sandbox_pysicalmemory_less_1Gb");
exec_check("Checking operating system uptime using GetTickCount()",
&gensandbox_uptime,
"Sandbox traced by checking operating system uptime using GetTickCount()",
"hi_sandbox_uptime");
/* Hooks detection tricks */ /* Hooks detection tricks */
print_check_group("Hooks detection"); print_check_group("Hooks detection");