# Nmap Strategies

Metodología profesional de escaneo para identificar la superficie de ataque sin perder tiempo.

## Estrategia de Escaneo (OSCP optimized)

### 1. Discovery (Ping Sweep)

Antes de escanear puertos, encuentra los hosts vivos.

```bash
nmap -sn 192.168.1.0/24
```

### 2. Escaneo de Puertos (TCP)

El estándar de oro.

```bash
# Escaneo rápido (Top 1000 puertos)
nmap -sC -sV -oA nmap_initial <IP>

# Escaneo completo (Todos los puestos TCP)
nmap -p- -T4 --min-rate 5000 -v <IP>

# Escaneo UDP (Lento pero necesario)
nmap -sU --top-ports 100 <IP>
```

### 2. Enumeración de Servicios Comunes

#### SMB (Puerto 445)

Buscar recursos compartidos accesibles sin contraseña y versiones vulnerables (EternalBlue).

```bash
# Enumerar shares
smbclient -L //<IP> -N

# Enumerar usuarios
enum4linux -a <IP>
```

#### HTTP/HTTPS (80/443)

No olvidar ejecutar un escáner de directorios.

```bash
# Gobuster
gobuster dir -u http://<IP> -w /usr/share/wordlists/dirb/common.txt

# Feroxbuster (Recursivo y rápido)
feroxbuster -u http://<IP>
```

#### SNMP (161 UDP)

A menudo olvidado, puede revelar mucha información interna.

```bash
snmpwalk -c public -v1 <IP>
```


---

# 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://jotatito05.gitbook.io/la-bitacora-de-jotatito05/02.-network-scanning/nmap-strategies.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.
