# Enumeracion sobre un servidor web desplegado en IIS

{% hint style="info" %}
Para llevar tu aprendizaje al siguiente nivel y practicar estas técnicas de manera segura y efectiva, te invitamos a adquirir acceso premium a nuestro material de curso. No pierdas esta oportunidad de profundizar tus conocimientos. Para más información y adquirir tu acceso, visita nuestro canal de ventas: <https://wa.link/j265a0>. ¡Te esperamos para empezar este viaje juntos!
{% endhint %}

{% hint style="success" %}
**OBJETIVO DEL EJERCICIO #1:**

Comprometer una aplicacion web (`WEBSERVER`) por medio de una inyeccion de comandos.\
Para realizarlo es suficiente tener encendido UNICAMENTE `WEBSERVER` y `First-DC`.
{% endhint %}

Vamos a simular que nos contrataron para realizar un red team sobre AD y hemos logrado localizar la siguiente IP publica: 3.133.16.165

Empezariamos con un escaneo de puertos y servicios:

```bash
=> nmap 3.133.16.165 -sV -Pn
Starting Nmap 7.94 ( https://nmap.org ) at 2023-09-28 21:12 Hora est. PacÝfico, SudamÚrica
Nmap scan report for ec2-3-133-16-165.us-east-2.compute.amazonaws.com (3.133.16.165)
Host is up (0.083s latency).
Not shown: 998 filtered tcp ports (no-response)
PORT     STATE SERVICE       VERSION
80/tcp   open  http          Microsoft IIS httpd 10.0
3389/tcp open  ms-wbt-server Microsoft Terminal Services
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows
```

Vamos a enfocarnos en la siguiente URL: <http://3.133.16.165/>

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

Al acceder podemos determinar la tecnologia que tiene este servidor por medio de Wappalyzer:

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

Teniendo en cuenta que este servidor tiene ASP.NET, vamos a realizar una enumeracion de directorios y archivos:

```bash
gobuster dir -u http://3.133.16.165/ -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -x asp,txt,html,aspx
===============================================================
Gobuster v3.6
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://3.133.16.165/
[+] Method:                  GET
[+] Threads:                 10
[+] Wordlist:                /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt
[+] Negative Status codes:   404
[+] User Agent:              gobuster/3.6
[+] Extensions:              asp,txt,html,aspx
[+] Timeout:                 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
/index.html           (Status: 200) [Size: 332]
/test.aspx            (Status: 200) [Size: 726]
/Index.html           (Status: 200) [Size: 332]
/download.html        (Status: 200) [Size: 332]
/robots.txt           (Status: 200) [Size: 7872]
```

{% hint style="info" %}
Revisa cada contenido desde un navegador web.
{% endhint %}

Despues de encontrar a test.aspx, vamos a revisar su contenido: <http://3.133.16.165/test.aspx>

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

Despues de colocar una IP, se puede apreciar el envio de ping exitoso:<br>

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

Revisamos el codigo fuente:

<figure><img src="/files/7niTBljkOc4tOMis7RJx" alt=""><figcaption></figcaption></figure>


---

# 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://books.spartan-cybersec.com/cpad/introduccion-al-hacking-web/enumeracion-sobre-un-servidor-web-desplegado-en-iis.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.
