Skip to content

X33 - Restore image downgrade

Purpose: The result of the spike for I618I618 (closed): X33-restore-downgrade: Restore image downgrade by a compromised wb-downloadFollow-up from #262 (X30-installer-trust).. Can a compromised wb-download install an older macOS build that Apple’s signing server still signs for a VM, by reporting a newer version in its catalog entry? And can wb-vmd-install read the build from the image itself, and check it against the entry before it installs?

Requirements: SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another., SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts., SEC15-no-guest-disk-mountSEC15-no-guest-disk-mount: The host never mounts a guest-written diskA disk image is guest-written once a guest has run with it attached, and every copy or clone of a guest-written image is guest-written too.

Brief: B618-restore-downgradeB618-restore-downgrade: Can a compromised wb-download install an older macOS build?Yes, and the image's own version can't stop it.

From I618I618 (closed): X33-restore-downgrade: Restore image downgrade by a compromised wb-downloadFollow-up from #262 (X30-installer-trust).: which older macOS builds does Apple’s signing server still sign for a VM, measured by installing from them? Can the build version that VZMacOSRestoreImage reads from the image be changed without the install failing? If it can’t, wb-vmd-install could check it against the entry before it installs, and stop a downgrade.

No. The image’s own version doesn’t stop a downgrade:

  • Old builds install. Every Apple restore image the spike tried installed, from 27.2 (superseded 19 days before) back to 13.0 (from 2022). The signing server answered each install’s five requests.
  • The version the image reports can be changed. VZMacOSRestoreImage.buildVersion and operatingSystemVersion come from the image’s BuildManifest.plist. No signature covers the file, and the install didn’t refuse changed version strings in it. Apple’s 27.0 (26A428) image with them rewritten to 27.2.1 (26B131) reported 26B131 and 27.2.1, installed in 144 s, and booted a guest that reported 27.0 (26A428).

A plain lie in the entry, with Apple’s image unchanged, would be caught by comparing the entry with what VZMacOSRestoreImage reports. An attacker who controls wb-download writes the file too, so they rewrite the manifest and report its SHA-1, and that comparison passes.

What does tell the truth is the guest. The system volume is the part of the image the restore OS checks (X30-installer-trustX30-installer-trust: Installer refusal of a changed restore imageDoes the Virtualization framework's macOS installer, run by wb-vmd-install, refuse a restore image that Apple didn't sign, or one with a changed or replaced component, and does the install contact Apple while wb-vmd-i…), and the guest’s sw_vers reads that volume. A check there is one of the options in B618-restore-downgradeB618-restore-downgrade: Can a compromised wb-download install an older macOS build?Yes, and the image's own version can't stop it., not a decision.

The host is the dedicated Mac, macOS 27.2.1 (26B131), on 2026-11-28 (UTC). That day the newest restore image in Apple’s catalog was 27.2.1 (26B131), and the catalog listed no older build. The older images came from Apple’s CDN, at the URLs of the VirtualMac2,1 listing on api.ipsw.me, and their SHA-1s equal that listing’s. x33 is the X30-installer-trustX30-installer-trust: Installer refusal of a changed restore imageDoes the Virtualization framework's macOS installer, run by wb-vmd-install, refuse a restore image that Apple didn't sign, or one with a changed or replaced component, and does the install contact Apple while wb-vmd-i… install tool without its sandbox profile, ad-hoc signed with the virtualization entitlement. Each install made a new bundle with 4 CPUs, 4 GiB and no network for the guest, one at a time.

Case Image Released VZMacOSRestoreImage reports Signing server Result
c01 27.2 (26B123), superseded by 27.2.1 on 2026-11-09 2026-10-26 26B123, 27.2.0 5 responses installed, 218 s
c02 27.0 (26A428), below the 27.0.1 floor 2026-09-14 26A428, 27.0.0 5 responses installed, 190 s
c03 26.0 (25A354), the previous major release 2025-09-15 25A354, 26.0.0 5 responses installed, 150 s
c04 c02’s image, rewritten to 27.2.1 (26B131) 26B131, 27.2.1 5 responses installed, 144 s
c05 13.0 (22A380) 2022-10-24 22A380, 13.0.0 5 responses installed, 126 s

fakever.py rewrote c04’s image. It changed ProductVersion, ProductBuildVersion and each build identity’s BuildNumber in BuildManifest.plist, Restore.plist, the image’s top-level SystemVersion.plist (not the one on the system volume) and the two plists under BootabilityBundle/Restore/, and copied every other entry unchanged. After the install, mise run vm:provision i618/c04 20 booted the bundle, and sw_vers over SSH said:

ProductVersion: 27.0
BuildVersion: 26A428

To find which file the version comes from, x33 info read copies of the 27.2 image that held only the small entries, rewritten to 27.3 (26C999):

Entries rewritten buildVersion operatingSystemVersion
none 26B123 27.2.0
all five 26C999 27.3.0
only BuildManifest.plist 26C999 27.3.0
only Restore.plist 26B123 27.2.0
only SystemVersion.plist 26B123 27.2.0

The install’s log lines about the signing server, from the Virtualization processes, are in results/<case>.tss.txt. The full logs stay out of the branch.

Throwaway code on branch spike/x33-restore-downgrade, commit 0d2d9f5: x33 (Sources/x33/main.swift, built by build.sh), fakever.py, which rewrites an image’s version, and run-case.sh and tss.sh, which run one install and keep the signing server’s log lines. The numbers are in results/.

Status: Answered 2026-11-29: no. Apple’s signing server signs VM builds back to 13.0, and the version VZMacOSRestoreImage reports comes from the unsigned build manifest