Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2019-8561 PoC — Apple macOS Mojave PackageKit组件输入验证错误漏洞

Source
Associated Vulnerability
Title:Apple macOS Mojave PackageKit组件输入验证错误漏洞 (CVE-2019-8561)
Description:A logic issue was addressed with improved validation. This issue is fixed in macOS Mojave 10.14.4. A malicious application may be able to elevate privileges.
Description
Proof of concept exploit for CVE-2019-8561 discovered by @jbradley89 
Readme
# CVE-2019-8561

Proof of concept exploit for CVE-2019-8561 discovered by Jaron Bradley ([@jbradley89](https://twitter.com/jbradley89))  (Patched in macOS 10.14.4). This script exploits a TOCTOU bug in `installer` which enables code execution as root.

See Jaron's Objective By the Sea v2 talk "[Bad Things in Small Packages](https://www.youtube.com/watch?v=5nOxznrOK48)" where he demonstrates getting r00t and bypassing SIP.

(**N.B All scripts other than `gpg_poc` are half finished and likely don't work in their current state. Published for sake of completeness**)

My accompanying blog post "[CVE-2019-8561 Proof of Concept Exploit](https://0xmachos.com/2021-04-30-CVE-2019-8561-PoC/)".

# [gpg_poc](https://github.com/0xmachos/CVE-2019-8561/blob/master/gpg_poc)

Monitors`$HOME/Downloads` for a GPG Suite DMG. When it finds one it converts the DMG from read only to RW then resizes it to 60MB. 

Once the installer starts it expands the package, modifies the `preinstall` script to create `/var/test` via `touch` then flattens it in place of the original package. 

The modified package contents will be used by installer however the UI will still indicate that the package is correctly code signed.

Tested on:
* 10.14.2

File Snapshot

[4.0K] /data/pocs/6df0f7a7502d961ef81d2819aba104de01eee911 ├── [2.0K] gpg_poc ├── [ 25M] GPG_Suite-2018.5.dmg ├── [1.0K] LICENSE ├── [3.0M] OBTS_v2_Bradley.pdf ├── [6.5M] ProVideoFormats.dmg ├── [1.2K] README.md ├── [1.5K] root_exploit └── [2.1K] sip_poc 0 directories, 8 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →