From 185e91f62d3a0e800d58c6d4014a98f7c3d99e40 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Tue, 16 Jul 2024 18:18:29 +0200 Subject: [PATCH] Add a script to disable iOS jailbreak detection (WIP) --- ios/ios-disable-detection.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ios/ios-disable-detection.js diff --git a/ios/ios-disable-detection.js b/ios/ios-disable-detection.js new file mode 100644 index 0000000..774f8f0 --- /dev/null +++ b/ios/ios-disable-detection.js @@ -0,0 +1,31 @@ +/************************************************************************************************** + * + * Some iOS apps attempt to detect jailbroken devices and similar. This script disables these + * detections to ensure you can freely manage your device and modify your apps. + * + * Source available at https://github.com/httptoolkit/frida-interception-and-unpinning/ + * SPDX-License-Identifier: AGPL-3.0-or-later + * SPDX-FileCopyrightText: Tim Perry + * + *************************************************************************************************/ + +if (ObjC.available) { + try { + const JailMonkey = ObjC.classes.JailMonkey; + if (JailMonkey) { + const isJailBroken = JailMonkey["- isJailBroken"]; + Interceptor.attach(isJailBroken.implementation, { + onLeave: function(retval) { + if (DEBUG_MODE) console.log("JailMonkey isJailBroken check hooked & skipped"); + retval.replace(ptr("0x0")); + } + }); + + console.log('== Hooked JailMonkey detection =='); + } else { + if (DEBUG_MODE) console.log('Skipping JailMonkey hook - not present'); + } + } catch (err) { + console.error(`[!] ERROR: JailMonkey isJailBroken hook failed: ${err}`); + } +} \ No newline at end of file