Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / WINDOWS / ENUMERATION

Privilege Enumeration

This note documents detection patterns related to Privilege Enumeration within Windows environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4688Process creationCriticalDetects enumeration commands and scripts.
Sysmon1Process creationCriticalBest lineage source for privilege discovery chains.
Security4672Special privileges assignedHighUseful when enumeration follows elevated token creation.
PowerShell4104Script block loggingCriticalCaptures scripted privilege checks.
Sysmon11File createMediumOutput files created by enumeration scripts.
Sysmon22DNS queryLowOccasionally adjacent when scripts pull remote helpers.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
whoami /priv executedDirect privilege listingCriticalCore privilege discovery signal.
whoami /groupsGroup privilege contextCriticalOften paired with /priv.
net localgroup administratorsAdmin membership checkCriticalCommon attacker step.
PowerShell token inspectionToken privilege reviewHighScripted enumeration clue.
Repeated privilege commandsRecon chainHighOperator workflow signal.
Enumeration before privescClear attack stagingCriticalStrong sequence

Common Tools

ToolUsage
whoami.exePrivilege and group checks
net.exeGroup membership
PowerShellToken and privilege enumeration
accesschk.exePrivilege inspection

Relevant Artifacts

  • Security Event IDs 4688, 4672
  • Sysmon Event IDs 1, 11
  • PowerShell 4104
  • Commands:
    • whoami /priv
    • whoami /groups
    • net localgroup administrators
  • Prefetch:
    • WHOAMI.EXE
    • NET.EXE

MITRE ATT&CK References

  • T1069 Permission Groups Discovery
  • T1033 System Owner/User Discovery

Decision Tree

  1. Which command?

    • whoami
    • net
    • PowerShell
  2. Interactive or scripted?

    • Manual shell
    • Batch
    • PowerShell
  3. Follow-on action?

    • Token abuse
    • UAC bypass
    • Service abuse
  4. Output stored?

    • File
    • Clipboard
    • Console only
  5. Expand:

    • Parent process
    • User context
    • Recon chain
  6. Scope:

    • Single check
    • Broad recon
    • Operator toolkit

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4688
| where CommandLine has_any ("whoami /priv","whoami /groups","net localgroup")
| project TimeGenerated, Computer, CommandLine
PowerShell
| where EventID == 4104
| where ScriptBlockText has_any ("whoami","Get-TokenInformation")
| project TimeGenerated, Computer, ScriptBlockText

EQL

process where process.command_line like "*whoami /priv*" or process.command_line like "*whoami /groups*"
sequence by host.name with maxspan=5m
  [ process where process.name == "whoami.exe" ]
  [ process where process.name in ("cmd.exe","powershell.exe") ]

Sigma

title: Privilege Enumeration Detection
id: 6d2f8a14-privilege-enum
status: experimental
description: Detects privilege discovery commands
references:
  - https://attack.mitre.org/
author: Vergil
date: 2026-03-07
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4688
  keywords:
    CommandLine|contains:
      - 'whoami /priv'
      - 'whoami /groups'
      - 'net localgroup'
  condition: selection and keywords
fields:
  - CommandLine
falsepositives:
  - Legitimate admin troubleshooting
level: high
tags:
  - attack.discovery

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Alert on privilege commandsStrong recon signalCriticalLow false positives
Preserve 4104Catch scripted checksHighValuable enrichment
Correlate with privesc shortly afterHigh-confidence sequenceCriticalStrong triage
Track parent processDistinguish admin vs attackerHighUseful context
Monitor repeated discovery burstsOperator fingerprintHighValuable pattern