Substrate unloader
4 views
1c8fecc3...
Description
Keep MobileSubstrate from injecting an iOS app (to be used with -f to take advantage of early instrumentation)
How to Use
Download the script and run it with Frida CLI:
Download ScriptThen run with Frida:
frida -U -f YOUR_PACKAGE_NAME -l substrate-unloader.js
Replace YOUR_PACKAGE_NAME with the target app's package name.
Source Code
JavaScript
var dlopen = new NativeFunction(
Module.findExportByName(null, 'dlopen'),
'pointer', ['pointer', 'int']);
Interceptor.replace(dlopen, new NativeCallback(function(path, mode) {
var name = Memory.readUtf8String(path);
if (name !== null && name.indexOf('SubstrateLoader') !== -1) {
return NULL;
}
return dlopen(path, mode);
}, 'pointer', ['pointer', 'int']));
Comments