Windows Process Command Line Containing Whoami as First Parameter

Flags Windows process creations with command lines containing '.exe whoami' to surface potential discovery behavior.

FreeUnreviewedSigmahighv1
title: Windows Process Command Line Containing Whoami as First Parameter
id: 9bd5905d-6b73-4479-877a-e7e73d1ac3fa
status: test
description: This rule identifies newly created Windows processes whose command line includes a pattern where '.exe whoami' appears, indicating that whoami is being passed as the first parameter to an executable. Such usage can be part of discovery or local reconnaissance by attempting to determine the current security context. It relies on process creation telemetry, specifically the full command line recorded at process start time.
references:
  - https://twitter.com/blackarrowsec/status/1463805700602224645?s=12
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_susp_whoami_as_param.yml
author: Florian Roth (Nextron Systems), Huntrule Team
date: 2021-11-29
modified: 2022-12-25
tags:
  - attack.discovery
  - attack.t1033
  - car.2016-03-001
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    CommandLine|contains: .exe whoami
  condition: selection
falsepositives:
  - Unknown
level: high
license: DRL-1.1
related:
  - id: e9142d84-fbe0-401d-ac50-3e519fb00c89
    type: derived

What it detects

This rule identifies newly created Windows processes whose command line includes a pattern where '.exe whoami' appears, indicating that whoami is being passed as the first parameter to an executable. Such usage can be part of discovery or local reconnaissance by attempting to determine the current security context. It relies on process creation telemetry, specifically the full command line recorded at process start time.

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.