Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save teixeira0xfffff/36293713c254c69a7ba2353e8d64afce to your computer and use it in GitHub Desktop.
Save teixeira0xfffff/36293713c254c69a7ba2353e8d64afce to your computer and use it in GitHub Desktop.
Anti-VM Techniques with MSAcpi_ThermalZoneTemperature
function Get-AntiVMwithTemperature {
$t = Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"
$valorTempKelvin = $t.CurrentTemperature / 10
$valorTempCelsius = $valorTempKelvin - 273.15
$valorTempFahrenheit = (9/5) * $valorTempCelsius + 32
return $valorTempCelsius.ToString() + " C : " + $valorTempFahrenheit.ToString() + " F : " + $valorTempKelvin + "K"
}
#resource https://medium.com/@DebugActiveProcess
@loneicewolf
Copy link

Thanks for this! it's quite fascinating and really nicely done :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment