The Mindset
When you land on a Windows target, three questions drive everything:- Who am I? — Your user, privileges, and group memberships
- What can I do? — Enabled privileges, especially the ones that lead to escalation
- What is this machine? — OS version, patch level, scheduled tasks, services
Who Am I?
whoami — Current User
COMPUTERNAME\USERNAME format. The hostname is the name assigned to the machine itself — set during Windows installation or by an admin. It’s what identifies this computer on the local network, like a label on a box. win01 is that label. john is the user account on it. On a domain-joined machine it shows DOMAIN\USERNAME instead — that tells you whether you’re a local account or a domain account at a glance.
whoami /priv — Your Privileges
This is the single most important enumeration command on Windows. It lists the privileges assigned to your token — and several of them are direct paths to SYSTEM.
A token is Windows’ internal representation of your security context. Every process runs under one. When you log in or a service starts, Windows creates a token and attaches it to your session — it holds your identity (SID), your group memberships, and your privileges. whoami /priv reads that token and shows you what rights the OS will honour for anything your process tries to do.
Tokens are kernel objects — they live in kernel memory, not as files on disk. The easiest way to see your full token is whoami /all, which combines your user, groups, and privileges into one view:
High-value privileges to always watch for:
What Groups Am I In?
whoami /groups — Group Memberships
Attributes — what role the group currently plays in your token:
Groups worth noting:
The Mandatory Label at the bottom shows your integrity level. Windows tags every process with one of these levels and enforces a rule: a lower-integrity process cannot write to or influence a higher-integrity one. There are four levels:
When you see
High Mandatory Level in your groups output, your current process is already elevated. Medium means you have admin group membership but UAC is still limiting you — bypassing UAC would move you to High.
What Is This Machine?
systeminfo — Full System Details
wmic qfe — Installed Patches
qfe stands for Quick Fix Engineering — it lists installed Windows updates. Compare these against known CVEs to find missing patches.
systeminfo, this may return Access denied for limited accounts.
PowerShell — OS Version (when CMD tools are blocked)
19041) maps to a specific Windows release — search it to find applicable exploits.
Scheduled Tasks
If you can modify a script that a privileged task runs, that’s a direct escalation path.- Run As User: Administrator — the script runs with admin privileges
- Task To Run — points to
backupprep.ps1, a script on disk - Repeat: Every 2 minutes — runs frequently, so you don’t have to wait long
icacls (covered on the Permissions & icacls page).
Security Identifiers (SID)
Every user and group has a unique SID. Windows tracks rights by SID, not by name — so two users named the same are still distinct.Next: Windows Architecture & File System — the directory structure, file systems, and where the interesting files live.