> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/windows-vulnerabilities/token-privileges.md).

# Windows 令牌权限

`whoami /priv` 标识分配给当前令牌的特权。一些本地特权可以导致 `NT AUTHORITY\SYSTEM` 或在周围的 Windows 版本和服务上下文兼容时允许访问敏感的本地数据。

```powershell
whoami /priv
```

## 高价值特权

| 特权                              | 重要原因                       | 首先检查                                       |
| ------------------------------- | -------------------------- | ------------------------------------------ |
| `SeImpersonatePrivilege`        | 在兼容的本地服务中可以允许令牌模拟。         | Windows 版本、暴露的命名管道/RPC 路径、可用的 Potato 风格技术。 |
| `SeAssignPrimaryTokenPrivilege` | 当进程可以创建特权进程令牌时，其影响与模拟相似。   | 服务上下文和兼容的工具。                               |
| `SeBackupPrivilege`             | 允许对受保护文件（如注册表蜂巢）进行类似备份的读取。 | 导出的能力 `SAM`, `SYSTEM`，有时还 `SECURITY`.      |
| `SeRestorePrivilege`            | 在还原操作期间，可以允许写入受保护的位置。      | 可写目标以及清晰的回滚计划。                             |
| `SeTakeOwnershipPrivilege`      | 允许用户取得文件或注册表项的所有权。         | 目标对象、所需的 ACL 更改以及还原路径。                     |
| `SeDebugPrivilege`              | 可以检查或转储特权进程。               | LSASS 保护、EDR，以及类似本地管理员的上下文。                |
| `SeLoadDriverPrivilege`         | 可以加载内核驱动程序。                | 驱动程序签名、操作系统保护，以及较高的崩溃风险。                   |

## 分流流程

1. 运行 `whoami /all` 并保存输出。
2. 优先关注已启用的特权，但也要注意工具可能会在当前令牌中启用的已禁用特权。
3. 优先选择文件/注册表读取，例如 `SeBackupPrivilege` 而不是不稳定的内核或驱动程序路径。
4. 将技术与 Windows 版本相匹配。适用于旧主机的 Potato 风格利用在现代已打补丁的版本上可能失败。
5. 记录精确的特权、命令输出，以及为何所选路径对实验室或交付目标是安全的。

<table data-view="cards" data-full-width="false" data-search="false"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h3><i class="fa-user-secret" style="color:$primary;">:user-secret:</i></h3></td><td><h4>SeImpersonatePrivilege</h4></td><td>识别并利用 SeImpersonatePrivilege，以在兼容的实验室目标中实现 Windows 本地权限提升。</td><td><a href="/pages/b8df8dead09564d1647d7fbe2b746e3a3bdee3b8">/pages/b8df8dead09564d1647d7fbe2b746e3a3bdee3b8</a></td></tr><tr><td><h3><i class="fa-floppy-disk" style="color:$primary;">:floppy-disk:</i></h3></td><td><h4>SeBackupPrivilege</h4></td><td>滥用 SeBackupPrivilege 导出 SAM 和 SYSTEM 注册表蜂巢，并提取本地 Windows 哈希。</td><td><a href="/pages/b6f0a4037588377fe06e0839871815b80eaa131d">/pages/b6f0a4037588377fe06e0839871815b80eaa131d</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/zh/windows-vulnerabilities/token-privileges.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
