mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-11 22:50:09 +00:00
Enables dynamic analysis on real jailbroken iOS devices connected via USB or WiFi SSH, complementing the existing Corellium-based iOS analysis.
- SSH connectivity — connects to jailbroken devices over USB (via iproxy port forwarding) or WiFi using Paramiko SSH
- Frida instrumentation — spawns/attaches Frida on-device, with full hook support matching the existing Corellium flow
- Environment setup — installs AppSync Unified and Frida server on first run; supports both arm and arm64 devices
- Dynamic analysis — app file extraction, system log streaming (oslog), screenshot capture, process listing, and report generation
- SSH terminal — execute shell commands on the device over SSH
---------
Co-authored-by: CylentSec <[email protected]>
Co-authored-by: Oz <[email protected]>
52 lines
1.8 KiB
JavaScript
52 lines
1.8 KiB
JavaScript
/*
|
|
* raptor_frida_android_*.js - Frida snippets for Android
|
|
* Copyright (c) 2017 Marco Ivaldi <[email protected]>
|
|
* Modified to support Frida 17.0.0+
|
|
*/
|
|
Java.perform(function () {
|
|
try {
|
|
// Get the libc module and the 'open' function export
|
|
const libc = Process.getModuleByName("libc.so");
|
|
const openPtr = libc.getExportByName("open");
|
|
|
|
// Attach interceptor to libc open()
|
|
Interceptor.attach(openPtr, {
|
|
onEnter: function (args) {
|
|
this.flag = false;
|
|
|
|
try {
|
|
// Read filename argument safely
|
|
const filename = args[0].readCString();
|
|
|
|
// Uncomment and adjust filtering logic as needed
|
|
// if (filename.indexOf("XYZ") === -1 && filename.indexOf("ZYX") === -1) return;
|
|
// if (filename.indexOf("my.interesting.file") !== -1)
|
|
|
|
this.flag = true;
|
|
|
|
if (this.flag) {
|
|
send("\n[open] file name: " + filename);
|
|
|
|
// Print backtrace
|
|
const backtrace = Thread.backtrace(this.context, Backtracer.ACCURATE)
|
|
.map(DebugSymbol.fromAddress)
|
|
.join("\n");
|
|
send("\nBacktrace:\n" + backtrace);
|
|
}
|
|
} catch (e) {
|
|
send("[!] Error in onEnter: " + e);
|
|
}
|
|
},
|
|
onLeave: function (retval) {
|
|
if (this.flag) {
|
|
send("[open] retval: " + retval);
|
|
}
|
|
}
|
|
});
|
|
|
|
send("[+] Hook installed on libc open()");
|
|
} catch (e) {
|
|
send("[-] Error hooking libc open: " + e);
|
|
}
|
|
});
|