POC详情: 6239d07172e7891697edc86083d906855a7068f2

来源
关联漏洞
标题: Apple macOS Big Sur 安全特征问题漏洞 (CVE-2022-26726)
描述:Apple macOS Big Sur是美国苹果(Apple)公司的macOS Big Sur是苹果公司用于MAC操作系统macOS的第17个主要版本。 Apple macOS Big Sur 组件存在安全特征问题漏洞,攻击者利用该漏洞可以捕获用户的屏幕。以下产品及版本受到影响:macOS Big Sur 11.6.6。
描述
TCC Bypass
介绍
# CVE-2022-26726

## Affected Versions
As a student, I have limited access to devices in which I can test this vulnerability. The versions I have tested so far are `MacOS 12.3.1`, `MacOS 12.3`, `MacOS 12.0`, `MacOS 10.15.7`, and `MacOS 11.6.1`. The vulnerability works on all the versions tested on.

## So what is the bug?
Impact: A malicious application may be able to bypass certain Privacy preferences

Description: When an executable is deleted while running, the process is able to bypass restrictions for Screen Recording as well as certain accessibility settings, namely keystroke injection (using metasploit).

Possible reasons: macOS cannot find the permissions of the parent executable of the process and thus does not prevent screen recording. However, it is confusing that the camera and mic are still properly restricted.

Details: 
- `tccutil reset All` results in a permission prompt being shown -- Accessing camera or mic also results in permission prompt being shown. 
-  The retrieved screenshot includes all visible windows

## Prerequisites
It works on a fresh installation of macOS.

## POC
Running the POC from `src/POC.sh` will produce a screenshot without TCC prompt and includes all windows visible to the user. The script must occasionally be run multiple times (max 3) for a screenshot to be produced.

## History and additional functions
This exploit was first discovered by me when experimenting with Metasploit's web delivery. I found that by deleting the dropped executable immediately after a meterpreter shell opens, the shell gains capabilities which are normally locked behind a TCC prompt. This vulnerability also allows an attacker to inject keystrokes. However, I am not an Objective-C developer and thus have not been able to create my own POC. This effect can still be achieved through Metasploit.

## Source code and credits
`src/POC.sh` -- Shell script: Copies `screenshot`, executes it, and deletes it while it is running.

`src/screenshot` -- Mach-O executable: Takes a screenshot and saves it to `src/screenshot.png`. Compiled from `src/screenshot.m`.

`src/screenshot.m` -- Credits to *theevilbit* for the basic code. The only modification I made was to add a 3 second sleep before the screenshot to allow for enough time to delete the executable before the screenshot is taken.
文件快照

[4.0K] /data/pocs/6239d07172e7891697edc86083d906855a7068f2 ├── [2.3K] README.md └── [4.0K] src ├── [ 94] POC.sh ├── [ 49K] screenshot └── [ 665] screenshot.m 1 directory, 4 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。