
Prueba de concepto (POC) de la vulnerabilidad Zero-Day CVE-2023-38831 en WinRAR
RARLabs WinRAR anterior a 6.23 permite a los atacantes ejecutar código arbitrario cuando un usuario intenta ver un archivo benigno dentro de un archivo ZIP. El problema ocurre porque un archivo ZIP puede incluir un archivo benigno (como un archivo .JPG ordinario) y también una carpeta que tiene el mismo nombre que el archivo benigno, y el contenido de la carpeta (que puede incluir contenido ejecutable) se procesa durante un intento de acceder solo al archivo benigno. Esta vulnerabilidad fue explotada activamente entre abril y agosto de 2023.
Uso:
- poc.py [-h] scriptPath benignPath zipDirectory fname
Argumentos posicionales:
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)
Opciones:
-h, --help show this help message and exit
benign/bait file (e.g. sample.png) y el malicious script (e.g. script.bat)python3 poc.py script.bat sample.PNG PoC sample.png para generar el exploit en .zipBenign file (i.e. sample.png) como se muestra en la demo.