Windows: Empire PowerShell UAC bypass command-line patterns

Flags Windows process creation events running Empire-style PowerShell UAC bypass command fragments.

FreeUnreviewedSigmacriticalv1
title: "Windows: Empire PowerShell UAC bypass command-line patterns"
id: ebc985ea-267a-4a32-b1c8-e8ae2d98f837
status: stable
description: This rule matches process creation command lines that contain specific Empire PowerShell privilege-escalation patterns targeting the HKCU:\Software\Microsoft\Windows Update\Update value. Such behavior matters because attackers often use PowerShell to automate UAC bypass-style techniques for gaining elevated execution. The detection relies on Windows process creation telemetry and the presence of distinctive PowerShell command-line fragments in the captured CommandLine field.
references:
  - https://github.com/EmpireProject/Empire/blob/e37fb2eef8ff8f5a0a689f1589f424906fe13055/data/module_source/privesc/Invoke-EventVwrBypass.ps1#L64
  - https://github.com/EmpireProject/Empire/blob/e37fb2eef8ff8f5a0a689f1589f424906fe13055/data/module_source/privesc/Invoke-FodHelperBypass.ps1#L64
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_hktl_empire_powershell_uac_bypass.yml
author: Ecco, Huntrule Team
date: 2019-08-30
modified: 2023-02-21
tags:
  - attack.privilege-escalation
  - attack.t1548.002
  - car.2019-04-001
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    CommandLine|contains:
      - " -NoP -NonI -w Hidden -c $x=$((gp HKCU:Software\\Microsoft\\Windows Update).Update)"
      - " -NoP -NonI -c $x=$((gp HKCU:Software\\Microsoft\\Windows Update).Update);"
  condition: selection
falsepositives:
  - Unknown
level: critical
license: DRL-1.1
related:
  - id: 3268b746-88d8-4cd3-bffc-30077d02c787
    type: derived

What it detects

This rule matches process creation command lines that contain specific Empire PowerShell privilege-escalation patterns targeting the HKCU:\Software\Microsoft\Windows Update\Update value. Such behavior matters because attackers often use PowerShell to automate UAC bypass-style techniques for gaining elevated execution. The detection relies on Windows process creation telemetry and the presence of distinctive PowerShell command-line fragments in the captured CommandLine field.

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.