whoami.exe

by Microsoft
Operating Systemmedium risk

Summary

Whoami (whoami.exe) displays the current user name, group memberships, privileges, and logon ID. It is the simplest user identity discovery tool on Windows.

whoami.exe is the 312th most commonly executed Windows program in EchoTrail's dataset, observed 30,172 times across enterprise environments. It typically runs from C:\Windows\System32 and it is most often launched by cmd.exe.

312th
most commonly executed Windows program
30,172
observed executions
medium
statistical confidence

Behavior

Top Paths

  • C:\Windows\System3299.34%
  • C:\Windows\SysWOW640.66%

Top Hashes (SHA256)

  • 1d4902a04d99e8ccbfe7085e63155955fee397449d386453f6c452ae407b874374.06%
  • 22630753e4c7b3444c9eca793dceaac379294824d4957cd959e44bd2e5331f4917.95%
  • 574bc2a2995fe2b1f732ccd39f2d99460ace980af29efdf1eb0d3e888be7d6f04.76%
  • 16c4cee8c7bf4070e25a32f0b95857fa5cec51e47d246e6fbad69887460961b22.25%
  • 9ff82a081dea8479100b5040c67e8d9c23674023c176bd203b3d662d8fad85f50.41%
  • 26d64193736e8a6220567832e98b1e456cf856bc9533ea42f52b5bcce26515460.16%
  • 6c7c2450a80f401b8d3b33754c45d91d60d4a2055533542389551c0c609261d20.09%
  • 8ecffcce38d4ee87abaee6cbe843d94d4f8fb98fab3c356c7f6b70e60b10f88a0.08%
  • 91d257ec8800204642d96d2a0fb87937529c36debd5c3ad4380f79acc91b62cf0.06%
  • c36cf78f2257f606ab67b14afb02dca652a3fa6907c7805efbd2d47241ee609a0.06%

Process Ancestry

Top Grandparents

Top Parents

Top Children

Rare or environment-specific process names are omitted from ancestry tables. Percentages are of all observed relationships.

Security Analysis

What does whoami.exe normally do?

Located in C:\Windows\System32. Predominantly launched by cmd.exe. Brief execution — outputs information and exits.

When is whoami.exe suspicious?

whoami /priv (privilege enumeration) or whoami /groups (group membership discovery) as part of post-exploitation reconnaissance. Combined with other discovery tools in sequence. Spawned by unusual parents (w3wp.exe, wmiprvse.exe, wsmprovhost.exe) indicating remote or webshell execution.

How do attackers abuse whoami.exe?

User identity discovery: almost always the first command an attacker runs after gaining access. whoami confirms which account they have compromised and what privileges are available. whoami /priv reveals exploitable privileges (SeDebugPrivilege, SeImpersonatePrivilege, etc.).

Detection guidance

Do not alert on whoami alone — too common. High-confidence: whoami spawned by w3wp.exe, wmiprvse.exe, or wsmprovhost.exe (remote/webshell execution). Medium-confidence: whoami as part of a discovery sequence (whoami + net + ipconfig + systeminfo within a short window).

False positive notes

Common in scripts and administration. Management agents occasionally run whoami. The value is as a signal in correlation rules, not as a standalone detection.

MITRE ATT&CK techniques

Related Processes

Ask Rocky about whoami.exe

Rocky answers questions about whoami.exe grounded in this same dataset — free, no account needed.

Need this data programmatically? The Rocky API includes 500 free lookups a month. Or just ask Rocky.

Data from EchoTrail's dataset of ~346M Windows process executions. Last extracted 2026-08-04.