Windows whoami.exe Privilege Enumeration Using /priv Flag

Alerts on whoami.exe runs with /priv or -priv to enumerate current user privileges.

FreeReviewedSigma · High · v1
Product
windows
Category
process_creation
Author
Florian Roth (Nextron Systems) (SigmaHQ), DRL 1.1
Published
2021-05-05
Updated
2026-07-30
title: Windows whoami.exe Privilege Enumeration Using /priv Flag
id: 453d9de2-55fc-4c20-928c-6623999278ef
status: test
description: This rule flags execution of whoami.exe where the command line includes the /priv or -priv flag to display all current user privileges. Attackers commonly run this after privilege escalation attempts to confirm the effective privilege set available to the current context. It relies on Windows process creation telemetry capturing the executable identity (whoami.exe) and the full command line arguments.
references:
  - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/whoami
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_whoami_priv_discovery.yml
author: Florian Roth (Nextron Systems), Huntrule Team
date: 2021-05-05
modified: 2023-02-28
tags:
  - attack.privilege-escalation
  - attack.discovery
  - attack.t1033
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    - Image|endswith: \whoami.exe
    - OriginalFileName: whoami.exe
  selection_cli:
    CommandLine|contains:
      - " /priv"
      - " -priv"
  condition: all of selection_*
falsepositives:
  - Unknown
level: high
license: DRL-1.1
related:
  - id: 97a80ec7-0e2f-4d05-9ef4-65760e634f6b
    type: derived