# Hommie

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

## Fase de reconocimiento

### Nmap

Primero empezamos con un escaneo de nmap para revelar los puertos expuestos:

* 21 FTP
* 22 SSH
* 80 HTTP

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

### Gobuster ❌

En la web encuentro lo siguiente (No encuentro nada en el código fuente), hago fuzzing también pero no encuentro nada:

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

En el FTP veo que podemos iniciar sesión como anónimo y subir archivos en la carpeta .web, los que hay alojados no contienen nada interesante:

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

## Fase de intrusión

### Webshell ❌

He intentado subir una webshell pero no funciona...&#x20;

### Nmap

He pensado que quizas hay algun puerto UDP que no hayamos detectado con nmap antes, así que vuelvo a hacer otro escaneo de nmap pero esta vez enfocado en los puertos UDP y hay 2 abiertos que me llaman la atención

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

Iniciamos sesión en tftp y nos descargamos la id\_rsa de la cual antes nos habían dicho en la web que era de alexia:

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

## Escalada de privilegios

Inicio sesión en SSH como alexia con la id\_rsa y encuentro en el /opt algo bastante relevante:

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

### $PATH Hijacking

Lo corro y veo que lo unico que hace es enseñarme la key que ya tenemos, hago un strings para ver cadenas de texto legible del binario y hace un cat... Se me ocurre un PATH Hijacking ya que el esta llamando a cat, pero si añadimos un "cat" a nuestro PATH le podríamos engañar para que ejecutara comandos de un archivo:

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

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

La flag de root esta escondida pero con find la encontramos rápidamente:

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

## Conclusión

Ha sido una máquina que ha estado bien para refrescar conceptos como el escaneo de puertos UDP o el Path Hijacking, muy chula!


---

# 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://burple.gitbook.io/burple/hackmyvm/facil/hommie.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.
