Skip to content
Pwnversity
WIN-ENUMbasic · 7 min · upd. 2026-11

Windows Enumeration

T1082T1033T1087T1552.001

After getting execution on a Windows host (a shell, a user session), the first job isn’t to escalate: it’s to understand where you are. Who you are, what privileges you have, what runs on the machine, what network you reach, and whether the host is domain-joined. Orderly enumeration avoids blind shots and almost always reveals the escalation path before touching any exploit. The invariant being leveraged: Windows is talkative, and nearly all the information an attacker needs is available without privileges.

flowchart LR
    S["shell on the host"] --> Q1["who am I and what can I?<br/>whoami /all"]
    Q1 --> Q2["what's locally exploitable?<br/>services, patches, creds"]
    Q2 --> Q3["am I in a domain?<br/>what do I reach?"]
    Q3 -->|yes| AD["AD enumeration"]
    Q3 -->|no| PE["local privesc"]
  • Who attacks: someone with low-privilege access (a service account’s shell, a compromised user) who wants to turn it into local SYSTEM or a pivot into the domain.
  • What it breaks: the information asymmetry. Windows reveals its configuration (privileges, services, paths, saved credentials) to any user; the attacker just has to ask.
  • What it gains: the concrete vector for local escalation and the decision to pivot to the domain. Enumeration exploits nothing, but it selects the exploit.
  • What the defender sees: bursts of recon commands (whoami, net, systeminfo, nltest) that, correlated, give away an intruder in the post-exploitation phase.

Answer, in this order: who am I and what can I? → what’s locally exploitable? → am I in a domain and what do I reach?. Skipping the first step leads to burning noisy exploits needlessly.

The three privileges that change everything

Section titled “The three privileges that change everything”

whoami /priv is the first stop. Three privileges are near-direct escalation (see tokens):

  • SeImpersonatePrivilege → Potato family → SYSTEM. Typical in IIS/MSSQL service accounts.
  • SeBackupPrivilege → read SAM/SYSTEM or NTDS.dit bypassing ACLs.
  • SeDebugPrivilege → dump LSASS, inject into privileged processes.
whoami /all # user, groups and PRIVILEGES (the most important)
whoami /priv # SeImpersonate, SeBackup, SeDebug... = direct paths
net user %USERNAME% # user's local groups
net localgroup administrators
systeminfo # version, build, hotfixes (for kernel exploits)
wmic qfe get HotFixID # installed patches
[System.Environment]::OSVersion.Version # from PowerShell

Cross build + hotfixes with wesng/Watson to map known kernel exploits. It’s the last resort, not the first (see privesc).

tasklist /v # processes and the user running them
sc query # services
wmic service get name,pathname,startmode,startname # paths and service account
netstat -ano # ports and PIDs (internal services)

Look for services running as SYSTEM with weak binaries or paths (unquoted paths, writable permissions — see privesc).

ipconfig /all
route print
arp -a # hosts seen on the LAN
nslookup -type=srv _ldap._tcp.dc._msdcs.corp.local # locate DCs
systeminfo | findstr /i domain
nltest /dsgetdc:corp.local
echo %LOGONSERVER% # DC that authenticated

If there’s a domain, enumeration jumps to AD (AD enumeration).

# deployment files and configs with secrets
findstr /si password *.xml *.ini *.txt *.config
dir /s /b *unattend* *sysprep* web.config
# saved credentials
cmdkey /list
reg query HKLM /f password /t REG_SZ /s
# autologon in the registry
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
  1. whoami /all and whoami /priv → any dangerous privilege? (may be the whole escalation).
  2. Services/processes as SYSTEM with weak paths or permissions.
  3. Credentials in configs, registry, cmdkey, autologon.
  4. Host in a domain? → locate DCs and jump to AD enum.
  5. If nothing obvious: winPEAS to sweep, and build+hotfixes for kernel as a last resort.
  • winPEAS: the reference all-in-one enumerator (privesc + credentials + configs).
  • Seatbelt (GhostPack): exhaustive host-oriented collection (C#).
  • PowerUp (Invoke-AllChecks): privesc vectors in PowerShell.
  • wesng / Watson: mapping patches to kernel exploits.
  • Snaffler: sweeping shares for secrets.

Enumeration selects the exploit: the local privesc vector and the decision to pivot to the domain come from here. A whoami /priv with SeImpersonate can save you everything else.

  • Recon bursts (whoami /all, net user/group, systeminfo, wmic, nltest) from a normal user account → post-exploitation pattern.
  • winPEAS/Seatbelt execution (known behavior; spikes of registry/FS reads).
  • Massive registry reads looking for “password”.
  • Sysmon (event 1 process create, 10 process access, 11 file create) with command line.
  • PowerShell auditing: Script Block Logging (4104), Module Logging (4103), transcription.
  • Events 4688 (process create) with command line enabled.
  • Reduce the talkativeness: remove unnecessary tools, limit wmic/cscript, apply App Control for Business (formerly WDAC) / AppLocker.
  • Remove cleartext credentials in configs, GPP, deployment scripts; use gMSA/LAPS.
  • Least privilege: a normal user’s whoami /priv should have nothing juicy.
  • EDR that alerts on recon chains and known enumerators.

Isolate the host, identify the compromised account, rotate its credentials and review what was enumerated (shares, DCs, secrets) to anticipate the attacker’s next step.

  • Enumeration itself isn’t a CVE, but it enables the choice of kernel exploits like PrintNightmare (CVE-2021-34527 / CVE-2021-1675) or HiveNightmare/SeriousSAM (CVE-2021-36934).
  • winPEAS/Seatbelt/PowerUp are standard in pentest reports and real-actor TTPs (MITRE T1082, T1087, T1057).
  • Countless breaches started with cleartext credentials in unattend.xml or GPP (cpassword, MS14-025 — see GPP cpassword).
  • whoami /all and whoami /priv — dangerous privileges (SeImpersonate/Backup/Debug)?
  • systeminfo + hotfixes — unpatched build mappable to a kernel exploit?
  • Services/processes as SYSTEM with weak paths or permissions.
  • Credentials in configs, registry, cmdkey, autologon?
  • Domain-joined host? DCs located?
  • Internal ports and non-exposed services (netstat -ano).
  • Accessible shares with secrets (Snaffler).
  • Does winPEAS flag any obvious vector?