Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2023-38831 PoC — WinRAR 安全漏洞

Source
Associated Vulnerability
Title:WinRAR 安全漏洞 (CVE-2023-38831)
Description:RARLAB WinRAR before 6.23 allows attackers to execute arbitrary code when a user attempts to view a benign file within a ZIP archive. The issue occurs because a ZIP archive may include a benign file (such as an ordinary .JPG file) and also a folder that has the same name as the benign file, and the contents of the folder (which may include executable content) are processed during an attempt to access only the benign file. This was exploited in the wild in April through October 2023.
Readme
# CVE-2023-38831 Exploit Proof-of-Concept

## Overview

This repository contains a Python script that demonstrates a proof-of-concept (PoC) exploit for **CVE-2023-38831**. This exploit leverages a vulnerability in specific file-processing mechanisms to execute a reverse shell payload through a malicious RAR file.

> **Disclaimer:**  
> This project is intended for educational purposes and ethical security research only. Unauthorized use of this code to compromise systems or networks without prior consent is illegal and unethical. The author disclaims all responsibility for misuse.

---

## How It Works

The script automates the creation of a malicious RAR file that exploits the CVE-2023-38831 vulnerability. It embeds a Python reverse shell script into a crafted file structure that executes stealthily.

### Steps Performed:
1. Takes a **bait file** (non-suspicious file) and a **script file** (malicious payload) as input.
2. Creates a structured directory to hide the malicious payload.
3. Embeds a `VBScript` to execute the payload silently.
4. Crafts a RAR archive with manipulated file headers to bypass detection mechanisms.
5. Outputs the final exploit file.

---

## Requirements

- Python 3.6+
- WinRAR or compatible RAR processing software
- Ensure `shutil` and `os` modules are available (these are standard with Python).

---

## Usage

1. Clone this repository:
   ```bash
   git clone https://github.com/yourusername/CVE-2023-38831-POC.git
   cd CVE-2023-38831-POC
   ```

2. Prepare the following files:
   - **Bait file**: Any legitimate file (e.g., a harmless PDF or image).
   - **Script file**: A Python reverse shell or similar payload.

3. Run the script:
   ```bash
   python exploit.py
   ```

4. Provide the required inputs:
   - Name of the bait file.
   - Name of the malicious script.
   - Desired name for the output RAR file.

5. The exploit file will be generated in the current working directory.

---

## Example

```bash
$ python exploit.py
CVE-2023-38831 POC
-------------------------------
Enter the bait file name: document.pdf
Enter the script file name: reverse_shell.py
Enter the output RAR file name: malicious_payload
Exploit generated successfully as 'malicious_payload.rar'.
```

---

## Important Notes

- This script is a **proof of concept** and should be used only in controlled environments with explicit permission from the system owner.
- Avoid distributing or using the generated files outside ethical or educational contexts.
- The exploit relies on known behaviors of RAR processing utilities and may not work in all configurations.

---

## License

This project is licensed under the [MIT License](LICENSE).

---

## Author

- **Kunal Rajour**
- GitHub: [VictotiousKnight](https://github.com/VictotiousKnight)

---

**Reminder:** Misuse of this script can lead to severe legal consequences. Always follow ethical guidelines and obtain proper authorization.

---
File Snapshot

[4.0K] /data/pocs/375b860726930de0616b294911ddb85b08009b90 ├── [2.4K] exploit.py ├── [2.0K] listener.py ├── [2.9K] README.md ├── [ 0] scholarship.pdf └── [2.5K] shell.py 0 directories, 5 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →