> For the complete documentation index, see [llms.txt](https://burple.gitbook.io/burple/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://burple.gitbook.io/burple/hackmyvm/facil/alzheimer.md).

# Alzheimer

<figure><img src="/files/81YVzqKXhUHlTDuDE1mB" alt=""><figcaption></figcaption></figure>

## Fase de reconocimiento

### Nmap

Empezamos a escanear los puertos de la máquina y nos encontramos tan solo el puerto 21 (FTP) abierto:

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

Inicio sesión por el FTP como anonymous y encuentro una nota, me la descargo, y veo que su interior nos dice que hagamos un ping a cada uno de los puertos:

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

Hago un curl a cada uno de los puertos y siempre me da la misma respuesta:

<figure><img src="/files/5DH2TzQRPLx8pGnTkf6g" alt=""><figcaption></figcaption></figure>

Paso por cyberchef el codigo morse que vemos pero tan solo encontramos "OTHING":

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

## Fase de intrusión

### Nmap

Hacemos otro escaneo de nmap y descubrimos que los puertos 22 (SSH) y 80 (HTTP) se han abierto:

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

### Gobuster

Haciendo fuzzing con gobuster encontramos 3 directorios:

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

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

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

Ahora voy a hacer más fuzzing con gobuster para ver realmente en cual de los dos directorios se encuentra (/secret):

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

Aquí me he quedado atascado, así que volví al ftp pensando que me había dejado algo y me percato de que la fecha de modificación ha cambiado, PERFECTO, quizás la contraseña de medusa esta adentro y al parecer si...:

<figure><img src="/files/9Hp7qirv9ZEbWLp6sQaa" alt=""><figcaption></figcaption></figure>

## Escalada de privilegios

Iniciamos sesión correctamente por el puerto de SSH y revisamos los permisos SUID:

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

### Linpeas

Me abro un servidor http con python desde mi máquina atacante y importo linpeas.sh, le doy chmod +x y reviso los permisos SUID:

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

Linpeas me indica que tenemos tambien permisos SUID en /capsh, así que vamos a GTFOBins y vemos que se puede explotar, ejecutamos los comandos y obtenemos root:

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

## Conclusión

Está máquina se me ha hecho divertido, y me ha gustado lo del port knocking y que cuando llegamos a el directorio que debíamos, nos da la password por el FTP cosa que no me lo esperaba porque nunca me ha pasado.&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://burple.gitbook.io/burple/hackmyvm/facil/alzheimer.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
