# Methodology

El 90% del éxito en el pentesting depende de esta fase. Si no lo encuentras, no puedes atacarlo.

## The Recon Mindset

No busques solo "puertos abiertos". Busca **Relaciones**, **Dependencias** y **Errores Humanos**.

1. **Horizontal**: Encuentra todas las empresas filiales y dominios relacionados.
2. **Vertical**: Encuentra todos los subdominios y activos de esos dominios.
3. **Contextual**: ¿Qué tecnología usan? ¿Quiénes son sus desarrolladores (GitHub)?

## Modern Workflow (ProjectDiscovery Stack)

Olvida herramientas de 2015. Usa el stack moderno en Go.

### 1. Subdomain Enumeration (Passive & Active)

```bash
# Passive (Rápido)
subfinder -d target.com -all -o subs_passive.txt

# Bruteforce (Lento, encuentra ocultos)
shuffledns -d target.com -w /usr/share/wordlists/seclists/Discovery/DNS/subdomains-top1million-20000.txt -r resolvers.txt -o subs_brute.txt
```

### 2. DNS Resolution & Live Check

De nada sirve un subdominio que no resuelve o no responde.

```bash
cat subs_passive.txt subs_brute.txt | sort -u | dnsx -resp -o subs_resolved.txt
cat subs_resolved.txt | httpx -title -tech-detect -status-code -o live_hosts.txt
```

### 3. Vulnerability Discovery (Nuclei)

El escáner de templates más potente.

```bash
nuclei -l live_hosts.txt -t cves/ -t vulnerabilities/ -o nuclei_results.txt
```

## Manual Recon (OSCP Context)

En el examen no tienes cientos de subdominios, sino una IP o una red pequeña.

1. **Puerto por Puerto**: No asumas nada. `nmap -p-` siempre.
2. **Banner Grabbing**: `nc -nv <IP> <PORT>`. ¿Qué versión exacta corre?
3. **Google Dorks (On-Prem Context)**:
   * Si encuentras una web, busca esa versión específica en Google + "exploit".
   * Busca archivos de configuración por defecto de ese software.


---

# 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/01.-information-gathering/metodologia.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.
