Skip to content
Back to skills

Windows Token Impersonation

ASecurity

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).

  • 16 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 17, 2026
securitygoshellsqlapi

Works with

  • api

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill windows-token-impersonation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Windows Token Impersonation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Windows Token Impersonation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-windows-token-impersonation/badge)](https://www.skillsdirectory.com/skills/anandjogawade-windows-token-impersonation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.