Files
Mobile-Security-Framework-M…/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/others/helper-backtrace.js
T
Ajin Abraham 361e76a390 [HOTFIX] Android script loading, frida injected code view, paramiko SSH issues (#2300)
* Android script loading bug fix
* Frida injected code view
* Paramiko SSH reactor to address some host key issues, revert from warning to autoadd.
* Frida Injection refactoring
2023-12-05 21:22:26 -08:00

16 lines
548 B
JavaScript

// Get caller of the function using backtrace
// From: https://node-security.com/posts/frida-for-ios/
function getBacktrace(){
send('Get the caller of the function using backtrace');
Interceptor.attach(ObjC.classes.NSFileManager['- fileExistsAtPath:'].implementation, {
onEnter: function (args) {
const backtrace = Thread.backtrace(this.context, Backtracer.ACCURATE).map(DebugSymbol.fromAddress).join("\n");
console.log(backtrace + "\n");
console.log(ObjC.Object(args[2]).toString());
}
});
}
try {
getBacktrace();
} catch(err) {}