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

# Observer les sessions de connexion

#### Outil LogonSessions

Pour voir les sessions de connexion présentes sur la machine, nous utilisons l’outil :

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

Cet outil permet d’observer les différentes sessions actives sur le système.

Nous pouvons voir, par exemple :

* une session utilisateur standard ;
* une session administrateur ;
* une session réseau ;
* une session de service.

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

#### Afficher les processus associés

Pour afficher les processus liés aux sessions de connexion :

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

Le `-p` L’option permet d’associer les processus aux sessions de connexion.

Cela aide à comprendre quels processus utilisent quel contexte de sécurité.

<figure><img src="/files/0156df60096c7319e4e3d8c7c16a86b68acb3800" alt=""><figcaption></figcaption></figure>

#### Exemple d’observation

Dans le labo, lorsqu’un administrateur du domaine se connecte à un partage distant :

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

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

Nous pouvons observer une session du type :

```bash
Type d’ouverture de session : Réseau
Package d’authentification : Kerberos
```

Cela indique que l’accès réseau a été obtenu via Kerberos.

<figure><img src="/files/fe8f11c3e8024309a4a02f37427abae1a576d24e" 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/fr/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.
