# Path traversal Lab

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

En este pequeña lab nos piden que listemos en contenido del /etc/passwd.

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

Vamos a tomar cualquier imagen y la abrimos en una nueva pestaña y vamos a intercepta la peticion con Burp Suite.

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

Interceptamos la peticion y la enviamos al Repeater para jugar con la peticion.

<figure><img src="/files/3OwVHAC4acagmYiL8hGA" alt=""><figcaption></figcaption></figure>

Ahora si manipulamos la peticion en la URL podemos hacer un Path traversal y listar el contenido del /etc/passwd. Podemos listar contenido mas pornografico si estan accesibles.

Pudiendo envenenar los logs de apache los de ssh.

Ejemplo de rutas&#x20;

```javascript
/proc/net/tcp --> Contiene información en formato legible por humanos sobre las conexiones TCP activas, incluyendo direcciones IP, puertos, estados de conexión, etc.
/var/log/httpd/access_log --> Los registros (logs) de Apache suelen ubicarse en diferentes rutas según la configuración específica de tu servidor Apache 
/var/log/auth.log --> Ruta tipica
/var/log/btmp --> Registro de intentos de inicio de sesión fallidos
/var/run/utmp --> Registro de sesiones de usuario (utmp)

```


---

# 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://rodgar.gitbook.io/rodgar/othe/owasp-top-10/path-traversal-lab.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.
