
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) をダブルクリックします。