# SMB Enumeration

También podemos enumerar desde el servicio SMB.

#### Enumeración SMB sin credenciales:

**Smbclient**

```
smbclient -L <IP> -N
```

**Smbmap**

```
smbmap -H <IP> -u 'null'
```

**Netexec**

```
sudo netexec smb <IP> -u "" -p "" --shares
```

**Nmap**

```
sudo nmap -p445 --script smb-enum-shares 192.168.1.138
```

#### Enumeración con credenciales

Netexec

```
sudo netexec smb <IP> -u "username" -p "password" --shares
```

Smbclient

```
smbclient -U 'username' -L //<IP>
```

Smbmap Recursivo

```
smbmap -H <ip> -u '' -p '' -r
```

#### Enumerar descripciones de usuarios

```
netexec smb <ip> -u 'user' -p 'pass' --users
```

#### Acceder a un recurso compartido sin credenciales:

```
smbclient //IP/carpeta -N
```

<figure><img src="/files/E1B5hmJLo4zpKV2sEnnE" alt=""><figcaption></figcaption></figure>

#### Acceder con credenciales:

```
smbclient //192.168.1.136/helios -U helios

Enter

Password:> qwerty
```

#### Comandos SMB para descargar archivos

```
smb: \> mask ""
smb: \> prompt OFF
smb: \> recurse ON
smb: \> mget *
```


---

# 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://alv-fh.gitbook.io/alv-fh/active-directory-methodology/smb-enumeration.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.
