Skip to content

Commit

Permalink
Checking raw ThermalZoneInfo performance counters with WMI
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberGreg05 committed Feb 27, 2024
1 parent 1f7c4a6 commit 34d4a2e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions al-khaser/Al-khaser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ int main(int argc, char* argv[])
exec_check(&registry_services_disk_enum, TEXT("Checking Services\\Disk\\Enum entries for VM strings "));
exec_check(&registry_disk_enum, TEXT("Checking Enum\\IDE and Enum\\SCSI entries for VM strings "));
exec_check(&number_SMBIOS_tables, TEXT("Checking SMBIOS tables "));
exec_check(&perf_raw_data_counters_thermalzoneinfo_wmi, TEXT("Checking raw ThermalZoneInfo performance counters with WMI "));
}

/* VirtualBox Detection */
Expand Down
13 changes: 13 additions & 0 deletions al-khaser/AntiVM/Generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2011,4 +2011,17 @@ BOOL number_SMBIOS_tables()
free(smbios);
}
return result;
}

/*
Check Win32_PerfRawData_Counters_ThermalZoneInformation for entries
*/
BOOL perf_raw_data_counters_thermalzoneinfo_wmi()
{
int count = wmi_query_count(_T("SELECT * FROM Win32_PerfRawData_Counters_ThermalZoneInformation"));
if (count == 0)
{
return TRUE;
}
return FALSE;
}
3 changes: 2 additions & 1 deletion al-khaser/AntiVM/Generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ BOOL cim_voltagesensor_wmi();
BOOL pirated_windows();
BOOL registry_services_disk_enum();
BOOL registry_disk_enum();
BOOL number_SMBIOS_tables();
BOOL number_SMBIOS_tables();
BOOL perf_raw_data_counters_thermalzoneinfo_wmi();

0 comments on commit 34d4a2e

Please sign in to comment.