# ShellShock

La vulnerabilidad de Shellshock permite un ataque remoto para ejecutar un código arbitrario en el sistema afectado, con lo que el hacker podría hacer lo que quiera en el dispositivo de la victima, desde inutilizarlo, hasta utilizarlo para realizar otro ataque, o ponerlo al servicio de cualquiera.

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

Tenemos una web normal, esta maquina es de vulnhub la maquina Zumo para que la busques.

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

Empezamos a hacer fuzzing en la web y observamos que tenemos un directorio llamado cgi-bin/.

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

Para enumerar archivos ya con extenciones prefiero gobuster antes que wfuzz en este sentido es mejor, bueno volviendo al tema observamos que bajo el directorio cgi-bin/test.sh, tenemos este archivo.

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

Si le lanzamos un CURL observamos que tiene contenido simple.

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

Vamos a explotar el SHellShock de este manera ya que los archivos .sh y .cgi, son vulnerables, observamos que le lanzamos un whoami y nos lo interpreta nos dice que somos www-data.

Ahora solo falta ganar acceso.

<figure><img src="/files/74sZm2TQfyvGZV32uPVE" alt=""><figcaption></figcaption></figure>

Como punto numero uno invocamos a la bash nativa que traera el sistema y nos enviamos una conexion TCP a nuestra direccion IP.

En la parte de abajo como punto numero dos nos ponemos en escucha con netcat y observamos que recivimos la conexion.


---

# 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/shellshock.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.
