Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Add Frida patches for spawn and syscall-filtered daemons

Maximilian Paßfcad5290469e
diff --git a/Research/0_binary_patch_comparison.md b/Research/0_binary_patch_comparison.md
index 9f83284d..fd356996 100644
--- a/Research/0_binary_patch_comparison.md
+++ b/Research/0_binary_patch_comparison.md
@@ -211,7 +211,7 @@
> Two presets ship, prewritten, in
> `VPhone.bundle/Contents/Resources/patches_presets/`. Both name all nine sets and
> differ only in their selection: `standard` (the default, and what a VM gets
-> unless `--preset` says otherwise) blocks the two Frida Stalker relaxations, the
+> unless `--preset` says otherwise) blocks the four Frida relaxations, the
> three `hv_vmm_present` concealment patches, and the iPhone17,3 identity rewrites;
> `extended` blocks nothing.
>
@@ -802,7 +802,7 @@ Apple's ROM and this patch. See `Firmware/openavb_boot_rom.md`.
> **⚠ iOS-27 hard-gate (2026-07-20).** Every patch below whose Purpose cites "iOS 27" / "27.0 on the 26.4 kernel" is **hard-gated to a 27.x base** via `KernelJBPatcher.applyIOS27` — set by `FirmwarePipeline` from the iPhone base `ProductVersion` (mirroring the `applyExcGuard`/iOS-18 mechanism at patch 27 above; standalone `patch-component` defaults it true, override with `--target-os`). Gated set: **JB-02b, JB-02d, JB-09 (the `ops[124]` add, plus on 27 the `ops[267]` removal — handed to JB-29; the other 201..316 hooks stay), JB-10b, JB-26, JB-27, JB-28, JB-29**. On an 18.x/26.x base **none** of them run. This supersedes the per-row "No-op-in-effect for version-matched userlands" notes: those describe the effect *if applied*, but **JB-27 is NOT a no-op on 26.x** — its `cmp 0x588→0x6e0` retarget makes the 26.x userclient reject its own native 0x588 SwapEnd → dead display (the 26.5 regression that motivated the hard-gate). **Verified 2026-07-20 (JB-29 addendum 2026-07-23):** a 26.5 base produces a **byte-identical** kernelcache to pre-branch `main` (`patch-component --component kernel-jb --target-os 26.5` vs main's output — `cmp` clean, 83 records each; re-confirmed unchanged after JB-29 by `sha256`, since `ops[267]` stays blanket-neutered on 26.5), and a 27.0 base emits **95** records on the `c0ecdb4b` deployment kernel: the 11 gated records above **plus JB-29's 2** (`jb.fpfs_scoped_open.{ops_retarget,cave}`), with `sandbox_ext_267` suppressed (JB-29 owns `ops[267]` on 27 → the FileProvider-scoped trampoline instead of the blanket allow-stub).
-> **Frida Stalker support is opt-in (`--frida`).** JB-23b and JB-25c run only when firmware patching is invoked with `--frida` (`vphone-cli vm create … --frida`, `vphone-cli fw patch <vm> -V jb --frida`, `patch-firmware … --frida`, `patch-component --component kernel-jb --frida`, or `make fw_patch_jb FRIDA=1`), gated by `KernelJBPatcher.applyFrida` (set by `FirmwarePipeline` from `enableFrida`). Baseline JB/EXP output is **byte-identical** when off (26.4 emits 83 records without `--frida`, 87 with — the 4 being JB-23b's 2 thread_set_state setters and JB-25c's 2 vm_map_delete gates). Frida itself is installed through the existing extra-debs mechanism: on a `--frida` create the orchestrator sets `VPHONE_FRIDA=1`, `fetch_debs.sh` resolves the latest `frida_<ver>_iphoneos-arm64.deb` (== `re.frida.server`: no `Depends`, rootless `/var/jb` layout) from the Frida GitHub releases into the debs cache, `cfw_install_{jb,exp}.sh` stage it, and the first-boot "5b/8 INSTALL EXTRA DEBS" step `dpkg -i`'s it — no APT source, marker, or dependency resolution.
+> **Frida Stalker support is opt-in (`--frida`).** JB-23b and JB-25c run only when firmware patching is invoked with `--frida` (`vphone-cli vm create … --frida`, `vphone-cli fw patch <vm> -V jb --frida`, `patch-firmware … --frida`, `patch-component --component kernel-jb --frida`, or `make fw_patch_jb FRIDA=1`), gated by `KernelJBPatcher.applyFrida` (set by `FirmwarePipeline` from `enableFrida`). Baseline JB/EXP output is **byte-identical** when off (26.4 emits 83 records without `--frida`, 87 with — the 4 being JB-23b's 2 thread_set_state setters and JB-25c's 2 vm_map_delete gates). **2026-10-22:** the Frida set also carries JB-33 (`kernel-exp-frida_tpro_off`, spawn) and JB-34 (`kernel-exp-frida_syscall_filter_off`, syscall-filtered daemons), ported from mowisec/frida_patches_srd; `standard` blocks all four. Frida itself is installed through the existing extra-debs mechanism: on a `--frida` create the orchestrator sets `VPHONE_FRIDA=1`, `fetch_debs.sh` resolves the latest `frida_<ver>_iphoneos-arm64.deb` (== `re.frida.server`: no `Depends`, rootless `/var/jb` layout) from the Frida GitHub releases into the debs cache, `cfw_install_{jb,exp}.sh` stage it, and the first-boot "5b/8 INSTALL EXTRA DEBS" step `dpkg -i`'s it — no APT source, marker, or dependency resolution.
| # | Group | Method | Function | Purpose | JB Enabled |
| ----- | ----- | ------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------: |
@@ -844,6 +844,8 @@ Apple's ROM and this patch. See `Firmware/openavb_boot_rom.md`.
| JB-30 | B | `patchParavirtDisplayRefreshRate` (record `kernel-cfw-display_promotion`; introduced as `kernel-exp-display_refresh_120hz`, renamed when `standard` turned it on) | `AppleParavirtDisplay::createDisplayAttributes` (AppleParavirtGPUIOGPUFamily), the per-mode timing element call | **ProMotion: 120 Hz display timing (on in `standard` since 2026-10-09; it shipped opt-in from 2.4.2).** The host VM service builds its one `PGDisplayMode` with a constant 60.0 Hz and writes it into the display shared state page as a 16-byte entry (u16 width, u16 height, u32 refresh in 16.16 Hz, flags); the guest turns each entry into an IOAV timing element with `ldurh w1,[xN,#-8]; ldurh w2,[xN,#-6]; ldur w3,[xN,#-4]; bl`. The `ldur w3` becomes `movz w3,#120,lsl #16`. Anchor: the `createDisplayAttributes` logger cstring (all refs in one function) + the only w1/w2/w3 load triple off one base at -8/-6/-4 ahead of a call. Gated by `KernelCustomFirmwarePatcher.applyProMotion`, set from the plan. See `Research/Guest/display_refresh_rate.md`. | Y |
| JB-31 | C | `patchParavirtUserClientsNarrow` (records `kernel-cfw-paravirt_user_clients.redirect` / `.cave`; introduced as `kernel-exp-paravirt_user_clients`, renamed when `standard` turned it on) | Same IOUserClient Sandbox gate; the deny block's `ldr Xt,[sp,#imm]` eight bytes before the fail-log `adrp` | **Paravirtual device access on a 26.x / 18.x base (on in `standard` since 2026-10-04; it shipped opt-in).** Narrow replacement for the broad gate-off: at the deny point the class-name C string is already in x0, so a code-cave trampoline reads its first eight bytes and branches to the gate's NotPermitted allow target only for `ApplePar` / `AppleVid` / `AppleVir` / `IOSurfac` (AppleParavirt\*, AppleVideoToolboxParavirt\*, AppleVirtIO\*, IOSurfaceAcceleratorParavirtClient); every other denial runs the displaced `ldr` and falls through to the real deny. Fixes `MTLCreateSystemDefaultDevice()` nil in daemons/CLI and the VideoToolbox/ANE/IOSurface denials (upstream issue #22) without opening the rest. Cave words verified by clang/as + capstone round-trip; the two `b` words via `ARM64Encoder`. Gated by `KernelCustomFirmwarePatcher.applyParavirtUserClients`, set from the plan when `applyIOS27` is false. See `Research/Guest/gpu_acceleration.md`. | Y |
| JB-32 | B/C | `patchParavirtTask3Version` (`kernel-cfw-paravirt_gpu_task3.request`, `.features`, `.features_code`, `.identity_hook`, `.identity_code`) | `setupVersion`; task initializer's `Failed to create Page Table Lock`; superclass task retain/store; XNU flow-divert CDHASH log and proc/task inverse getter | **Persistent per-executable host shader caches through Task3, enabled in Standard.** Phase 1 (2026-10-19) requests binary version 252 while computing guest features from the lower of the granted version and the original 245 (`.features` branches to `.features_code`, a five-instruction clamp after the identity trampoline in the same cave; a refusal passes through). Phase 2 (2026-10-20) writes the owning executable's 20-byte code-signing cdhash at TaskRoot+0x28 before descriptor preparation and task registration. The host uses `task-<40 hex>` and retains that directory. A missing proc/hash leaves twenty zero bytes and preserves the ephemeral fallback. The owning task field is recovered from the superclass initializer, not guessed or taken from current_proc. Kernel helpers are found through source-backed semantic call flow (`cs_get_cdhash`) and the dynamically recovered proc_struct_size global (`get_bsdtask_info`); no task/proc layout offsets or kernel VAs are hardcoded. The trampoline preserves x0–x18, LR and SP, copies exactly 20 bytes and replays the displaced descriptor load. All four sites must resolve before any is emitted; failure aborts a selected install. Replacements use ARM64Encoder; new encoders have Keystone 0.9.2 parity tests. Gated by applyParavirtTask3 and declared for cloudOS 26.4 only; Standard enables it there and tvOS presets block it. Static fixture, missing-anchor and register-clobber execution tests pass. Lychee on macOS 27.0.1 / cloudOS 26.4 / iOS 27.0.1 negotiated 252 across three full boots, retained the same nine executable keys, and passed Camera with zero GPU resets. Host GPU compilation events fell 631 → 17 → 12; the Settings windows fell 121 → 5 → 0. Frame-counter gaps do not establish visible animation stutter; the user reports smooth warmed animations. Measurements, cdhash checks and crash analysis are in `Research/Guest/gpu_acceleration.md`. Older hosts remain untested. | Y |
+| JB-33 | B | `patchTproOff` (record `kernel-exp-frida_tpro_off`) | `_xprr_tpro_enabled` (`__DATA_CONST`), found via the `if (xprr_tpro_enabled)` guard of the VM_REGION_FLAG_TPRO_ENABLED store | **Frida spawn support (opt-in, Frida set; port of mowisec/frida_patches_srd `tpro-off`).** libdyld asserts on every API entry that TPRO pages are read-only and aborts (`TPRO regions should not be writable on entry to dyld`); Frida's spawn handshake re-enters libdyld inside dyld's own TPRO window, so `frida -f` and spawn-gated apps abort. Clearing the flag takes the kernel's existing no-TPRO path for every process (global). Anchor: unique `adrp/ldr/cbz/ldr/cmp/b.lo/ldrh/orr #2/strh` window, decoded with Capstone; the flag must resolve into `__DATA_CONST` and hold 1, else fail closed. 26.4 `c0ecdb4b`: flag at file-off `0x7526D4` (1 → 0). See `Research/KernelCustomFirmwarePatches/patch_tpro_off.md`. | Frida set |
+| JB-34 | B | `patchSyscallFilterOff` (record `kernel-exp-frida_syscall_filter_off`) | `_task_get_mach_trap_filter_mask`, `_task_get_mach_kobj_filter_mask`, `_mac_proc_check_syscall_unix` | **Frida in syscall-filtered processes (opt-in, Frida set; port of mowisec/frida_patches_srd `syscall-filter-off`).** Sandbox syscall filters (`syscall-unix/-mach/-mig`) deny the agent's own calls inside the target: attaching to trustd, apsd, cfprefsd, backboardd or runningboardd kills them, and in locationd `thread_get_state` returns `KERN_DENIED` (no threads for Stalker). The two mask accessors return NULL ("no filter", XNU `bsd_arm64.c:249`, `ipc_kobject.c:563`) and the MACF BSD check returns 0 (`systemcalls.c:162`); the rest of the sandbox is untouched. JB-07 (`kernel-boot-syscallmask`, which rewrites the masks as they are installed) does not reach these processes; this is the NULL-mask alternative that row mentions. Anchors: the inlined `bitstr_test` of each check (kobject one behind `cmn #1 ; b.eq`), and `and w1,#0xffff ; mov x0 ; bl ; mov ; cbnz w0` in unix_syscall; each must match once and the three functions must open `pacibsp ; stp`, else fail closed. 26.4 `c0ecdb4b`: file-off `0x1D43090`, `0x1D43120`, `0x24CCAE8` (2 words each). See `Research/KernelCustomFirmwarePatches/patch_syscall_filter_off.md`. | Frida set |
### EXP-Only Kernel Methods (Reference List)
diff --git a/Research/KernelCustomFirmwarePatches/patch_syscall_filter_off.md b/Research/KernelCustomFirmwarePatches/patch_syscall_filter_off.md
new file mode 100644
index 00000000..b5246f23
--- /dev/null
+++ b/Research/KernelCustomFirmwarePatches/patch_syscall_filter_off.md
@@ -0,0 +1,111 @@
+# `patchSyscallFilterOff` (`kernel-exp-frida_syscall_filter_off`)
+
+## Scope
+
+Opt-in Frida patch in `com.vphone.patchset.kernel.frida`, off in every preset
+but `experimental`, gated to cloudOS 26.4+. Port of `syscall-filter-off` from
+[mowisec/frida_patches_srd](https://github.com/mowisec/frida_patches_srd)
+(Apache-2.0).
+
+## Problem
+
+Sandbox profiles can carry per-process syscall filters (the SBPL operations
+`syscall-unix`, `syscall-mach`, `syscall-mig`). Sandbox.kext installs them as
+bitmasks that XNU tests inline in the BSD syscall, Mach trap and kobject (MIG)
+dispatch paths; only a miss consults the MACF policy, which denies and logs.
+
+Frida's agent runs inside the target, so its own calls are judged against the
+target's masks. On the vphone guest with `standard`:
+
+- attaching to `trustd`, `apsd`, `cfprefsd`, `backboardd` or `runningboardd`
+ kills the target during injection (`ProcessNotRespondingError`). The guest log
+ shows `Autobox: trustd(…) deny(1) syscall-mach 27`, `syscall-mig 153`,
+ `syscall-mig 191` and `syscall-unix 362` (`kqueue`), and the crash is an
+ `EXC_BREAKPOINT` inside frida-agent;
+- in `locationd` the agent survives, but `thread_get_state` on its own threads
+ returns `KERN_DENIED` (`syscall-mig 153`/`244`), so `Process.enumerateThreads()`
+ is empty and Stalker cannot follow anything; symbolication returns bare
+ addresses (`syscall-mig 312`).
+
+`kernel-boot-syscallmask` (already in `standard`) replaces the mask Sandbox.kext
+installs through the wrapper it hooks, yet these processes still hit their
+filters, so the masks reach them some other way (likely the Protobox/Autobox
+application at exec). Not investigated further here.
+
+## Approach — read every mask as "no filter"
+
+1. `task_get_mach_trap_filter_mask` → `mov x0, #0 ; ret`
+2. `task_get_mach_kobj_filter_mask` → `mov x0, #0 ; ret`
+3. `mac_proc_check_syscall_unix` → `mov w0, #0 ; ret`
+
+NULL is the mask of an unfiltered task, so (1) and (2) send every check down the
+path the kernel already takes for unfiltered processes; (3) is the MACF hook for
+BSD syscalls, where 0 means allowed. All three open with `pacibsp ; stp …,
+[sp, #-n]!`, so returning before the prologue happens before anything is signed
+or pushed. The rest of the sandbox (file, mach-lookup, IOKit rules) is untouched.
+
+## Semantic Reveal Procedure
+
+Both filter checks inline `bitstr_test(mask, idx)`:
+
+```text
+asr wT, wIdx, #3
+ldrb wT, [xMask, wT, sxtw]
+and wS, wIdx, #7
+lsr wT, wT, wS
+tbnz wT, #0, allow
+```
+
+1. Rejection-only pre-filter on `asr wD, wN, #3`; decode the window around it.
+ Capstone 6 decodes the `asr` and `lsr` aliases with two operands (the shift
+ is not an operand), so the shift amount is read from the operand's shift
+ field, and registers are compared by number.
+2. **kobject check** (ipc_kobject_server): `cmn wIdx, #1 ; b.eq` (KOBJ_IDX_NOT_SET)
+ before the bitstr test, the bitmap read from `x0` (the accessor's return), and
+ `ldr x, [x, #off] ; cbz x` after it. The accessor is
+ the `bl` of the `bl accessor ; cbz x0` pair within four instructions above (on
+ 26.4 an `adrp x8` sits between them).
+3. **trap check** (Mach trap dispatch, `osfmk/arm64/bsd_arm64.c`): `bl accessor ; cbz xMask` directly
+ before the bitstr test, with the `ldrb` base being the tested register.
+4. **unix check** (unix_syscall): `and w1, wNum, #0xffff ; mov x0, xProc ;
+ bl check ; mov xR, x0 ; cbnz w0`. That shape alone is not unique: the iPhone
+ kernels of iOS 26.0 and 26.2 carry it a second time, calling another function.
+ unix_syscall reaches the real call only from the miss of its inlined
+ `bitstr_test(proc_syscall_filter_mask(p), syscode)`, so the site must also be
+ the target of `ldrb ; and wS, wNum, #7 ; lsr ; tbz wT, #0, site` within 4 KiB
+ before it, on the same syscall-number register `wNum`. This anchor is not in
+ the SRD finder.
+5. Each of the three must match exactly once and resolve to three distinct
+ functions, each opening with `pacibsp ; stp …, [sp, #-n]!`; otherwise fail
+ closed. Replacement bytes are the keystone-verified `ARM64.movX0_0`,
+ `ARM64.movW0_0` and `ARM64.ret`.
+
+## 26.4 Static Validation
+
+Kernel: `kernelcache.research.vphone600` from cloudOS 26.4 (`c0ecdb4b…`).
+`patch-component --component kernel-cfw --target-os 26.5 --frida` emits six
+records:
+
+```text
+0x01D43090: pacibsp -> mov x0, #0 _task_get_mach_trap_filter_mask
+0x01D43094: stp x29, x30, [sp, #-0x10]! -> ret
+0x01D43120: pacibsp -> mov x0, #0 _task_get_mach_kobj_filter_mask
+0x01D43124: stp x29, x30, [sp, #-0x10]! -> ret
+0x024CCAE8: pacibsp -> mov w0, #0 _mac_proc_check_syscall_unix
+0x024CCAEC: stp x24, x23, [sp, #-0x40]! -> ret
+```
+
+The mowisec finder resolves the same three functions on this kernel.
+
+## Runtime Validation (iOS 26.5 guest, cloudOS 26.4, Frida 17.24.3)
+
+| Kernel | attach trustd/apsd/cfprefsd/backboardd/runningboardd | threads + Stalker in locationd |
+|---|---|---|
+| `standard` + thread_set_state + vm_map_delete | target dies | 0 threads |
+| … + tpro_off + **syscall_filter_off** | all attach | 7–9 threads; main-thread, churn and all-thread Stalker pass |
+
+## Validation Requirements
+
+- Dry run emits exactly six `kernel-exp-frida_syscall_filter_off` records at three
+ distinct function entries, each originally `pacibsp ; stp`.
+- If any of the three shapes does not match exactly once, the patch fails closed.
diff --git a/Research/KernelCustomFirmwarePatches/patch_tpro_off.md b/Research/KernelCustomFirmwarePatches/patch_tpro_off.md
new file mode 100644
index 00000000..016ec953
--- /dev/null
+++ b/Research/KernelCustomFirmwarePatches/patch_tpro_off.md
@@ -0,0 +1,78 @@
+# `patchTproOff` (`kernel-exp-frida_tpro_off`)
+
+## Scope
+
+Opt-in Frida patch in `com.vphone.patchset.kernel.frida`, off in every preset
+but `experimental`, gated to cloudOS 26.4+. Port of `tpro-off` from
+[mowisec/frida_patches_srd](https://github.com/mowisec/frida_patches_srd)
+(Apache-2.0), which derived it on an iOS 27 Security Research Device.
+
+## Problem
+
+dyld keeps its state in TPRO pages and flips them between read-only and
+read-write itself. Every libdyld API entry asserts that they are read-only and
+otherwise aborts with `TPRO regions should not be writable on entry to dyld`.
+Frida's spawn handshake re-enters libdyld while dyld's own TPRO window is still
+open, so the spawned process aborts:
+
+- `frida -f com.apple.Preferences` fails with `unexpectedly hit a crash with
+ codes [ 0x6000000, 0x0 ] … while initializing suspended process`;
+- an app caught by spawn gating crashes once it is resumed.
+
+The crash reports show `abort_report_np` called from libdyld
+(`_dyld_for_each_objc_class` / `_dyld_objc_class_count`); the guest's processes
+carry `TPRO_CONST` regions, so the vphone guest has TPRO.
+
+## Approach — turn TPRO off in the kernel
+
+`_xprr_tpro_enabled` is a `uint32` in `__DATA_CONST`, statically 1. Every
+reference is a read guarding the TPRO path, whose false arm is the path the
+kernel already takes for processes without TPRO. Writing 0 makes every process
+take it, so dyld's check never sees a writable TPRO region. This is global, not
+per-process.
+
+## Semantic Reveal Procedure
+
+The flag is data, so the guard that reads it is matched as code and the address
+is resolved from it:
+
+1. Rejection-only pre-filter on `orr wD, wN, #2` (VM_REGION_FLAG_TPRO_ENABLED).
+2. Decode the nine-instruction window ending after it, at its VA, and require:
+ `adrp xA` / `ldr wA, [xA, #off]` (same register) / `cbz wA, skip` /
+ `ldr` / `cmp` / `b.lo skip` (same target as the `cbz`) /
+ `ldrh wF, [xN, #f]` / `orr wF, wF, #2` / `strh wF, [xN, #f]` (same register
+ and memory operand as the `ldrh`).
+3. Exactly one window must match; otherwise fail closed.
+4. Flag VA = ADRP page + LDR displacement. It must resolve to a file offset inside
+ `__DATA_CONST` and hold 1; otherwise fail closed.
+5. Write four zero bytes.
+
+## 26.4 Static Validation
+
+Kernel: `kernelcache.research.vphone600` from cloudOS 26.4
+(`c0ecdb4b…`). `patch-component --component kernel-cfw --target-os 26.5 --frida`
+emits one record:
+
+```text
+guard at foff 0x21B8384 (0xfffffe00091bc384):
+ adrp x9, … ; ldr w9, [x9, #0x6d4] ; cbz w9 ; … ; orr w8, w8, #2 ; strh w8, [x19, #0x648]
+0x007526D4 (0xfffffe00077566d4): 01 00 00 00 -> 00 00 00 00
+```
+
+The mowisec finder (`patch_kernel.py`, build-tag check bypassed) resolves the same
+flag address on this kernel.
+
+## Runtime Validation (iOS 26.5 guest, cloudOS 26.4, Frida 17.24.3)
+
+| Kernel | `frida -f com.apple.Preferences` | spawn-gated app after resume |
+|---|---|---|
+| `standard` + thread_set_state + vm_map_delete | abort in libdyld | crashes |
+| … + syscall_filter_off | abort in libdyld | crashes |
+| … + syscall_filter_off + **tpro_off** | spawns, agent loads | works |
+
+## Validation Requirements
+
+- Dry run emits exactly one `kernel-exp-frida_tpro_off` record, original bytes
+ `01 00 00 00`.
+- If the guard window does not match exactly once, or the flag is outside
+ `__DATA_CONST` or not 1, the patch fails closed.
diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift
new file mode 100644
index 00000000..5538ce22
--- /dev/null
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift
@@ -0,0 +1,267 @@
+// KernelCustomFirmwarePatchSyscallFilterOff.swift — optional Frida support in
+// syscall-filtered processes.
+//
+// Declared as `kernel-exp-frida_syscall_filter_off`, off in `standard`.
+//
+// Sandbox profiles can carry per-process syscall filters (`syscall-unix`,
+// `syscall-mach`, `syscall-mig`), installed as bitmasks the kernel tests inline.
+// Frida's agent runs inside the target, so its own calls are judged against the
+// target's masks: in trustd, apsd, cfprefsd, backboardd or runningboardd the
+// agent is denied kqueue, thread_get_state and MIG routines it needs, and the
+// injection dies (`Autobox: trustd deny(1) syscall-mig 153`). The masks get past
+// `kernel-boot-syscallmask` on these processes, so this patch works at the other
+// end: the two mask accessors report "no filter" (NULL, the state of an
+// unfiltered task) and the MACF BSD syscall check allows. The rest of the
+// sandbox is untouched. Ported from mowisec/frida_patches_srd
+// (`syscall-filter-off`).
+// Reveal + validation: Research/KernelCustomFirmwarePatches/patch_syscall_filter_off.md.
+
+import Foundation
+import VPhonePatchKit
+
+extension KernelCustomFirmwarePatcher {
+ @discardableResult
+ func patchSyscallFilterOff() -> Bool {
+ log("\n[FRIDA] syscall filters: report no filter mask, allow the MACF unix check")
+
+ // _task_get_mach_kobj_filter_mask: called just above ipc_kobject_server's
+ // filter check, the one that first tests KOBJ_IDX_NOT_SET (cmn #1).
+ let kobjChecks = findFilterChecks(kobject: true)
+ guard kobjChecks.count == 1, let kobjCheck = kobjChecks.first else {
+ log(" [-] expected one kobject filter check, found \(kobjChecks.count); failing closed")
+ return false
+ }
+ guard let kobj = filterAccessorAbove(kobjCheck) else {
+ log(" [-] no `bl accessor ; cbz x0` above the kobject filter check")
+ return false
+ }
+
+ // _task_get_mach_trap_filter_mask: the other inlined bitstr_test, whose
+ // accessor call directly precedes it.
+ let trapChecks = findFilterChecks(kobject: false)
+ guard trapChecks.count == 1, let trapCheck = trapChecks.first,
+ let trap = branchLinkTarget(at: trapCheck)
+ else {
+ log(" [-] expected one mach trap filter check, found \(trapChecks.count); failing closed")
+ return false
+ }
+
+ // _mac_proc_check_syscall_unix: its call in unix_syscall.
+ let unixCalls = findUnixSyscallCheckCalls()
+ guard unixCalls.count == 1, let unix = unixCalls.first else {
+ log(" [-] expected one mac_proc_check_syscall_unix call, found \(unixCalls.count); failing closed")
+ return false
+ }
+
+ guard Set([kobj, trap, unix]).count == 3 else {
+ log(" [-] the three filter entry points are not distinct functions; failing closed")
+ return false
+ }
+
+ // Returning before the prologue is only correct while nothing has been
+ // signed or pushed yet: require `pacibsp ; stp …, [sp, #-n]!`.
+ let targets: [(off: Int, zero: Data, name: String)] = [
+ (trap, ARM64.movX0_0, "_task_get_mach_trap_filter_mask"),
+ (kobj, ARM64.movX0_0, "_task_get_mach_kobj_filter_mask"),
+ (unix, ARM64.movW0_0, "_mac_proc_check_syscall_unix"),
+ ]
+ for target in targets where !hasSignedFramePrologue(at: target.off) {
+ log(" [-] \(target.name) at 0x\(String(target.off, radix: 16)) does not open with pacibsp; stp")
+ return false
+ }
+
+ for target in targets {
+ emit(
+ target.off,
+ target.zero,
+ patchID: "kernel-exp-frida_syscall_filter_off",
+ virtualAddress: fileOffsetToVA(target.off),
+ description: "return 0 [\(target.name), frida]",
+ )
+ emit(
+ target.off + 4,
+ ARM64.ret,
+ patchID: "kernel-exp-frida_syscall_filter_off",
+ virtualAddress: fileOffsetToVA(target.off + 4),
+ description: "ret [\(target.name), frida]",
+ )
+ }
+ return true
+ }
+
+ // MARK: - Semantic matchers
+
+ /// The inlined `bitstr_test(mask, idx)` both filter checks share:
+ ///
+ /// asr wT, wIdx, #3
+ /// ldrb wT, [xMask, wT, sxtw]
+ /// and wS, wIdx, #7
+ /// lsr wT, wT, wS
+ /// tbnz wT, #0, allow
+ ///
+ /// The kobject check is preceded by `cmn wIdx, #1 ; b.eq` (KOBJ_IDX_NOT_SET)
+ /// and followed by `ldr x, [x, #off] ; cbz x` (mac_task_kobj_msg_evaluate);
+ /// the trap check is preceded by `bl accessor ; cbz xMask`. Returns the
+ /// window start: the `cmn`, or the trap check's `bl`.
+ private func findFilterChecks(kobject: Bool) -> [Int] {
+ var hits: [Int] = []
+ let before = 2
+ let count = kobject ? 9 : 7
+ for range in codeRanges {
+ var off = range.start + before * 4
+ while off + (count - before) * 4 <= min(range.end, buffer.count) {
+ defer { off += 4 }
+ // Rejection-only gate: `asr wD, wN, #3`.
+ guard buffer.readU32(at: off) & 0xFFFF_FC00 == 0x1303_7C00 else { continue }
+ let start = off - before * 4
+ let w = disasm.disassemble(in: buffer.data, at: start, count: count)
+ guard w.count == count, isBitstrTest(Array(w[before ..< before + 5])) else { continue }
+ func ops(_ i: Int) -> [ARM64Operand] { w[i].detail?.operands ?? [] }
+ guard let maskBase = ops(before + 1).first(where: { $0.type == .memory })?.mem.base else { continue }
+ if kobject {
+ // The bitmap is the accessor's return value, still in x0.
+ guard sameRegister(maskBase, .x(0)),
+ w[0].mnemonic == "cmn", ops(0).last?.type == .immediate,
+ ops(0).last?.imm == 1, w[1].mnemonic == "b.eq",
+ w[7].mnemonic == "ldr", ops(7).first?.reg.name?.hasPrefix("x") == true,
+ w[8].mnemonic == "cbz", sameRegister(ops(8).first?.reg, ops(7)[0].reg)
+ else { continue }
+ } else {
+ guard w[0].mnemonic == "bl",
+ w[1].mnemonic == "cbz", sameRegister(ops(1).first?.reg, maskBase),
+ maskBase.name?.hasPrefix("x") == true
+ else { continue }
+ }
+ hits.append(start)
+ }
+ }
+ return hits
+ }
+
+ private func isBitstrTest(_ w: [ARM64Instruction]) -> Bool {
+ func ops(_ i: Int) -> [ARM64Operand] { w[i].detail?.operands ?? [] }
+ // Capstone reports these aliases without their shift operands (`asr`
+ // and `lsr` decode to two register operands), so the shift amount is
+ // read from the operand's shift field or, where present, a third
+ // immediate operand; registers are compared by number.
+ guard w[0].mnemonic == "asr", ops(0).count >= 2, shiftAmount(ops(0)) == 3,
+ w[1].mnemonic == "ldrb",
+ let mem = ops(1).first(where: { $0.type == .memory })?.mem,
+ sameRegister(mem.index, ops(0)[0].reg),
+ w[2].mnemonic == "and", ops(2).count == 3, sameRegister(ops(2)[1].reg, ops(0)[1].reg),
+ ops(2)[2].type == .immediate, ops(2)[2].imm == 7,
+ w[3].mnemonic == "lsr", ops(3).count >= 2, sameRegister(ops(3)[0].reg, ops(1)[0].reg),
+ sameRegister(ops(3)[1].reg, ops(1)[0].reg),
+ ops(3).count < 3 || sameRegister(ops(3)[2].reg, ops(2)[0].reg),
+ w[4].mnemonic == "tbnz", ops(4).count == 3, sameRegister(ops(4)[0].reg, ops(3)[0].reg),
+ ops(4)[1].type == .immediate, ops(4)[1].imm == 0
+ else { return false }
+ return true
+ }
+
+ /// The accessor call `bl accessor ; cbz x0, …` within four instructions
+ /// above the kobject filter check.
+ private func filterAccessorAbove(_ check: Int) -> Int? {
+ for back in 1 ... 4 {
+ let off = check - back * 4
+ let w = disasm.disassemble(in: buffer.data, at: off, count: 2)
+ guard w.count == 2, w[0].mnemonic == "bl", w[1].mnemonic == "cbz",
+ w[1].detail?.operands.first?.reg == .x(0)
+ else { continue }
+ return branchLinkTarget(at: off)
+ }
+ return nil
+ }
+
+ /// `and w1, wNum, #0xffff ; mov x0, xProc ; bl check ; mov xR, x0 ; cbnz w0`
+ /// in unix_syscall; returns the call target.
+ ///
+ /// That shape alone is not unique: the iOS 26.0 and 26.2 kernels carry it a
+ /// second time, calling another function. The real call is the cold block
+ /// unix_syscall reaches only when its inlined
+ /// `bitstr_test(proc_syscall_filter_mask(p), syscode)` misses, so the site
+ /// must also be the target of that test's `tbz wT, #0` (see
+ /// `isSyscallMaskMiss(branchingTo:syscall:)`).
+ private func findUnixSyscallCheckCalls() -> [Int] {
+ var hits: [Int] = []
+ for range in codeRanges {
+ var off = range.start
+ while off + 5 * 4 <= min(range.end, buffer.count) {
+ defer { off += 4 }
+ // Rejection-only gate: `and w1, wN, #0xffff`.
+ guard buffer.readU32(at: off) & 0xFFFF_FC1F == 0x1200_3C01 else { continue }
+ let w = disasm.disassemble(in: buffer.data, at: off, count: 5)
+ func ops(_ i: Int) -> [ARM64Operand] { w.count > i ? w[i].detail?.operands ?? [] : [] }
+ guard w.count == 5,
+ w[0].mnemonic == "and", ops(0).count == 3, ops(0)[0].reg == .w(1),
+ ops(0)[2].type == .immediate, ops(0)[2].imm == 0xFFFF,
+ w[1].mnemonic == "mov", ops(1).first?.reg == .x(0),
+ w[2].mnemonic == "bl",
+ w[3].mnemonic == "mov", ops(3).last?.reg == .x(0),
+ w[4].mnemonic == "cbnz", ops(4).first?.reg == .w(0),
+ isSyscallMaskMiss(branchingTo: off, syscall: ops(0)[1].reg, floor: range.start),
+ let target = branchLinkTarget(at: off + 8)
+ else { continue }
+ hits.append(target)
+ }
+ }
+ return hits
+ }
+
+ /// The constant shift of an `asr`/`lsr` alias: a third immediate operand,
+ /// or the shift Capstone attaches to the source register.
+ private func shiftAmount(_ ops: [ARM64Operand]) -> Int64? {
+ if ops.count >= 3, ops[2].type == .immediate { return ops[2].imm }
+ guard ops.count >= 2, ops[1].shift.type != .none else { return nil }
+ return Int64(ops[1].shift.amount)
+ }
+
+ /// Same general register, whatever width or extension names it.
+ private func sameRegister(_ a: ARM64Register?, _ b: ARM64Register?) -> Bool {
+ guard let a = a?.name, let b = b?.name, a.count > 1, b.count > 1,
+ let ka = a.first, let kb = b.first, "wx".contains(ka), "wx".contains(kb)
+ else { return false }
+ return a.dropFirst() == b.dropFirst()
+ }
+
+ /// True when a `ldrb ; and wS, wNum, #7 ; lsr ; tbz wT, #0, site` — the tail
+ /// of unix_syscall's inlined syscall-mask test, on the same syscall number
+ /// register — branches to `site` from within 4 KiB before it.
+ private func isSyscallMaskMiss(branchingTo site: Int, syscall: ARM64Register, floor: Int) -> Bool {
+ var off = site - 4
+ while off >= max(floor + 12, site - 0x1000) {
+ defer { off -= 4 }
+ // Rejection-only gate: `tbz wT, #0`.
+ guard buffer.readU32(at: off) & 0xFFF8_0000 == 0x3600_0000 else { continue }
+ let w = disasm.disassemble(in: buffer.data, at: off - 12, count: 4)
+ func ops(_ i: Int) -> [ARM64Operand] { w.count > i ? w[i].detail?.operands ?? [] : [] }
+ guard w.count == 4,
+ w[3].mnemonic == "tbz", ops(3).count == 3, ops(3)[1].type == .immediate, ops(3)[1].imm == 0,
+ ops(3)[2].type == .immediate, Int(ops(3)[2].imm) == site,
+ w[2].mnemonic == "lsr", sameRegister(ops(2).first?.reg, ops(3)[0].reg),
+ w[1].mnemonic == "and", ops(1).count == 3, sameRegister(ops(1)[1].reg, syscall),
+ ops(1)[2].type == .immediate, ops(1)[2].imm == 7,
+ w[0].mnemonic == "ldrb"
+ else { continue }
+ return true
+ }
+ return false
+ }
+
+ /// Direct `bl` target as a file offset.
+ private func branchLinkTarget(at off: Int) -> Int? {
+ guard let insn = disasAt(off), insn.mnemonic == "bl",
+ let ops = insn.detail?.operands, ops.count == 1, ops[0].type == .immediate
+ else { return nil }
+ return Int(ops[0].imm)
+ }
+
+ private func hasSignedFramePrologue(at off: Int) -> Bool {
+ let w = disasm.disassemble(in: buffer.data, at: off, count: 2)
+ guard w.count == 2, w[0].mnemonic == "pacibsp", w[1].mnemonic == "stp",
+ let detail = w[1].detail, detail.writeback, !detail.postIndex,
+ let mem = detail.operands.last, mem.type == .memory, mem.mem.base == .sp
+ else { return false }
+ return true
+ }
+}
diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchTproOff.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchTproOff.swift
new file mode 100644
index 00000000..8fecf3cc
--- /dev/null
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchTproOff.swift
@@ -0,0 +1,120 @@
+// KernelCustomFirmwarePatchTproOff.swift — optional Frida spawn support.
+//
+// Declared as `kernel-exp-frida_tpro_off`, off in `standard`.
+//
+// Every libdyld API entry asserts that the thread's TPRO pages are read-only and
+// otherwise aborts with "TPRO regions should not be writable on entry to dyld".
+// Frida's spawn handshake re-enters dyld while dyld's own TPRO window is open,
+// so a spawned (or spawn-gated and resumed) app aborts. Clearing the kernel's
+// `_xprr_tpro_enabled` takes the no-TPRO path the kernel already has for
+// processes without TPRO. Ported from mowisec/frida_patches_srd (`tpro-off`).
+// Reveal + validation: Research/KernelCustomFirmwarePatches/patch_tpro_off.md.
+
+import Foundation
+import VPhonePatchKit
+
+extension KernelCustomFirmwarePatcher {
+ @discardableResult
+ func patchTproOff() -> Bool {
+ log("\n[FRIDA] tpro: clear _xprr_tpro_enabled")
+
+ let sites = findTproRegionFlagGuards()
+ guard sites.count == 1, let site = sites.first else {
+ log(" [-] expected one VM_REGION_FLAG_TPRO_ENABLED guard, found \(sites.count); failing closed")
+ return false
+ }
+ guard let flagOff = vaToFileOffset(site.flagVA) else {
+ log(" [-] _xprr_tpro_enabled VA 0x\(String(site.flagVA, radix: 16)) has no file offset")
+ return false
+ }
+ let inDataConst = segments.contains { seg in
+ seg.name == "__DATA_CONST" && seg.fileSize > 0
+ && Int(seg.fileOffset) <= flagOff && flagOff + 4 <= Int(seg.fileOffset + seg.fileSize)
+ }
+ guard inDataConst else {
+ log(" [-] _xprr_tpro_enabled resolved outside __DATA_CONST (foff 0x\(String(flagOff, radix: 16)))")
+ return false
+ }
+ let value = buffer.readU32(at: flagOff)
+ guard value == 1 else {
+ log(" [-] _xprr_tpro_enabled holds \(value), expected 1")
+ return false
+ }
+
+ emit(
+ flagOff,
+ Data([0, 0, 0, 0]),
+ patchID: "kernel-exp-frida_tpro_off",
+ virtualAddress: site.flagVA,
+ description: "zero [_xprr_tpro_enabled] (guard at 0x\(String(site.guardOff, radix: 16)), frida)",
+ )
+ return true
+ }
+
+ // MARK: - Semantic matcher
+
+ /// The one TPRO read that gates the VM_REGION_FLAG_TPRO_ENABLED store:
+ ///
+ /// adrp xA, page
+ /// ldr wA, [xA, #off] ; _xprr_tpro_enabled
+ /// cbz wA, skip
+ /// ldr wB, [xM, #imm]
+ /// cmp wB, wC
+ /// b.lo skip
+ /// ldrh wF, [xN, #flags]
+ /// orr wF, wF, #2 ; VM_REGION_FLAG_TPRO_ENABLED
+ /// strh wF, [xN, #flags]
+ private func findTproRegionFlagGuards() -> [(guardOff: Int, flagVA: UInt64)] {
+ var hits: [(Int, UInt64)] = []
+ for range in codeRanges {
+ var off = range.start + 7 * 4
+ while off + 8 <= min(range.end, buffer.count) {
+ defer { off += 4 }
+ // Rejection-only gate: `orr wD, wN, #2`. Everything that decides
+ // the match is checked on Capstone's decode below.
+ guard buffer.readU32(at: off) & 0xFFFF_FC00 == 0x321F_0000 else { continue }
+ let start = off - 7 * 4
+ guard let va = fileOffsetToVA(start) else { continue }
+ let w = disasm.disassemble(in: buffer.data, at: start, count: 9, address: va)
+ guard w.count == 9, let flagVA = tproGuardFlagVA(w) else { continue }
+ hits.append((start, flagVA))
+ }
+ }
+ return hits
+ }
+
+ private func tproGuardFlagVA(_ w: [ARM64Instruction]) -> UInt64? {
+ func ops(_ i: Int) -> [ARM64Operand] { w[i].detail?.operands ?? [] }
+
+ guard w[0].mnemonic == "adrp", ops(0).count == 2, ops(0)[0].type == .register,
+ ops(0)[1].type == .immediate
+ else { return nil }
+ let pageReg = ops(0)[0].reg
+
+ // ldr wA, [xA, #off] — the flag load, from the ADRP's page.
+ guard w[1].mnemonic == "ldr", ops(1).count == 2, ops(1)[0].type == .register,
+ ops(1)[0].reg.name?.hasPrefix("w") == true,
+ ops(1)[1].type == .memory, ops(1)[1].mem.base == pageReg, ops(1)[1].mem.index == .invalid
+ else { return nil }
+ let flagReg = ops(1)[0].reg
+
+ // cbz wA, skip — and b.lo to the same skip.
+ guard w[2].mnemonic == "cbz", ops(2).count == 2, ops(2)[0].reg == flagReg,
+ ops(2)[1].type == .immediate,
+ w[3].mnemonic == "ldr", w[4].mnemonic == "cmp",
+ w[5].mnemonic == "b.lo", ops(5).first?.type == .immediate,
+ ops(5)[0].imm == ops(2)[1].imm
+ else { return nil }
+
+ // ldrh wF, [xN, #flags] ; orr wF, wF, #2 ; strh wF, [xN, #flags]
+ guard w[6].mnemonic == "ldrh", ops(6).count == 2, ops(6)[1].type == .memory,
+ w[7].mnemonic == "orr", ops(7).count == 3,
+ ops(7)[0].reg == ops(6)[0].reg, ops(7)[1].reg == ops(6)[0].reg,
+ ops(7)[2].type == .immediate, ops(7)[2].imm == 2,
+ w[8].mnemonic == "strh", ops(8).count == 2, ops(8)[0].reg == ops(6)[0].reg,
+ ops(8)[1].type == .memory, ops(8)[1].mem == ops(6)[1].mem
+ else { return nil }
+
+ return UInt64(bitPattern: ops(0)[1].imm) &+ UInt64(bitPattern: Int64(ops(1)[1].mem.disp))
+ }
+}
diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift
index f4ae7156..02351df9 100644
--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift
@@ -109,12 +109,15 @@ public final class KernelCustomFirmwarePatcher: KernelCustomFirmwarePatcherBase,
patchVmFaultEnterPrepare()
patchVmMapProtect()
- // Opt-in Frida Stalker support, from the kernel.frida patch set:
- // existing-thread follow (thread_set_state) + repeated VM_PROT_COPY
- // overwrite (vm_map_delete).
+ // Opt-in Frida support, from the kernel.frida patch set: existing-thread
+ // follow (thread_set_state), repeated VM_PROT_COPY overwrite
+ // (vm_map_delete), spawn (TPRO) and syscall-filtered targets. The gate
+ // writes each only when its own identifier is selected.
if applyFrida {
patchThreadSetStateEntitlementFlag()
patchVmMapDeleteImmutableCode()
+ patchTproOff()
+ patchSyscallFilterOff()
}
// The paravirtual display advertises 120 Hz instead of the host's
diff --git a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelFridaPatchSet.swift b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelFridaPatchSet.swift
index 9d513e09..85989e4e 100644
--- a/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelFridaPatchSet.swift
+++ b/VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelFridaPatchSet.swift
@@ -2,9 +2,12 @@
//
// Two kernel checks stand between Frida's Stalker and a working trace: the
// entitlement flag thread_set_state wants, and the immutability vm_map_delete
-// enforces over code pages. Neither is needed to boot, and both widen what any
-// process in the guest can do, so this set is opt-in — no preset that a VM gets
-// by default includes it.
+// enforces over code pages. Two more stand between Frida and some targets: the
+// TPRO state dyld asserts on entry, which aborts spawned apps, and the per-process
+// syscall filters, which deny the agent inside filtered daemons. The last two are
+// ported from mowisec/frida_patches_srd. None is needed to boot, and all widen
+// 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.
@@ -35,6 +38,20 @@ public enum FirmwareKernelFridaPatchSet {
target: .firmware(.kernelcache),
applicability: fridaCapable,
),
+ VPhonePatchDeclaration(
+ identifier: "kernel-exp-frida_tpro_off",
+ title: "TPRO off",
+ summary: "Turns TPRO off system-wide, so dyld's TPRO entry check cannot abort an app Frida spawns.",
+ target: .firmware(.kernelcache),
+ applicability: fridaCapable,
+ ),
+ VPhonePatchDeclaration(
+ identifier: "kernel-exp-frida_syscall_filter_off",
+ 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,
+ ),
],
requires: ["vphone.kernel.cfw"],
provides: ["vphone.kernel.frida"],
diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/experimental.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/experimental.plist
index 0f010786..bf776ea5 100644
--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/experimental.plist
+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/experimental.plist
@@ -7,7 +7,7 @@
Read this as the catalogue and standard as the safe subset — the two name the
same patch sets and differ only in their selection. Each patch's own version gate
- still applies, so the Frida pair lands only on cloudOS 26.4 and newer.
+ still applies, so the Frida patches land only on cloudOS 26.4 and newer.
The hv_vmm_present pair is here and nowhere else for a reason: on a freshly
restored 26.4 guest it is a brick. Renaming the OID makes bluetoothd's cached
diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist
index d5d58737..61719b78 100644
--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist
+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/standard.plist
@@ -69,6 +69,8 @@
<array>
<string>kernel-exp-frida_thread_set_state_entitlement_flag</string>
<string>kernel-exp-frida_vm_map_delete_immutable_code</string>
+ <string>kernel-exp-frida_tpro_off</string>
+ <string>kernel-exp-frida_syscall_filter_off</string>
<string>kernel-exp-hv_vmm</string>
<string>dyld-exp-hv_vmm</string>
<string>system-watchdogd-exp-hv_vmm_cache</string>
diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos-4k.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos-4k.plist
index 028e632c..6479ead2 100644
--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos-4k.plist
+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos-4k.plist
@@ -71,6 +71,8 @@
<string>kernel-exp-frida_thread_set_state_entitlement_flag</string>
<string>kernel-cfw-paravirt_gpu_task3</string>
<string>kernel-exp-frida_vm_map_delete_immutable_code</string>
+ <string>kernel-exp-frida_tpro_off</string>
+ <string>kernel-exp-frida_syscall_filter_off</string>
<string>kernel-exp-hv_vmm</string>
<string>dyld-exp-hv_vmm</string>
<string>system-watchdogd-exp-hv_vmm_cache</string>
diff --git a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos.plist b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos.plist
index 19582a74..ba9510bd 100644
--- a/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos.plist
+++ b/VPhoneExecutable/VPhoneVirtualization/Resources/patches_presets/tvos.plist
@@ -70,6 +70,8 @@
<string>kernel-exp-frida_thread_set_state_entitlement_flag</string>
<string>kernel-cfw-paravirt_gpu_task3</string>
<string>kernel-exp-frida_vm_map_delete_immutable_code</string>
+ <string>kernel-exp-frida_tpro_off</string>
+ <string>kernel-exp-frida_syscall_filter_off</string>
<string>kernel-exp-hv_vmm</string>
<string>dyld-exp-hv_vmm</string>
<string>system-watchdogd-exp-hv_vmm_cache</string>