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:WinRAR是一款文件压缩器。该产品支持RAR、ZIP等格式文件的压缩和解压等。 RARLabs WinRAR 6.23之前版本存在安全漏洞。攻击者利用该漏洞可以执行任意代码。
Readme
<h1 style="font-size:10vw" align="left">CVE-2023-38831 - RARLAB WinRAR Code Execution Vulnerability</h1>


<img src="https://img.shields.io/badge/CVSS:3.1%20Score%20-7.8 HIGH-red"> [![Python](https://img.shields.io/badge/Python-%E2%89%A5%203.11-blueviolet.svg)](https://www.python.org/) <img src="https://img.shields.io/badge/Antivirus%20Bypassed-%E2%89%A5%20Yes-blue">
<img src="https://img.shields.io/badge/Maintained%3F-Yes-96c40f">


******
⚠️ *For educational and authorized security research purposes only*


## Original Exploit Authors
Very grateful to the original PoC author [b1tg](https://github.com/b1tg) and [Group-IB Threat Intelligence](https://www.group-ib.com/blog/cve-2023-38831-winrar-zero-day/)


## Description
RARLabs WinRAR before 6.23 allows attackers to execute arbitrary code when a user attempts to view a benign file within a ZIP archive. 

![gambar](https://github.com/asepsaepdin/CVE-2023-38831/assets/122620685/aa3edfa5-3cf4-4b0d-a87e-4f1534470bf6)

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 August 2023.


## Demo
![winrar](https://github.com/asepsaepdin/CVE-2023-38831/assets/122620685/e3da1ade-7044-41dc-b7c9-9e7ae519cee7)


******
## Step Guides
1. First, modify the script.bat file with your dangerous execution code
2. Insert the bait file, is recommended to be an image (.png, jpg) or a document (.pdf)
3. Run the command to generate exploit file
   
    ```bash
    python cve-2023-38831-exp-gen.py CLASSIFIED_DOCUMENTS.pdf script.bat  poc.rar
    ```
    
5. Send the exploit file to the target machine using python http.server, for example:
   
    ```bash
    python -m http.server
    ```
    
5. Set Up the Listener on your attacker machine:
   
    ```bash
    nc -nlvp 4444
    ```
    
6. Download and open exploit file with WinRAR before 6.23 version


******
## Credits
- https://github.com/b1tg/CVE-2023-38831-winrar-exploit
- https://nvd.nist.gov/vuln/detail/CVE-2023-38831
- https://www.group-ib.com/blog/cve-2023-38831-winrar-zero-day/
File Snapshot

[4.0K] /data/pocs/9b5930bc81d4a574e5ac00fec43fe39e08228a54 ├── [180K] CLASSIFIED_DOCUMENTS.pdf ├── [1.5K] cve-2023-38831-exp-gen.py ├── [ 44K] nc64.exe ├── [2.2K] README.md └── [ 124] script.bat 0 directories, 5 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.