> 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/pt-br/active-directory/credentials/logon-session-observation.md).

# Observando sessões de logon

#### Ferramenta LogonSessions

Para ver as sessões de conexão presentes na máquina, usamos a ferramenta:

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

Esta ferramenta permite observar as diferentes sessões ativas no sistema.

Podemos ver, por exemplo:

* uma sessão de usuário padrão;
* uma sessão de administrador;
* uma sessão de rede;
* uma sessão de serviço.

<figure><img src="/files/427abcc0f24dbeed66d50cdee26479bb755d907f" alt=""><figcaption></figcaption></figure>

#### Exibir processos relacionados

Para visualizar processos relacionados às sessões de logon:

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

O `-p` A opção permite associar processos às sessões de logon.

Isso ajuda a entender quais processos usam qual contexto de segurança.

<figure><img src="/files/867b3a0d723b00f278cbdaaf2496a5b787fed5e2" alt=""><figcaption></figcaption></figure>

#### Observação de exemplo

No laboratório, quando um administrador de domínio se conecta a um compartilhamento remoto:

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

<figure><img src="/files/087ac535afd47f69993ff08210ff17d134dbbb23" alt=""><figcaption></figcaption></figure>

Podemos observar uma sessão do tipo:

```bash
Tipo de logon : Rede
Pacote de autenticação : Kerberos
```

Isso indica que o acesso à rede foi obtido via Kerberos.

<figure><img src="/files/e2a92f6f08cb45cdbfcd24959591a6a5354c61bb" 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/pt-br/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.
