> 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/credentials/lsass-and-sam-dump-on-windows.md).

# Извлечение LSASS и SAM в Windows

### Выполнение в лаборатории

В лаборатории мы открываем несколько сеансов PowerShell:

* два сеанса с локальным администратором;
* один сеанс с администратором домена.

<figure><img src="/files/0ba0e945989816e3dcf55728b98011f12d8eaaae" alt=""><figcaption></figcaption></figure>

Затем мы запускаем инструмент из сеанса PowerShell локального администратора:

```bash
./mimikats.exe
```

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

### Показать информацию о сеансе

В инструменте:

```powershell
sekurlsa::logonpasswords
```

Эта команда отображает информацию, связанную с сеансами аутентификации, присутствующими в памяти.

В зависимости от контекста можно увидеть такую информацию, как:

* подключенные пользователи;
* домен;
* тип аутентификации;
* хэши ;
* билеты или элементы, связанные с Kerberos;
* интерактивные или сетевые сеансы.

<figure><img src="/files/0ccb76e5d1458e092658ded1d2c34f3ede24db16" alt=""><figcaption></figcaption></figure>

### Взломать NTLM-хэш

Если из лаборатории был получен NTLM-хэш, его можно проверить с помощью John:

```bash
john --format=NT admin.hash
```

Это помогает наглядно показать риск слабых или повторно используемых паролей.

<figure><img src="/files/5af861f1261f3134472bd9ec8e9af6a8897a4aae" 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/credentials/lsass-and-sam-dump-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.
