Detectionmediumtest

Powershell Detect Virtualization Environment

Adversaries may employ various system checks to detect and avoid virtualization and analysis environments. This may include changing behaviors based on the results of checks for the presence of artifacts indicative of a virtual machine environment (VME) or sandbox

Open in Detection LabConvert ruleBuild Package
François Hubaut, Duc.Le-GTSCCreated 2021-08-03Updated 2022-03-03d93129cd-1ee0-479f-bc03-ca6f129882e3windows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic2 selectors
detection:
    selection_action:
        ScriptBlockText|contains:
            - Get-WmiObject
            - gwmi
    selection_module:
        ScriptBlockText|contains:
            - MSAcpi_ThermalZoneTemperature
            - Win32_ComputerSystem
    condition: all of selection*
False Positives
Unknown

False positive likelihood has not been assessed. Additional context may be needed during triage.

Testing & Validation

Regression Tests

by frack113
Positive Detection Test1 matchevtx

Microsoft-Windows-PowerShell

Rule Metadata
Rule ID
d93129cd-1ee0-479f-bc03-ca6f129882e3
Status
test
Level
medium
Type
Detection
Created
2021-08-03
Modified
2022-03-03
Path
rules/windows/powershell/powershell_script/posh_ps_detect_vm_env.yml
Raw Tags
attack.discoveryattack.stealthattack.t1497.001
View on GitHub