mySIMBL
原理解析
参考:[macOS笔记]Mac增强插件——SIMBL
- mySIMBL主要用于GUI管理Plugin,依赖SIMBLManager.framework
- SIMBLManager.framework:通过STPrivilegedTask
₁
执行root操作
- AGENT_install:安装SIMBLAgent.app的API
- OSAX_install:安装SIMBL.osax的API
- AMFI_toggle:开关AMFI的API
- SIP_bypass:绕过SIP的API
- SIMBLAgent.app
- 配置SIMBLAgent.app为Launch Agent,登录启动
- 启动监听Carbon应用事件kEventAppLaunched
₂
- 解析inEvent的kEventParamProcessID,获取APP的进程pid
- 通过Scripting Bridge向APP进程,发送SIMeload的AppleEvent
- SIMBL.osax
- 拦截SIMeload的AppleEvent
- 加载Plugin
- STPrivilegedTask:github.com/sveinbjornt…
- 参考chunkwm的实现,most Carbon APIs were considered deprecated
MacForge
Initial commit:
github.com/MacEnhance/…
- MacPlus主要用于GUI管理Plugin,依赖mach_inject_bundle_stub
- mach_inject_bundle_stub依赖mach_inject_bundle
- mach_inject_bundle依赖mach_inject
- 使用
mach_inject ₁
注入进程
- mach_inject:github.com/rentzsch/ma…
1.2.0-1
github.com/MacEnhance/…
- MacForge主要用于GUI管理Plugin,依赖MacForgeInjection
- MacForgeInjection使用UniversalInj注入进程