diff --git a/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-fs-tricks/README.md b/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-fs-tricks/README.md index 265bb4dbe..19f63e0d2 100644 --- a/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-fs-tricks/README.md +++ b/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-fs-tricks/README.md @@ -17,7 +17,9 @@ Permissions in a **directory**: * **read** - you can **enumerate** the directory entries -* **write** - you can **delete/write** files to the directory +* **write** - you can **delete/write** **files** in the directory and you can **delete empty folders**. + * But you **cannot delete/modify non-empty folders** unless you have write permissions over it. + * You **cannot modify the name of a folder** unless you own it. * **execute** - you are **allowed to traverse** the directory - if you don’t have this right, you can’t access any files inside it, or in any subdirectories. ### Dangerous Combinations diff --git a/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-tcc/README.md b/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-tcc/README.md index de5f8642c..ce1a9e40d 100644 --- a/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-tcc/README.md +++ b/macos-hardening/macos-security-and-privilege-escalation/macos-security-protections/macos-tcc/README.md @@ -350,7 +350,7 @@ INSERT INTO access ( -### Automation to FDA\* +### Automation (Finder) to FDA\* The TCC name of the Automation permission is: **`kTCCServiceAppleEvents`**\ This specific TCC permission also indicates the **application that can be managed** inside the TCC database (so the permissions doesn't allow just to manage everything). @@ -440,7 +440,52 @@ EOD Same happens with **Script Editor app,** it can control Finder, but using an AppleScript you cannot force it to execute a script. -### Automation + Accessibility (**`kTCCServicePostEvent`)** to FDA\* +### Automation (SE) to some TCC + +System Events can create Folder Actions, and Folder actions can access some TCC folders, so a script like the following one can be used to abuse this behavour: + +```bash +# Create script to execute with the action +cat > "/tmp/script.js" <