Individual skill

privesc-windows-tokens

Windows privilege escalation via token impersonation privileges — SeImpersonate/SeAssignPrimaryToken (the Potato family) and related token abuse to SYSTEM. Load with a Windows shell as a service/web account, on "SeImpersonate", "whoami /priv", IIS/MSSQL service context, or "got a shell on Windows".

skills/privesc/privesc-windows-tokens/SKILL.md

Read pinned source

Source commit ee0e0c50d2f6d941a14b73dd85a2b470d0ab976e

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
No
Repository scan complete
No
Skill scan complete
Yes
Observed behavior
Not checked yet
Last checked
Nov 7, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
27
Repository last updated
Oct 14, 2026
License
MIT

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Windows token-impersonation privesc (Potato family)

## When it applies
You have code execution on Windows as a service or web account (IIS `iis apppool`, MSSQL, a service)
that holds **`SeImpersonatePrivilege`** (or `SeAssignPrimaryTokenPrivilege`). These accounts can't
do much directly but can impersonate a token — and coax SYSTEM into handing one over.

## Why it works
`SeImpersonate` lets a process act with any token it can obtain. The "Potato" technique tricks a
SYSTEM service (via a local RPC/named-pipe/COM authentication) into authenticating to an attacker-controlled
pipe; the low-priv process impersonates that SYSTEM token and spawns a process as SYSTEM.

## Method
1. **Confirm the privilege**: `whoami /priv` — look for `SeImpersonatePrivilege` (or `SeAssignPrimaryTokenPrivilege`) **Enabled**.