web hacking

Windows Privilege Escalation 2026: A Complete Guide to Privilege Tokens (SE*)

Windows Privilege Escalation 2026: A Complete Guide to Privilege Tokens (SE*)

A comprehensive map of exploitable Windows privilege tokens in a pentest. From whoami /priv to SYSTEM: cheat sheets, tables, workflows, and links to how-to guides.

  • Posted on 2026-07-01
  • Reading time: 5 min

Windows Privilege Escalation 2026: A Complete Guide to Privilege Tokens (SE*) #

You have a shell on a Windows machine. The next step is almost always the same: whoami /privThat one line tells you everything — what privileges you have, what carriers are available, how close you are to nt authority\systemThis guide covers all the Windows privilege token exploitable in a pentest, with links to complete how-to guides for each.


What is a Privilege Token on Windows? #

Windows assigns each process an access token —a structure containing the user's identity, group membership, and a list of privileges (SePrivilege). These privileges control what the process can do at the system level: impersonate users, debug other processes, load drivers, and read files bypassing ACLs.

Most of the privileges are present in the token but disabled — processes enable them when they need them via AdjustTokenPrivileges. Some tools like GodPotato, mimikatz and the various Potato attacks automatically enable them before the exploit.


Enumeration — The First Step #

Quick privilege check #

cmd
whoami /priv

This is the most important command in Windows post-exploitation. Always run it immediately after gaining access.

Complete automatic enumeration #

winPEAS — the most widely used tool for automatic enumeration on Windows. Detects privileges, vulnerable services, saved credentials, hijackable paths, and more:

cmd
winPEAS.exe quiet tokencheck
winPEAS.exe

Seatbelt — C# host-side security auditing tool, quieter than winPEAS:

cmd
Seatbelt.exe TokenPrivileges
Seatbelt.exe -group=all

accesschk — Sysinternals, checks who has a specific privilege on the system:

cmd
accesschk.exe -a SeImpersonatePrivilege *
accesschk.exe -a SeDebugPrivilege *

SharpUp — Quick audit of the most common escalation vectors:

cmd
SharpUp.exe audit

PrivescCheck — alternative PowerShell script to winPEAS:

powershell
. .\PrivescCheck.ps1; Invoke-PrivescCheck

Privilege Token Map — From Privilege to SYSTEM #

Each privilege opens different vectors. This table is a quick reference—find your privilege and go directly to the how-to guide.

Tier 1 — SYSTEM Immediate #

The most common in real pentests. If you have one of these, you're close to SYSTEM.

PrivilegeImpactMain vectorGuide
SeImpersonatePrivilegeSYSTEM shellPotato attack (GodPotato)→ Complete guide
SeAssignPrimaryTokenPrivilegeSYSTEM shellPotato attack (GodPotato -t 2)→ Complete guide
SeDebugPrivilegeLSASS dump → AD hashcomsvcs.dll / nanodump→ Complete guide
SeLoadDriverPrivilegeRing-0, kill EDR, bypass PPLBYOVD (Capcom.sys, RTCore64)→ Complete guide

Tier 2 — SYSTEM with a Target Service #

They require an exploitable SYSTEM service in the environment — almost always present.

PrivilegeImpactMain vectorGuide
SeBackupPrivilegeSAM + NTDS.dit → all AD hashesreg save + secretsdump→ Complete guide
SeRestorePrivilegeBinary replacement → SYSTEMreg add ImagePath + robocopy /B→ Complete guide
SeTakeOwnershipPrivilegeArbitrary files/registries → SYSTEMtakeown + icacls + binary replace→ Complete guide
SeRelabelPrivilegeBypass MIC → writing to High fileicacls /setintegritylevel→ Complete guide
SeManageVolumePrivilegeRaw disk → SAM/NTDS.ditRawCopy + secretsdump→ Complete guide

Tier 3 — Domain Compromise #

Vectors that start from domain accounts even without local privileges.

PrivilegeImpactMain vectorGuide
SeMachineAccountPrivilegeDomain AdminRBCD + getST.py + secretsdump→ Complete guide

Tier 4 — Conditional / Specific #

They require special conditions in the environment or are rare on non-system accounts.

PrivilegeImpactMain vectorGuide
SeCreateSymbolicLinkPrivilegeArbitrary writing via TOCTOUmklink + race condition→ Complete guide
SeDelegateSessionUserImpersonatePrivilegeCross-session token steal (RDS/Citrix)NtObjectManager→ Complete guide
SeSecurityPrivilegeOpSec: clear log, remove SACLwevtutil + SetACL→ Complete guide
SeTrustedCredManAccessPrivilegeDump Credential Managercmdkey + mimikatz + SharpDPAPI→ Complete guide
SeSystemEnvironmentPrivilegePATH hijacking / UEFI persistencereg add PATH + Process Monitor→ Complete guide

Tier 5 — Critical: Document Immediately #

Almost exclusive to SYSTEM processes. Finding them on non-system accounts is a P0 finding.

PrivilegeImpactNotaGuide
SeCreateTokenPrivilegeToken forgery from scratch with NtCreateTokenCritical Finding P0→ Complete guide
SeTcbPrivilegeArbitrary logon sessions via LSA with custom SIDCritical Finding P0→ Complete guide

Escalation Workflow — From Shell to SYSTEM #

Step 1 — List now #

cmd
whoami /priv
whoami /groups
whoami /all

Then automate:

cmd
winPEAS.exe quiet tokencheck
Seatbelt.exe TokenPrivileges

Step 2 — Identify the vector #

Do you have SeImpersonatePrivilege or SeAssignPrimaryTokenPrivilege? → Potato attack → SYSTEM in 2 commands.

Are you in the Backup Operators group? → SeBackupPrivilege + SeRestorePrivilege → SAM dump + binary replacement.

Do you have SeDebugPrivilege in elevated token? → comsvcs.dll MiniDump → LSASS → NTLM hash → PTH.

Are you in Print Operators? → SeLoadDriverPrivilege → BYOVD → ring-0 → bypass PPL and EDR.

Do you only have domain credentials? → MachineAccountQuota → RBCD → Domain Admin.

Step 3 — Run the Quick Exploit #

Each guide in the series has a Quick Exploit block with the bare minimum commands. Always start there.

Phase 4 — Post-SYSTEM: Dump and Persistence #

cmd
mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" exit

Or without external tools:

cmd
rundll32.exe C:\Windows\System32\comsvcs.dll MiniDump [PID lsass] C:\temp\lsass.dmp full

On attacking machine:

bash
python3 pypykatz lsa minidump lsass.dmp
python3 secretsdump.py -sam sam.hive -system system.hive LOCAL

Essential Tools — Cheatsheet #

Enumeration #

toolUseDownload
winPEASFull automatic enumerationPEASS-ng GitHub
seat beltOffensive host surveyGhostPack/Seatbelt
SharpUpAudit of common carriersGhostPack/SharpUp
accesschkCheck permissions and privilegesSysinternals
PrivescCheckAlternative PowerShell scriptitm4n/PrivescCheck

Potato Attack (SeImpersonatePrivilege) #

toolSupported versionsDownload
God PotatoWin10 / Srv 2016–2022BeichenDream/GodPotato
PrintSpooferWin10 / Srv 2016–2019itm4n/PrintSpoofer
SweetPotatoWin10 / Srv 2016–2022CCob/SweetPotato
JuicyPotatoWin7 / Srv 2008–2016ohpe/juicy-potato
RoguePotatoWin10 / Srv 2016–2022antonioCoco/RoguePotato

Credential Dump #

toolUse
comsvcs.dll MiniDumpLSASS dump — built-in Windows, zero external tools
mimikatzDump LSASS, vault, DPAPI, Kerberos tickets
nanodumpLSASS dump with direct syscalls — EDR evasion
SharpDPAPIComplete DPAPI chain — vault, credentials
Impacket secretsdumpOffline dump SAM/NTDS + via network to DC

Active Directory #

toolUse
Ipacket (addcomputer, getST, secretsdump)RBCD, hash dump, Kerberos tickets
The redKerberos Tickets, S4U, PTT — Windows
PowerMadComputer account creation from Windows
PowerViewEnumeration AD, ACL, RBCD config
blood houndGraph AD — find path to DA

Kernel / Driver #

toolUse
EoPLoadDriverLoad drivers with SeLoadDriverPrivilege
ExploitCapcomKernel exec via Capcom.sys
EDRSandBlastKill EDR via BYOVD kernel driver
LOLDriversList of vulnerable signed drivers

AD Groups to Always Monitor #

Some Active Directory groups assign critical privileges by design. Always check for them in the enumeration:

cmd
net localgroup "Backup Operators"
net localgroup "Print Operators"
net localgroup "Server Operators"
net localgroup Administrators
powershell
Get-ADGroupMember "Backup Operators" -Recursive | Select-Object Name, SamAccountName
Get-ADGroupMember "Print Operators" -Recursive | Select-Object Name, SamAccountName
GroupCritical privilegesCarrier
Backup OperatorsSeBackupPrivilege + SeRestorePrivilegeSAM/NTDS dump + binary replacement
Print OperatorsSeLoadDriverPrivilegeBYOVD → ring-0 (also on DCs)
Server OperatorsSeBackupPrivilege + moreSimilar to Backup Operators

Verify Elevated or Not Elevated Token (UAC) #

Many privileges — SeDebugPrivilege, SeTakeOwnershipPrivilege, SeImpersonatePrivilege — are present in the token but disabled outside an elevated process.

cmd
whoami /groups | findstr "Mandatory"
  • High Mandatory Level → elevated token → enableable privileges
  • Medium Mandatory Level → non-elevated token (split UAC) → some privileges disabled

If you are on Medium and need a high token:

cmd
runas /user:Administrator cmd

Or use a UAC bypass (outside the scope of this guide — depends on your environment).


Detection — What Windows Logs #

If you are in a monitored environment, these are the Event IDs that generate alerts most frequently:

EventIDtrigger
Abnormal child process (w3wp → cmd)4688Post-escalation potato attack
Named pipe anomalousSysmon 17/18GodPotato / PrintSpoofer
Accessing lsass.exeSysmon 10LSASS dump
Pattern comsvcs.dll + lsass PIDSysmon 1LSASS dump built-in
Driver loaded from abnormal pathSysmon 6BYOVD
Security log cleared1102SeSecurityPrivilege
Computer account created by non-admin4741RBCD attack
SAM / NTDS.dit accessed4663SeBackupPrivilege

For OpSec management and how to reduce noise: → SeSecurityPrivilege — Clear Logs and Operate Invisibly


External References #


Complete Series Index #

Complete operational guide for every Windows privilege exploitable in a pentest:

  1. SeImpersonatePrivilege — Potato Attack from Webshell to SYSTEM
  2. SeAssignPrimaryTokenPrivilege — Potato Attack Even Without SeImpersonate
  3. SeBackupPrivilege — Dump SAM and NTDS.dit without Shell on DC
  4. SeRestorePrivilege — Binary Replacement and Persistent Backdoor
  5. SeDebugPrivilege — LSASS Dump and Credential Access
  6. SeTakeOwnershipPrivilege — Arbitrary Ownership on Files and SYSTEM Services
  7. SeLoadDriverPrivilege — BYOVD, Kernel Code Execution and Kill EDR
  8. SeCreateSymbolicLinkPrivilege — Symlink Attack and Arbitrary Writing
  9. SeManageVolumePrivilege — Raw Disk Access to Extract SAM and NTDS.dit
  10. SeDelegateSessionUserImpersonatePrivilege — Cross-Session Token Stealing on RDS
  11. SeCreateTokenPrivilege — Token Forgery from Scratch with NtCreateToken
  12. SeTcbPrivilege — Arbitrary Logon Session via LSA
  13. SeSecurityPrivilege — Clear Logs and Operate Invisibly
  14. SeTrustedCredManAccessPrivilege — Dump RDP Credentials and Saved Passwords
  15. SeRelabelPrivilege — Bypass Mandatory Integrity Control
  16. SeMachineAccountPrivilege — RBCD from Domain User to Domain Admin
  17. SeSystemEnvironmentPrivilege — PATH Hijacking and UEFI Persistence

Found a perk not listed here or need support for a specific engagement? hackita.it/supporto

For complete assessments of privilege escalation and Active Directory: hackita.it/servizi

#windows-privilege-escalation #token-privilege #se privesc

leave a message

I'm not a robot