Windows Process Creation: whoami.exe Executed With /all for Full Identity Enumeration

Detects Windows executions of whoami.exe using the /all flag to enumerate full identity details.

FreeUnreviewedSigmamediumv1
title: "Windows Process Creation: whoami.exe Executed With /all for Full Identity Enumeration"
id: 115d3ec4-e77c-4a56-ba40-8f963105d61f
status: test
description: This rule flags execution of whoami.exe when invoked with the /all argument, which returns comprehensive local user and system identity information. Attackers commonly use this output for discovery and to tailor follow-on actions based on the compromised environment. The detection relies on Windows process creation telemetry, specifically the executable identity (path or OriginalFileName) and the command line containing the /all flag.
references:
  - https://brica.de/alerts/alert/public/1247926/agent-tesla-keylogger-delivered-inside-a-power-iso-daa-archive/
  - https://app.any.run/tasks/7eaba74e-c1ea-400f-9c17-5e30eee89906/
  - https://www.youtube.com/watch?v=DsJ9ByX84o4&t=6s
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_whoami_all_execution.yml
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems), Huntrule Team
date: 2023-12-04
modified: 2024-03-05
tags:
  - attack.discovery
  - attack.t1033
  - car.2016-03-001
logsource:
  category: process_creation
  product: windows
detection:
  selection_main_img:
    - Image|endswith: \whoami.exe
    - OriginalFileName: whoami.exe
  selection_main_cli:
    CommandLine|contains|windash: " -all"
  condition: all of selection_main_*
falsepositives:
  - Unknown
level: medium
license: DRL-1.1
related:
  - id: c248c896-e412-4279-8c15-1c558067b6fa
    type: derived

What it detects

This rule flags execution of whoami.exe when invoked with the /all argument, which returns comprehensive local user and system identity information. Attackers commonly use this output for discovery and to tailor follow-on actions based on the compromised environment. The detection relies on Windows process creation telemetry, specifically the executable identity (path or OriginalFileName) and the command line containing the /all flag.

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.