Description
Version and Platform (required):
- Binary Ninja Version: 5.1.7363-dev (acd6c39c)
- OS: macOS 15.4.1
- CPU Architecture: arm64
Bug Description:
There is currently no good way for a plug-in to add function activities to run in all Mach-O binaries (without Objective-C, with Objective-C, or that are loaded from the shared cache).
The core.function.objectiveC
and core.function.sharedCache
workflows both clone from core.function.baseAnalysis
so they do not pick up any modifications a plug-in may make to core.function.metaAnalysis
.
Additional Information:
There was some discussion on Slack about this. It sounds like the Objective-C and shared cache plug-ins could themselves modify core.function.metaAnalysis
and make use of view type predicates to ensure their activities run only in their views.
Alternatively the workflows could instead clone core.function.metaAnalysis
. It seems like there'd be an ordering issue there? That is, plug-ins would somehow need to ensure they're loaded and have modified core.function.metaAnalysis
prior to the Objective-C or shared cache plug-ins creating their clones. I'm not sure there's any way to ensure that happens.
For now I work around this by explicitly registering activities in all three workflows. This requires that plug-ins declare an optional dependency on the workflow_objc
and sharedcache
plug-ins so that they are loaded and create their workflows before my plug-in is initialized.
Sadly registering the activity multiple times while using automatic eligibility results in some log spew about the setting name:
[Default error] Setting: bdash.arm64e-pac already registered!
[Default error] Setting: bdash.arm64e-pac already registered!