TCC bypass (dylib injection)

DYLD_INSERT_LIBRARIES=/tmp/inject.dylib /Applications/Terminal.app/Contents/MacOS/Terminal

Injects a dynamic library (dylib) into an app with broad TCC permissions (Terminal, iTerm) to inherit its access to protected data (folders, camera, contacts, history) without the user approving anything.

When you have code execution on macOS and want to access TCC-protected data without going through permission dialogs. By injecting the dylib into an app that already has TCC approval (e.g., the user already gave Terminal access to the Desktop folder), your code runs with that app's TCC identity.

If SIP is active and the app is signed with library validation (most Apple and App Store apps), the injection is rejected: you need to disable validation (codesign -f -s -) or sign your dylib, which already breaks the app's signature. On macOS 11+ with full SIP, this classic vector loses much ground.