> 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/active-directory/credentials/access-token.md).

# 访问令牌

#### 定义

一个 **访问令牌** 是一个描述进程或线程安全上下文的 Windows 对象。

当用户登录时，Windows 会检查其凭据。

如果身份验证成功，系统会生成一个访问令牌。

代表该用户启动的每个进程都会收到该令牌的副本。

#### 令牌的内容

令牌可以包含：

* 用户的 SID；
* 组 SID；
* 权限；
* 完整性级别；
* 令牌类型；
* 关联的会话登录；
* 与 UAC 提权相关的信息。

#### 令牌的作用

Windows 使用令牌来确定进程或线程是否可以访问安全对象。

安全对象示例：

* 文件；
* 文件夹；
* 注册表项；
* 服务；
* 进程；
* 网络共享；
* Active Directory 对象。

当进程尝试访问资源时，Windows 会比较：

```bash
用户令牌
        ↓
对象权限
        ↓
允许或拒绝访问
```

{% embed url="<https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer>" %}


---

# 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/active-directory/credentials/access-token.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.
