# 2. Enumeración y descubrimiento

## 1. DIRECTORIOS & FICHEROS

* DIRB

  -X -> extensión

```bash
dirb domain -X .html /path/to/wordlist
```

* GOBUSTER

  -s -> evita mostrar resultados con XXX tipo de error

  -r -> sigue la redirección

  -wildcard -> salta la verificación de certificado SSL

{% code overflow="wrap" %}

```bash
gobuster dir --url https://IP:port/ --wordlist /path/to/wordlist -s 301,302,304,400,401,403,404,500 -r --wildcard
```

{% endcode %}

* [DIRSEARCH](https://github.com/maurosoria/dirsearch)&#x20;
  * -e --> filtra por diferentes tipos de extensiones de ficheros
  * -F --> hace búsquedas recursivas

```bash
python3 dirsearch/dirsearch.py -u https://domain -w /path/to/wordlist -e all -F
```

* WFUZZ
  * buscar directorios - `$ wfuzz -w /path/to/wordlist domain/FUZZ`
  * buscar ficheros - `$ wfuzz -w /path/to/wordlist domain/FUZZ.html`
* [SUBFINDER](https://github.com/projectdiscovery/subfinder)

```
subfinder -v -d dominio
```

* Herramientas online
  * <https://www.riskiq.com>
  * <https://securitytrails.com/>

## 2. Usuarios

Analizar:

* Código fuente
* Rutas por defecto donde se muestren usuarios de la plataforma&#x20;
* Los perfiles de los usuarios siguen un patrón?
  * webejemplo.com/in/nombredeusuario
  * webejemplo.com/user/nombredeusuario
  * webejemplo.com/IDdeusuario
  * etc
* La web tiene publicaciones? Aparece algún autor?
* Las funcionalidades de login y "contraseña olvidada" tienen enumeración de usuarios?
  * Los mensajes de respuesta son iguales si un usuario existe o no?

## 3. Metadatos

* Descargar el código fuente de la web:

```bash
wget -m URL
```

* Filtra las URIs donde se encuentran ubicados los ficheros:

```bash
grep -w "" | cut -d "" -f2 > output.txt
```

* Descarga los ficheros de la web:

```bash
wget -i output.txt
```

* Analiza con [exiftool](https://github.com/exiftool/exiftool) los ficheros:

```
exiftool /path/to/files/directory
```


---

# 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://wiki.securiters.com/securiters-wiki/web/2.-enumeracion-y-descubrimiento.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.
