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

# Lower7

## Enumeración

Se comienza identificando la máquina y su dirección IP.

<div align="left"><img src="/files/KtAFUmi76IHnYJnRQzS7" alt=""></div>

Se realiza un escaneo con nmap donde se identifican los siguientes servicios:

* FTP (21)
* HTTP (3000)

![](/files/7WHbFBtuROH2ixI2St3y)

Se intenta acceso anónimo por FTP, pero no es posible, No obstante, se identifica la existencia de un usuario válido en el sistema: a.clark.

<div align="left"><img src="/files/qouFjfxceoI9f1Au1Q6b" alt=""></div>

***

## Acceso inicial

Se realiza un ataque de fuerza bruta contra el servicio FTP, obteniendo credenciales válidas para el usuario:

* Usuario: a.clark
* Contraseña: descubierta mediante ataque ( dragon )

![](/files/xZejA7bap2OpakJhfXSm)

***

## Explotación

Se prepara un archivo JavaScript malicioso para obtener una reverse shell.

<div align="left"><img src="/files/I4njqvgRLNTcz63PFseA" alt=""></div>

Se sube el archivo al servidor mediante FTP:

<div align="left"><img src="/files/7hvCi86MouV6vptGRkYP" alt=""></div>

Al ejecutarse, se recibe una conexión en el listener:

<div align="left"><img src="/files/YWvrmiyh4DMFszQc6VuX" alt=""></div>

***

## Post-Explotación

Se mejora la shell obtenida:

```bash
script -c bash /dev/null
stty raw -echo; fg
reset xterm
```

<div align="left"><img src="/files/5BPzSRE3oPui4T62rnTm" alt=""></div>

Se exportan variables necesarias para estabilizar la shell:

```bash
export TERM=xterm
export SHELL=bash
```

***

## Escalada de privilegios

Se enumeran los permisos del sistema y se observa que el usuario pertenece al grupo `shadow`, lo que permite acceder al archivo `/etc/shadow`.

![](/files/eMMdfMYz507jDHdvouiz)

Se extrae el hash de root.

***

## Cracking de contraseña

Se identifica el formato del hash (`$y$`) y se procede a crackearlo con `john`.

![](/files/66MD9aHND70EGa3FkR7f)

Se obtiene la contraseña en texto plano.

***

## Acceso root

Finalmente, se accede como root utilizando la contraseña obtenida:

<div align="left"><img src="/files/nsV5P5bWbRBnqgEDGlyS" alt=""></div>

***

## Conclusión

Esta máquina demuestra:

* Importancia de proteger servicios FTP
* Riesgos de credenciales débiles
* Peligro de permisos mal configurados
* Exposición de hashes críticos

***

## Recomendaciones

* Deshabilitar acceso FTP inseguro
* Usar contraseñas robustas
* Restringir acceso a `/etc/shadow`
* Revisar permisos de usuarios y grupos


---

# 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://itskode.gitbook.io/pentesting/vulnyx/muy_facil/lower7.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.
