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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2018-20250 PoC — WinRar 路径遍历漏洞

Source
Associated Vulnerability
Title:WinRar 路径遍历漏洞 (CVE-2018-20250)
Description:WinRAR是一款文件压缩器。该产品支持RAR、ZIP等格式文件的压缩和解压等。 WinRar中存在目录遍历漏洞。该漏洞源于WinRAR在解压处理ACE格式的文件过程中,未对ACE文件头结构中的“filename”字段进行充分过滤。攻击者可利用该漏洞以提升的权限执行任意代码。
Description
Python tool exploiting CVE-2018-20250 found by CheckPoint folks
Readme
# ezwinrar
Python tool exploiting CVE-2018-20250 found by CheckPoint folks : https://research.checkpoint.com/extracting-code-execution-from-winrar/
> By crafting the filename field of the ACE format, the destination folder (extraction folder) is ignored, and the relative path in the filename field becomes an absolute Path. This logical bug, allows the extraction of a file to an arbitrary location which is effectively code execution.

### Usage:

`python3 ezwinrar.py /path/to/winace.exe` (default is `C:\Program File (x86)\WinAce\winace.exe`)

(1) User's startup folder:  
Since it is not possible to guess the name of the victime in advance (else use 3), the path will be like `..\Appdata\Roaming\Microsoft\Windows\Start Menu\Programs\Startup`   

(2) System startup folder:  
File will be in `C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp`. System privileges are required.

(3) Custom local location  

(4) SMB location [not implemented yet]  
File Snapshot

[4.0K] /data/pocs/c3dd5e9a4aab2b551870d611f284531c9bbbbedf ├── [5.9K] ezwinrar.py ├── [ 34K] LICENSE ├── [ 964] README.md └── [3.9M] wace269i.exe 0 directories, 4 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.