> 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/logon-session-observation.md).

# 观察登录会话

#### LogonSessions 工具

要查看机器上存在的连接会话，我们使用该工具：

```bash
./logonsessions.exe
```

该工具可让你观察系统中不同的活动会话。

例如，我们可以看到：

* 一个标准用户会话；
* 一个管理员会话；
* 一个网络会话；
* 一个服务会话。

<figure><img src="/files/b70d12136d3292ee84a42e311e2d854f498ad8f8" alt=""><figcaption></figcaption></figure>

#### 显示相关进程

要查看与登录会话相关的进程：

```bash
./logonsessions.exe -p
```

该 `-p` 该选项允许你将进程与登录会话关联起来。

这有助于理解哪些进程使用了哪些安全上下文。

<figure><img src="/files/072d0c3bebc4e7e357eb07938fb7c65b7f8089f5" alt=""><figcaption></figcaption></figure>

#### 示例观察

在实验室中，当域管理员连接到远程共享时：

```bash
cd //WS01/c$
```

<figure><img src="/files/46a684d2fa0c76d8bca0d6bf3f6e1d69ba75bf39" alt=""><figcaption></figcaption></figure>

我们可以观察到一个以下类型的会话：

```bash
登录类型：网络
身份验证包：Kerberos
```

这表明网络访问是通过 Kerberos 实现的。

<figure><img src="/files/89d8290daf3dbcdffebaa9b8efbc7b9c465c0a66" alt=""><figcaption></figcaption></figure>


---

# 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/logon-session-observation.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.
