mirror of
https://github.com/carlospolop/hacktricks
synced 2025-02-16 14:08:26 +00:00
GITBOOK-4123: change request with no subject merged in GitBook
This commit is contained in:
parent
45b3e7d6e6
commit
327e4e05f1
3 changed files with 13 additions and 2 deletions
BIN
.gitbook/assets/image (710).png
Normal file
BIN
.gitbook/assets/image (710).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 169 KiB |
|
@ -319,6 +319,13 @@ ktrace trace -s -S -t c -c ls | grep "ls("
|
|||
|
||||
[**ProcessMonitor**](https://objective-see.com/products/utilities.html#ProcessMonitor) is a very useful tool to check the process related actions a process is performing (for example, monitor which new processes a process is creating).
|
||||
|
||||
### SpriteTree
|
||||
|
||||
[**SpriteTree**](https://themittenmac.com/tools/) is a tool to prints the relations between processes.\
|
||||
You need to monitor your mac with a command like **`sudo eslogger fork exec rename create > cap.json`** (the terminal launching this required FDA). And then you can load the json in this tool to viwe all the relations:
|
||||
|
||||
<figure><img src="../../../.gitbook/assets/image (710).png" alt="" width="375"><figcaption></figcaption></figure>
|
||||
|
||||
### FileMonitor
|
||||
|
||||
[**FileMonitor**](https://objective-see.com/products/utilities.html#FileMonitor) allows to monitor file events (such as creation, modifications, and deletions) providing detailed information about such events.
|
||||
|
|
|
@ -27,9 +27,13 @@ Finally, the sandbox will be activated will a call to **`__sandbox_ms`** which w
|
|||
|
||||
### Bypassing quarantine attribute
|
||||
|
||||
**Files created by sandboxed processes** are appended the **quarantine attribute** to prevent sandbox escaped. However, if you manage to **create an `.app` bundle without the quarantine attribute** within a sandboxed application, you could make the app bundle binary point to **`/bin/bash`** and add some env variables in the **plist** to abuse launchctl to **launch the new app unsandboxed**.
|
||||
**Files created by sandboxed processes** are appended the **quarantine attribute** to prevent sandbox escaped. However, if you manage to **create an `.app` folder without the quarantine attribute** within a sandboxed application, you could make the app bundle binary point to **`/bin/bash`** and add some env variables in the **plist** to abuse **`open`** to **launch the new app unsandboxed**.
|
||||
|
||||
This is what was done in [**CVE-2023-32364**](https://gergelykalman.com/CVE-2023-32364-a-macOS-sandbox-escape-by-mounting.html)
|
||||
This is what was done in [**CVE-2023-32364**](https://gergelykalman.com/CVE-2023-32364-a-macOS-sandbox-escape-by-mounting.html)**.**
|
||||
|
||||
{% hint style="danger" %}
|
||||
Therefore, at the moment, if you are just capable of creating a folder with a name ending in **`.app`** without a quarantine attribute, you can scape the sandbox because macOS only **checks** the **quarantine** attribute in the **`.app` folder** and in the **main executable** (and we will point the main executable to **`/bin/bash`**).
|
||||
{% endhint %}
|
||||
|
||||
### Abusing Open functionality
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue