Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Offer the Frida thread_set_state and syscall-filter patches on cloudOS 18

Maximilian Paß725f0240d418
diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelFridaPatchSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelFridaPatchSet.swift
index 85989e4e..52a8ed58 100644
--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelFridaPatchSet.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelFridaPatchSet.swift
@@ -9,7 +9,10 @@
// what any process in the guest can do, so this set is opt-in — no preset that a
// VM gets by default includes it.
//
-// Gated to cloudOS 26.4 and newer, where these shapes were verified.
+// Gated to cloudOS 26.4 and newer, where these shapes were verified. The
+// thread_set_state flag and the syscall filters also have their shape on the
+// iOS 18 research board kernels (cloudOS 18.x); TPRO and the immutable-code
+// check do not exist there in this form.
import Foundation
import VPhonePatchKit
@@ -18,6 +21,9 @@ public enum FirmwareKernelFridaPatchSet {
public static let identifier = "com.vphone.patchset.kernel.frida"
private static let fridaCapable = VPhonePatchApplicability(cloudOS: .atLeast(major: 26, minor: 4))
+ private static let fridaCapableWithIOS18 = VPhonePatchApplicability(
+ cloudOS: .oneOf([.atLeast(major: 26, minor: 4), .major(18)]),
+ )
public static let manifest = VPhonePatchSetManifest(
identifier: identifier,
@@ -29,7 +35,7 @@ public enum FirmwareKernelFridaPatchSet {
title: "thread_set_state entitlement",
summary: "Drops the entitlement flag thread_set_state checks, so Stalker can set thread state.",
target: .firmware(.kernelcache),
- applicability: fridaCapable,
+ applicability: fridaCapableWithIOS18,
),
VPhonePatchDeclaration(
identifier: "kernel-exp-frida_vm_map_delete_immutable_code",
@@ -50,7 +56,7 @@ public enum FirmwareKernelFridaPatchSet {
title: "Syscall filters off",
summary: "Ignores per-process syscall filters, so Frida's agent survives inside filtered daemons such as trustd or backboardd.",
target: .firmware(.kernelcache),
- applicability: fridaCapable,
+ applicability: fridaCapableWithIOS18,
),
],
requires: ["vphone.kernel.cfw"],