GET /api/techniques/150/
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "name": "Thermal Zone Temperature",
    "category": [
        "https://search.unprotect.it/api/categories/1/"
    ],
    "description": "The temperature sensor is used to know the current temperature of a machine. In a non-virtualized environment, the function returns valid support and output like: \"25.05 C: 77.09 F: 298.2K\". But for a fully virtualized environment, the return is \"MSAcpi_ThermalZoneTemperature not supported\" because this feature is not supported on virtualized processors.\r\n\r\nInterestingly, this method is not valid. Not all Windows machines will support this method due to incompatibility with thermal zone sensors. It is a BIOS function. Sometimes the BIOS manufacturer provides dlls that can be referenced to call the required function and return the details.\r\n\r\nMany malware authors use it to detect virtual machines, but it frequently fails due to lack of vendor support.",
    "resources": "https://medium.com/@DebugActiveProcess/anti-vm-techniques-with-msacpi-thermalzonetemperature-32cfeecda802\r\nhttps://social.msdn.microsoft.com/Forums/en-US/19520825-b1fc-4778-8704-c492124bc029/getting-cpu-temp?forum=vblanguage",
    "tags": "thermal, temperature",
    "snippets": [
        {
            "language": "https://search.unprotect.it/api/snippet_languages/8/",
            "author": "https://search.unprotect.it/api/snippet_authors/6/",
            "technique": "https://search.unprotect.it/api/techniques/150/",
            "description": "If the return is \"MSAcpi_ThermalZoneTemperature not supported, it means you are in a virtualized environment.\r\nReference : https://gist.github.com/teixeira0xfffff/36293713c254c69a7ba2353e8d64afce#file-msacpi_thermalzonetemperature-ps1",
            "plain_code": "function Get-AntiVMwithTemperature {\r\n    $t = Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace \"root/wmi\"\r\n    $valorTempKelvin = $t.CurrentTemperature / 10\r\n    $valorTempCelsius = $valorTempKelvin - 273.15\r\n    $valorTempFahrenheit = (9/5) * $valorTempCelsius + 32\r\n    return $valorTempCelsius.ToString() + \" C : \" + $valorTempFahrenheit.ToString() + \" F : \" + $valorTempKelvin + \"K\"  \r\n}"
        }
    ],
    "detection_rules": [
        {
            "type": "https://search.unprotect.it/api/detection_rule_categories/1/",
            "name": "Detect_AntiVMWithTemperature",
            "rule": "rule Detect_AntiVMWithTemperature {\r\n    meta:\r\n        description = \"Rue to detect AntiVMwithTemperature technique\"\r\n        author = \"Thibault Seret\"\r\n        date = \"2020-09-26\"\r\n    strings:\r\n        $s1 = {72 6f 6f 74 5c 57 4d 49}\r\n        // root\\WMI\r\n        $s2 = {53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 4d 53 41 63 70 69 5f 54 68 65 72 6d 61 6c 5a 6f 6e 65 54 65 6d 70 65 72 61 74 75 72 65}\r\n        // SELECT * FROM MSAcpi_ThermalZoneTemperature\r\n        $s3 = {43 75 72 72 65 6e 74 54 65 6d 70 65 72 61 74 75 72 65}\r\n        //  CurrentTemperature\r\n    \r\n    condition:\r\n    all of them"
        }
    ]
}