Assess privilege escalation via Windows token privileges — SeImpersonatePrivilege / SeAssignPrimaryTokenPrivilege (Potato-family), SeDebugPrivilege, SeBackup/SeRestore, and SeTakeOwnership. Identify the held privilege, safely demonstrate escalation to a benign PoC, and give remediation. Use when whoami /all shows exploitable privileges (common on service accounts).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Windows Token Impersonation?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-windows-token-impersonation)
---
name: windows-token-impersonation
description: Assess privilege escalation via Windows token privileges — SeImpersonatePrivilege / SeAssignPrimaryTokenPrivilege (Potato-family), SeDebugPrivilege, SeBackup/SeRestore, and SeTakeOwnership. Identify the held privilege, safely demonstrate escalation to a benign PoC, and give remediation. Use when whoami /all shows exploitable privileges (common on service accounts).
---
# Windows Token / Privilege Abuse (assessment)
Certain privileges equal SYSTEM. Service accounts (IIS/MSSQL) frequently hold SeImpersonate. Prove the capability benignly; don't deploy real payloads.
## Trigger phrases
`seimpersonate, seassignprimarytoken, potato, printspoofer, sedebug, sebackup, token impersonation, rotten potato`
## Identify
```
whoami /priv # look for SeImpersonatePrivilege / SeAssignPrimaryTokenPrivilege / SeDebugPrivilege / SeBackupPrivilege
```
## Technique map (what to validate)
- **SeImpersonate / SeAssignPrimaryToken** → Potato family (PrintSpoofer, GodPotato, RoguePotato) coerces a SYSTEM token. **Safe PoC:** use the tool to run `whoami` (shows `nt authority\system`) — not to launch a shell/payload.
- **SeDebug** → open privileged processes; **safe PoC:** read a protected process handle / show you could, without injecting.
- **SeBackup / SeRestore** → read any file (e.g., copy SAM/SYSTEM hives via a backup API) — demonstrate read of a protected file, handle sensitive data per RoE.
- **SeTakeOwnership** → take ownership of a protected object; demonstrate on a non-critical object and revert.
## Safe-PoC discipline
Run the proof that shows the privilege level (e.g., `whoami` as SYSTEM) and stop there. Avoid persistence, injection into live processes, or dumping production secrets beyond what's needed to prove impact.
## Remediation to report
Remove unnecessary privileges from service accounts, use virtual/gMSA accounts with least privilege, patch Potato vectors where applicable, enable protections.
## Evidence
`whoami /priv`, the benign capability proof, impact, remediation. Revert ownership/ACL changes.