# 139;445 - SMB

> SMB (Server Message Block) es un protocolo cliente-servidor que controla el acceso a archivos y directorios enteros, así como a otros recursos de la red

## Enumeration

### Without Credentials

```bash
smbmap -H IP_TARGET
```

```bash
smbmap -H IP_TARGET -r anonymous
```

```bash
enum4linux -a <AD_IP>
```

```bash
crackmapexec smb <AD-IP> -u "" -p ""
```

```bash
smbclient -L <AD_IP> -N
```

### With Crendentials

`crackmapexec smb IP_TARGET -u users -p passwd -d dominio.local --continue-on-success`

## Conecction

`smbmap -H` IP\_TARGET `-u USER -p PASSWD`

`smbclient //IP_TARGET/recurso -U USER%PASSWD`

## Brute Force

`hydra -L users -P passwd smb://IP_TARGET`

`crackmapexec smb IP_TARGET -u users -p passwd -d dominio.local --continue-on-success`


---

# 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/ports/139-445-smb.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.
