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

# Windows 提权

Windows 权限提升是本地后渗透阶段，重点是从受限的 Windows shell 转换到更高权限的本地上下文，通常 `NT AUTHORITY\SYSTEM` 或可重复使用的管理员凭据。

本节将 Windows 特有内容集中整理：本地枚举、危险权限、凭据访问、易受攻击的服务、内核漏洞利用、SMB 中继实验笔记，以及逆向分析检查。域范围内的 Active Directory 攻击路径放在专门的 Active Directory 部分。

## Windows 权限提升流程

1. 识别当前用户、组、完整性级别、权限、主机名、操作系统版本、架构和补丁级别。
2. 枚举 UAC、AlwaysInstallElevated、可写服务、服务权限、计划任务、已安装软件以及暴露的机密信息。
3. 审查 `whoami /priv` 和 `whoami /groups` 中的令牌权限、完整性级别以及基于组的利用路径。
4. 检查本地凭据来源，例如 LSASS、SAM、LSA 秘密、注册表项、部署文件和应用程序配置。
5. 根据确切的 Windows 版本验证易受攻击的服务、第三方软件、SMB 中继条件以及内核 CVE 候选项。
6. 利用已确认的最安全路径，并保留命令序列、证据和修复说明用于报告。

## Windows 技术

<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-windows" style="color:$primary;">:windows:</i></h3></td><td><h4>本地权限提升与凭据</h4></td><td>Windows 本地权限提升与凭据访问笔记，涵盖 UAC 绕过、AlwaysInstallElevated、Mimikatz、SAM 提取、LSASS 秘密以及存储在部署文件中的凭据。</td><td><a href="/pages/b4bee844f506aa9559e482fad38b37ed61af2f41">/pages/b4bee844f506aa9559e482fad38b37ed61af2f41</a></td></tr><tr><td><h3><i class="fa-user-lock" style="color:$primary;">:user-lock:</i></h3></td><td><h4>令牌权限</h4></td><td>用于解读 whoami /priv 输出，并通过 SeImpersonatePrivilege 或 SeBackupPrivilege 提权的 Windows 令牌权限滥用笔记。</td><td><a href="/pages/f093c92caca9150e833e27a133850e4541bd137e">/pages/f093c92caca9150e833e27a133850e4541bd137e</a></td></tr><tr><td><h3><i class="fa-users-gear" style="color:$primary;">:users-gear:</i></h3></td><td><h4>组和完整性级别</h4></td><td>在本地权限提升过程中解读 whoami /groups 输出、Windows 完整性级别以及服务交互路径。</td><td><a href="/pages/bb9b02882bafec10d92fb83c2999aa7cdc1e5d4e">/pages/bb9b02882bafec10d92fb83c2999aa7cdc1e5d4e</a></td></tr><tr><td><h3><i class="fa-gears" style="color:$primary;">:gears:</i></h3></td><td><h4>易受攻击的服务和进程</h4></td><td>Windows 易受攻击的进程和服务笔记，涵盖服务枚举、暴露的凭据、PrintNightmare 实验室利用以及不安全的第三方应用程序配置。</td><td><a href="/pages/443399bd37402a1406a420d9b045301c4b566eef">/pages/443399bd37402a1406a420d9b045301c4b566eef</a></td></tr><tr><td><h3><i class="fa-calendar-check" style="color:$primary;">:calendar-check:</i></h3></td><td><h4>计划任务</h4></td><td>检查 Windows 计划任务中的薄弱目标路径、可写脚本、提升后的运行上下文以及过期的自动化凭据。</td><td><a href="/pages/af644d44dc2eca26dacf3172f3a8ed49a559fd2b">/pages/af644d44dc2eca26dacf3172f3a8ed49a559fd2b</a></td></tr><tr><td><h3><i class="fa-network-wired" style="color:$primary;">:network-wired:</i></h3></td><td><h4>SMB 中继</h4></td><td>在授权的 Windows 实验室环境中捕获并中继通过 SMB 的 NTLM 身份验证。</td><td><a href="/pages/aab0ffa69eab791d555fd09302f1c000a2703338">/pages/aab0ffa69eab791d555fd09302f1c000a2703338</a></td></tr><tr><td><h3><i class="fa-microchip" style="color:$primary;">:microchip:</i></h3></td><td><h4>内核利用</h4></td><td>用于验证操作系统版本、架构、补丁级别以及本地权限提升漏洞利用候选项的 Windows 内核利用笔记。</td><td><a href="/pages/e8370902724860719dba42959bf04f7ab3e67e4c">/pages/e8370902724860719dba42959bf04f7ab3e67e4c</a></td></tr><tr><td><h3><i class="fa-file-code" style="color:$primary;">:file-code:</i></h3></td><td><h4>二进制分析</h4></td><td>Windows 二进制分析笔记，用于在可执行文件中查找硬编码凭据、端点、身份验证逻辑以及其他有用行为。</td><td><a href="/pages/1f996f010efe106e73716bdc81218cffc5af4d6d">/pages/1f996f010efe106e73716bdc81218cffc5af4d6d</a></td></tr></tbody></table>

## 手动枚举

在运行自动化工具之前，先从一个小的基线开始。目标是了解主机，而不是收集噪声。

```cmd
whoami /all
hostname
systeminfo
wmic qfe list brief
```

检查网络、暴露的服务和本地共享：

```cmd
ipconfig /all
route print
arp -a
netstat -ano
net share
```

查看用户、组、会话和正在运行的软件：

```cmd
net user
net localgroup
net localgroup administrators
query user
tasklist /svc
sc query state= all
```

PowerShell 通常更便于筛选服务、任务和文件系统输出：

```powershell
Get-ComputerInfo | Select-Object WindowsProductName,WindowsVersion,OsHardwareAbstractionLayer
Get-LocalUser
Get-LocalGroup
Get-Service | Sort-Object Status,Name
Get-ScheduledTask | Select-Object TaskName,TaskPath,State
```

## 快速排查清单

* `whoami /priv` 显示危险权限，例如 `SeImpersonatePrivilege`, `SeBackupPrivilege`, `SeRestorePrivilege`, `SeTakeOwnershipPrivilege`，或 `SeDebugPrivilege`.
* 服务以 `本地系统` 运行，并且具有可写二进制文件、宽松的 DACL 或未加引号的路径。
* 计划任务以提升权限运行，并指向可写脚本或可执行文件。
* 注册表项暴露了 AlwaysInstallElevated、自动登录值、第三方密码或可写的自动运行项。
* 部署文件、PowerShell 历史记录、IIS 配置、数据库配置或应用程序文件夹中包含可重复使用的凭据。
* 只有在确认了确切的操作系统版本、架构、缺失的 KB 以及更安全的利用向量之后，才考虑内核漏洞利用。

## 推荐工具

* [WinPEAS](https://github.com/peass-ng/PEASS-ng/tree/master/winPEAS) 用于自动化 Windows 权限提升枚举。
* [PowerUp](https://github.com/PowerShellMafia/PowerSploit/tree/master/Privesc) 用于常见的 Windows 错误配置检查。
* [Mimikatz](https://github.com/gentilkiwi/mimikatz) 用于在授权实验室中测试凭据访问。
* [Impacket](https://github.com/fortra/impacket) 用于 SMB、NTLM 中继、注册表提取和 Windows 协议工具。
* [Sysinternals](https://learn.microsoft.com/en-us/sysinternals/) 用于进程、令牌、登录会话和服务检查。


---

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