Skip to main content

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

The output is in 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:
To inspect the token of another running process (for example, to see if a SYSTEM process has a token you can steal), use a tool like Process Hacker — right-click any process → Properties → Token tab.
What these privileges mean:
SeImpersonatePrivilege and SeAssignPrimaryTokenPrivilege are the privileges to look for. Service accounts (like iis apppool, mssql) usually have them — and they turn a service-account shell into SYSTEM with a Potato exploit.
High-value privileges to always watch for:

What Groups Am I In?

whoami /groups — Group Memberships

The output has four columns. Type and Attributes are the ones that need explanation: Type — what kind of security principal this entry is: 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

This shows OS version, build, install date, hotfixes, and network config — everything you need for CVE research. Note that it can fail with Access denied for low-privilege users in some configurations:
If it’s blocked, fall back to PowerShell (see below).

wmic qfe — Installed Patches

qfe stands for Quick Fix Engineering — it lists installed Windows updates. Compare these against known CVEs to find missing patches.
Like systeminfo, this may return Access denied for limited accounts.

PowerShell — OS Version (when CMD tools are blocked)

The build number (e.g. 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.
What to look for in the output:
This is gold:
  • 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
Check the script’s permissions with icacls (covered on the Permissions & icacls page).
Filter for non-Microsoft tasks — those are the custom ones admins set up, and they’re far more likely to be misconfigured than the built-in Windows tasks. The author field and a script path outside C:\Windows are the tells.In PowerShell, filter them directly:
Or from CMD, pipe through findstr and look for lines where the author is not Microsoft:
Any task running as Administrator or SYSTEM with a script path in C:\ProgramData, C:\Temp, or another user-writable directory is worth examining.

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.
SID breakdown:
RID 500 is always the real local Administrator account, even if it’s been renamed. RID 1000+ are regular accounts created after install.

Next: Windows Architecture & File System — the directory structure, file systems, and where the interesting files live.