diff --git a/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/default/jailbreak_bypass.js b/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/default/jailbreak_bypass.js index b644ed02b4..f694a61793 100644 --- a/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/default/jailbreak_bypass.js +++ b/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/default/jailbreak_bypass.js @@ -1,90 +1,89 @@ -function bypassJailbreakDetection(){ - - var paths = [ - "/Applications/blackra1n.app", - "/Applications/Cydia.app", - "/Applications/FakeCarrier.app", - "/Applications/Icy.app", - "/Applications/IntelliScreen.app", - "/Applications/MxTube.app", - "/Applications/RockApp.app", - "/Applications/SBSetttings.app", - "/Applications/WinterBoard.app", - "/bin/bash", - "/bin/sh", - "/bin/su", - "/etc/apt", - "/etc/ssh/sshd_config", - "/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist", - "/Library/MobileSubstrate/DynamicLibraries/Veency.plist", - "/Library/MobileSubstrate/MobileSubstrate.dylib", - "/pguntether", - "/private/var/lib/cydia", - "/private/var/mobile/Library/SBSettings/Themes", - "/private/var/stash", - "/private/var/tmp/cydia.log", - "/System/Library/LaunchDaemons/com.ikey.bbot.plist", - "/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist", - "/usr/bin/cycript", - "/usr/bin/ssh", - "/usr/bin/sshd", - "/usr/libexec/sftp-server", - "/usr/libexec/ssh-keysign", - "/usr/sbin/frida-server", - "/usr/sbin/sshd", - "/var/cache/apt", - "/var/lib/cydia", - "/var/log/syslog", - "/var/mobile/Media/.evasi0n7_installed", - "/var/tmp/cydia.log", - "/etc/apt", - "/Library/MobileSubstrate/MobileSubstrate.dylib", - "/Applications/Cydia.app", - "/Applications/blackra1n.app", - "/Applications/FakeCarrier.app", - "/Applications/Icy.app", - "/Applications/IntelliScreen.app", - "/Applications/MxTube.app", - "/Applications/RockApp.app", - "/Applications/SBSetttings.app", - "/private/var/lib/apt/", - "/Applications/WinterBoard.app", - "/usr/sbin/sshd", - "/private/var/tmp/cydia.log", - "/usr/binsshd", - "/usr/libexec/sftp-server", - "/Systetem/Library/LaunchDaemons/com.ikey.bbot.plist", - "/System/Library/LaunchDaemons/com.saurik.Cy@dia.Startup.plist", - "/var/log/syslog", - "/bin/bash", - "/bin/sh", - "/etc/ssh/sshd_config", - "/usr/libexec/ssh-keysign", - "/Library/MobileSubstrate/DynamicLibraries/Veency.plist", - "/System/Library/LaunchDaemons/com.ikey.bbot.plist", - "/private/var/stash", - "/usr/bin/cycript", - "/usr/bin/ssh", - "/usr/bin/sshd", - "/var/cache/apt", - "/var/lib/cydia", - "/var/tmp/cydia.log", - "/Applications/SBSettings.app", - "/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist", - "/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist", - "/private/var/lib/apt", - "/private/var/lib/cydia", - "/private/var/mobile/Library/SBSettings/Themes", - "/var/lib/apt", - "/private/jailbreak.txt", - "/bin/su", - "/pguntether", - "/usr/sbin/frida-server", - "/private/Jailbreaktest.txt", - "/var/mobile/Media/.evasi0n7_installed", - "cydia://package/com.example.package" - ]; +var paths = [ + "/Applications/blackra1n.app", + "/Applications/Cydia.app", + "/Applications/FakeCarrier.app", + "/Applications/Icy.app", + "/Applications/IntelliScreen.app", + "/Applications/MxTube.app", + "/Applications/RockApp.app", + "/Applications/SBSetttings.app", + "/Applications/WinterBoard.app", + "/bin/bash", + "/bin/sh", + "/bin/su", + "/etc/apt", + "/etc/ssh/sshd_config", + "/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist", + "/Library/MobileSubstrate/DynamicLibraries/Veency.plist", + "/Library/MobileSubstrate/MobileSubstrate.dylib", + "/pguntether", + "/private/var/lib/cydia", + "/private/var/mobile/Library/SBSettings/Themes", + "/private/var/stash", + "/private/var/tmp/cydia.log", + "/System/Library/LaunchDaemons/com.ikey.bbot.plist", + "/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist", + "/usr/bin/cycript", + "/usr/bin/ssh", + "/usr/bin/sshd", + "/usr/libexec/sftp-server", + "/usr/libexec/ssh-keysign", + "/usr/sbin/frida-server", + "/usr/sbin/sshd", + "/var/cache/apt", + "/var/lib/cydia", + "/var/log/syslog", + "/var/mobile/Media/.evasi0n7_installed", + "/var/tmp/cydia.log", + "/etc/apt", + "/Library/MobileSubstrate/MobileSubstrate.dylib", + "/Applications/Cydia.app", + "/Applications/blackra1n.app", + "/Applications/FakeCarrier.app", + "/Applications/Icy.app", + "/Applications/IntelliScreen.app", + "/Applications/MxTube.app", + "/Applications/RockApp.app", + "/Applications/SBSetttings.app", + "/private/var/lib/apt/", + "/Applications/WinterBoard.app", + "/usr/sbin/sshd", + "/private/var/tmp/cydia.log", + "/usr/binsshd", + "/usr/libexec/sftp-server", + "/Systetem/Library/LaunchDaemons/com.ikey.bbot.plist", + "/System/Library/LaunchDaemons/com.saurik.Cy@dia.Startup.plist", + "/var/log/syslog", + "/bin/bash", + "/bin/sh", + "/etc/ssh/sshd_config", + "/usr/libexec/ssh-keysign", + "/Library/MobileSubstrate/DynamicLibraries/Veency.plist", + "/System/Library/LaunchDaemons/com.ikey.bbot.plist", + "/private/var/stash", + "/usr/bin/cycript", + "/usr/bin/ssh", + "/usr/bin/sshd", + "/var/cache/apt", + "/var/lib/cydia", + "/var/tmp/cydia.log", + "/Applications/SBSettings.app", + "/Library/MobileSubstrate/DynamicLibraries/LiveClock.plist", + "/System/Library/LaunchDaemons/com.saurik.Cydia.Startup.plist", + "/private/var/lib/apt", + "/private/var/lib/cydia", + "/private/var/mobile/Library/SBSettings/Themes", + "/var/lib/apt", + "/private/jailbreak.txt", + "/bin/su", + "/pguntether", + "/usr/sbin/frida-server", + "/private/Jailbreaktest.txt", + "/var/mobile/Media/.evasi0n7_installed", + "cydia://package/com.example.package" +]; +function bypassJailbreakDetection(){ try { var f = Module.findExportByName("libSystem.B.dylib", "stat64"); @@ -196,20 +195,21 @@ function bypassJailbreakDetection2() { }, onComplete: function() {} }); - send("[Jailbreak Detection Bypass 2] success"); + send("[Jailbreak Detection Bypass] success"); } catch(e) { - send('[Jailbreak Detection Bypass 2] script error:' + e.toString()); + send('[Jailbreak Detection Bypass] script error:' + e.toString()); } } try { if (ObjC.available) { + send('Bypassing Jailbreak detection checks'); bypassJailbreakDetection(); // Disable the below if the app is crashing setTimeout(() => { bypassJailbreakDetection2(); - }, "1000"); + }, 1000); } else { send('[Jailbreak Detection Bypass] error: Objective-C Runtime is not available!'); } diff --git a/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/data-dir.js b/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/data-dir.js index 2e118f8e6e..d279b7ddde 100644 --- a/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/data-dir.js +++ b/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/data-dir.js @@ -61,7 +61,7 @@ send('Dumping Application Directory file information'); try { setTimeout(() => { send(JSON.stringify({'[MBSFDUMP] datadir': getDataProtectionKeysForAllPaths()})); - }, "2000"); + }, '2000'); } catch(err) {} // /******************************************************************************** diff --git a/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/nslog.js b/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/nslog.js index 60ef1c5325..ed49f71bef 100644 --- a/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/nslog.js +++ b/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/nslog.js @@ -26,8 +26,13 @@ function NSLogv(){ } try { - NSlog(); + setTimeout(() => { + NSlog(); + }, 1000); + } catch(err) {} try { - NSLogv(); + setTimeout(() => { + NSLogv(); + }, 1000); } catch(err) {} \ No newline at end of file diff --git a/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/nsuserdefaults.js b/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/nsuserdefaults.js index 1853e5a0c9..23e16a8f9b 100644 --- a/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/nsuserdefaults.js +++ b/mobsf/DynamicAnalyzer/tools/frida_scripts/ios/dump/nsuserdefaults.js @@ -30,6 +30,6 @@ function ns_userdefaults() { try{ setTimeout(() => { ns_userdefaults(); - }, "2000"); + }, 2000); } catch(err) {} \ No newline at end of file