PowerShell Hyper-V Cmdlets Execution via Script Blocks (New-VM, Set-VMFirmware, Start-VM)

Alerts when PowerShell script blocks use Hyper-V VM creation or start cmdlets (New-VM, Set-VMFirmware, Start-VM).

FreeReviewedSigma · Medium · v2
Product
windows
Category
ps_script
Author
frack113 (SigmaHQ), DRL 1.1
Published
2022-04-09
Updated
2026-07-31
title: PowerShell Hyper-V Cmdlets Execution via Script Blocks (New-VM, Set-VMFirmware, Start-VM)
id: 2db03df6-5e08-4fef-a30d-d10af18fbba8
status: test
description: This rule matches PowerShell script block content that includes Hyper-V cmdlets associated with creating a VM, configuring its firmware, and starting it. Such activity can be used to stage or run operations inside a virtual instance to reduce visibility and complicate investigations. It relies on Script Block Logging telemetry that records the executed PowerShell script text.
references:
  - https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1564.006/T1564.006.md#atomic-test-3---create-and-start-hyper-v-virtual-machine
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/powershell/powershell_script/posh_ps_susp_hyper_v_condlet.yml
author: frack113, Huntrule Team
date: 2022-04-09
tags:
  - attack.stealth
  - attack.t1564.006
logsource:
  product: windows
  category: ps_script
  definition: "Requirements: Script Block Logging must be enabled"
detection:
  selection:
    ScriptBlockText|contains:
      - New-VM
      - Set-VMFirmware
      - Start-VM
  condition: selection
falsepositives:
  - Legitimate PowerShell scripts
level: medium
license: DRL-1.1
related:
  - id: 42d36aa1-3240-4db0-8257-e0118dcdd9cd
    type: derived