Skip to content

X30 - Installer refusal of a changed restore image

Purpose: The result of the spike for I262I262 (closed): X30-installer-trust: Installer refusal of a changed restore imageS17-install-and-upgrade (#49) checks a downloaded macOS restore image against the SHA-1 that Apple's catalog (mesu.apple.com) lists, the only hash it lists.. Does the Virtualization framework’s macOS installer, run by wb-vmd-install, refuse a restore image with a changed or replaced component, and does the install contact Apple while wb-vmd-install’s profile denies the network?

Requirements: SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts., SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another.

Brief: B262-installer-trustB262-installer-trust: Does the macOS installer refuse a changed restore image?Yes, with conditions.

From I262I262 (closed): X30-installer-trust: Installer refusal of a changed restore imageS17-install-and-upgrade (#49) checks a downloaded macOS restore image against the SHA-1 that Apple's catalog (mesu.apple.com) lists, the only hash it lists.: on a macOS 27 host, does VZMacOSInstaller refuse a restore image with one byte changed in a signed component, or with a component replaced, and at which step and with what error? Does the install contact Apple (personalization) while wb-vmd-install’s profile denies the network?

Yes, with conditions. Every changed image failed to install, and the unchanged image installed under the same profile:

Case Change Result Step Error
c00-original none, Apple’s 27.2 (26B123) image installed, 446 s
c02-kernel-flip one byte of the kernel cache refused after 9.4 s personalization VZErrorDomain 10007, under it MobileRestore 3194 “Declined to authorize this DFU file on this device for this user”, server error 94 “This device isn’t eligible for the requested build”
c06-kernel-flip-manifest the same byte, and the kernel digests in BuildManifest.plist rewritten to match refused after 9.7 s personalization the same as c02
c03-os-flip one byte in the middle of the system volume image (141-12228-170.dmg.aea, 11 GB) refused after 219 s, at 48 % copying the system volume VZErrorDomain 10007, under it MobileRestore -1 “AMRestorePerformRestoreModeRestoreWithError failed with error: 1106”, which the restore OS reports as failed to restore APFS image
c04-kernel-swap the kernel cache replaced with the 27.2 kernel cache of a physical Mac (kernelcache.release.mac17g), which Apple signed refused after 12.5 s personalization the same as c02
c01-rezip none, every entry stored again by the same tool (a control for the cases above) installed, 143 s

The refusal isn’t a local check of the restore image. Apple’s signing server and the restore OS in the VM make it:

  • Apple’s signing server, for the boot components. The installer hashes each component it personalizes from the file in the image, and sends the digests to Apple’s signing server (TSS) for a ticket bound to the VM’s identity. In c02 the digest it sent for KernelCache was the SHA-384 of the changed file (eb5e9cb7…), not the manifest’s (1f686b08…). The server declined it. Rewriting the manifest (c06) sent the same digest and got the same answer. A kernel cache that Apple did sign, for a physical Mac of the same build, was declined as well (c04): the server signs a digest only for the device and build it belongs to.
  • The restore OS in the VM, for the system volume. The installer doesn’t send a digest of the system volume image (Personalize OS image = No in the log, quoted-lines.txt). It sends the volume’s root hash from the manifest. The restore OS boots from the personalized components, which the server has checked. It receives the image, and stopped the copy at the changed byte (c03).

The install contacts Apple on every run. In c00, Apple’s installation service (com.apple.Virtualization.Installation) made five TSS requests and two other HTTPS requests to Apple. Every connection the log shows it open went over the host’s network: its 35 path:satisfied events all name en0 (quoted-lines.txt). wb-vmd-install’s profile denied x30 the network the whole time (its probe of connect to 127.0.0.1 got Operation not permitted). The service is a separate process, an XPC service of the framework, and the profile of the process that calls it doesn’t apply to it. Each TSS request holds the VM’s chip identity (ECID) and the build’s component digests.

The host is the dedicated Mac, macOS 27.2 (26B123), and the restore image is Apple’s UniversalMac_27.2_26B123_Restore.ipsw. x30 is the X25-vmd-sandboxX25-vmd-sandbox: Self-sandboxed `wb-vmd`Can wb-vmd confine itself at start with a Seatbelt profile that allows the Virtualization framework, its VM bundles under <data>/vms and nothing else, and still create, start, save and restore a macOS VM? install code, ad-hoc signed with the virtualization entitlement, and confined with that spike’s wb-vmd profile plus the three install rules of S04-10-vmd-installS04-10-vmd-install: Installing macOS in `wb-vmd`The wb-vmd-install entry of an image build: its install rules, the restore image it reads, the build bundle it installs into, and its Install call. (“wb-vmd-install”). The install uses 8 GiB of memory.

For each case, mkipsw.py writes a copy of the restore image with every entry stored, in the original order. It changes the entries that the case lists in results/<case>.changes.jsonl and copies the rest. run-case.sh then runs one install, and records x30’s result lines, the unified log of the Virtualization processes (log stream --level info), and the host’s flows once a second (nettop). summarize.sh keeps the lines of the log that the result rests on in results/<case>.summary.txt, and results/quoted-lines.txt has the other log lines this page quotes. The full logs (1 MB to 6 MB each) stay out of the branch.

c01 installed in a third of c00’s time. The spike didn’t look into why. Both installs completed, which is what the control is for.

Case Install start install-failed or installed after Progress at the end
c00-original 20:44:14Z 446 s 100 %
c02-kernel-flip 20:51:42Z 9.4 s 0 %
c06-kernel-flip-manifest 20:51:53Z 9.7 s 0 %
c03-os-flip 20:52:05Z 219 s 48 %
c04-kernel-swap 20:56:39Z 12.5 s 0 %
c01-rezip 20:56:54Z 143 s 100 %

The log has every request, with its HTTP status. nettop’s one-second samples caught only some of the service’s flows: three, to three Apple addresses on port 443, all on en0 (c00-original.summary.txt, “host flows”).

  • An unreachable signing server. Cutting the host’s network needs the host’s settings, which agents don’t change. Assumed to fail the install (For review).
  • An older build that Apple still signs. A compromised wb-download can serve any build that the signing server still accepts, an older one with known flaws among them. The SHA-1 check doesn’t stop that, and this spike didn’t measure which builds the server signs for a VM. I618I618 (closed): X33-restore-downgrade: Restore image downgrade by a compromised wb-downloadFollow-up from #262 (X30-installer-trust). follows it up.
  • Booting a changed image installed some other way. No changed image got past the installer, so the spike didn’t try it.

Throwaway code on branch spike/x30-installer-trust, commit ddc9d33: x30 (Sources/x30/main.swift, from X25-vmd-sandboxX25-vmd-sandbox: Self-sandboxed `wb-vmd`Can wb-vmd confine itself at start with a Seatbelt profile that allows the Virtualization framework, its VM bundles under <data>/vms and nothing else, and still create, start, save and restore a macOS VM?), the install profile (profiles/vmd-install.sb), mkipsw.py and manifest.py, which write the changed images, and run-case.sh, run-all.sh and summarize.sh, which run and record each case.

Status: Answered 2026-11-08: yes, with conditions. The signing server and the restore OS refuse a changed image, and the install contacts Apple from a service the profile doesn’t confine