# MAQUINA DRAGON (Brute Force Password - PrivEsc /usr/bin/vim)

Se enumero los puertos abiertos dentro de la maquina, nmap a cada puerto le realiza un escaneo usando una serie de scripts propios de la herramienta, también devuelve las versiones que están corriendo en tales servicios.

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

Dentro de web se detecto unos comentarios interesantes.

Uno de ellos posiblemente sea un usuario.

Por ultimo use patator para verificar si este usuario contiene una password débil.

Cabe destacar que se hizo un reconocimiento previo a esta sección, entre ellos el fuzzing web, inspección de fuentes, etc.

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

Finalizado las pruebas mediante fuerza bruta se logro identificar la password.

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

Dentro de la maquina se realiza una inspeccion manual del entrono linux.

Para escalar privilegios el comando sudo -l proporciono un binario el cual en la web gtfobins se puede ver un comando para realizar tal accion.

<figure><img src="/files/8sTDyY3aXWmawDFwHhJA" alt=""><figcaption></figcaption></figure>

{% embed url="<https://gtfobins.github.io/gtfobins/vim/#sudo>" %}

Al ejecutar lo indicado se logro acceder como root.


---

# 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://1gnotus.gitbook.io/ignotus_pwn/thehacklabs/writeups/maquina-dragon-brute-force-password-privesc-usr-bin-vim.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.
