Detection rules › Sigma

Hypervisor-protected Code Integrity (HVCI) Related Registry Tampering Via CommandLine

Status
experimental
Severity
high
Log source
product windows, category process_creation
Author
Swachchhanda Shrawan Poudel (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the tampering of Hypervisor-protected Code Integrity (HVCI) related registry values via command line tool reg.exe. HVCI uses virtualization-based security to protect code integrity by ensuring that only trusted code can run in kernel mode. Adversaries may tamper with HVCI to load malicious or unsigned drivers, which can be used to escalate privileges, maintain persistence, or evade security mechanisms.

MITRE ATT&CK coverage

TacticTechniques
Defense ImpairmentT1685 Disable or Modify Tools

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Hypervisor-protected Code Integrity (HVCI) Related Registry Tampering Via CommandLine
id: 6225c53a-a96e-4235-b28f-8d7997cd96eb
related:
    - id: 8b7273a4-ba5d-4d8a-b04f-11f2900d043a
      type: similar
status: experimental
description: |
    Detects the tampering of Hypervisor-protected Code Integrity (HVCI) related registry values via command line tool reg.exe.
    HVCI uses virtualization-based security to protect code integrity by ensuring that only trusted code can run in kernel mode.
    Adversaries may tamper with HVCI to load malicious or unsigned drivers, which can be used to escalate privileges, maintain persistence, or evade security mechanisms.
references:
    - https://www.sophos.com/en-us/blog/sharpening-the-knife-gold-blades-strategic-evolution
    - https://learn.microsoft.com/en-us/windows/security/hardware-security/enable-virtualization-based-protection-of-code-integrity
author: Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2026-01-26
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
              - '\reg.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
              - 'reg.exe'
    selection_cli:
        CommandLine|contains:
            - 'add '
            - 'New-ItemProperty '
            - 'Set-ItemProperty '
            - 'si '  # SetItem Alias
    selection_cli_base:
        CommandLine|contains: '\DeviceGuard'
    selection_cli_key:
        CommandLine|contains:
            - 'EnableVirtualizationBasedSecurity'
            - 'HypervisorEnforcedCodeIntegrity'
    condition: all of selection_*
falsepositives:
    - Legitimate system administration tasks that require disabling HVCI for troubleshooting purposes when certain drivers or applications are incompatible with it.
level: high
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_hvci_registry_tampering/info.yml
simulation:
    - type: atomic-red-team
      name: Disable Hypervisor-Enforced Code Integrity (HVCI)
      technique: T1562.001
      atomic_guid: 70bd71e6-eba4-4e00-92f7-617911dbe020

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith:
          - '\powershell.exe'
          - '\pwsh.exe'
          - '\reg.exe'
    - OriginalFileName:
          - 'PowerShell.EXE'
          - 'pwsh.dll'
          - 'reg.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains:
        - 'add '
        - 'New-ItemProperty '
        - 'Set-ItemProperty '
        - 'si '

Stage 3: selection_cli_base

selection_cli_base:
    CommandLine|contains: '\DeviceGuard'

Stage 4: selection_cli_key

selection_cli_key:
    CommandLine|contains:
        - 'EnableVirtualizationBasedSecurity'
        - 'HypervisorEnforcedCodeIntegrity'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • EnableVirtualizationBasedSecurity corpus 2 (sigma 2)
  • HypervisorEnforcedCodeIntegrity
  • New-ItemProperty corpus 3 (sigma 3)
  • Set-ItemProperty corpus 3 (sigma 3)
  • \DeviceGuard
  • add corpus 12 (sigma 12)
  • si corpus 5 (sigma 5)
Imageends_with
  • \powershell.exe corpus 182 (sigma 182)
  • \pwsh.exe corpus 168 (sigma 168)
  • \reg.exe corpus 58 (sigma 58)
OriginalFileNameeq
  • PowerShell.EXE corpus 120 (sigma 84, splunk 30, elastic 6)
  • pwsh.dll corpus 112 (sigma 79, splunk 30, elastic 3)
  • reg.exe corpus 42 (sigma 32, splunk 8, elastic 2)