Can an unprivileged host build a macOS guest image without SSH or clicks?
Answered 2026-10-07: no. Decided 2026-10-07: 1A, changed, 2A, the build VM’s own network, 3A, macOS 27 hosts, and 4, the secret store through wb-guestadmin. The decisions are in the comments that start Decision (2026-10-07) on I146I146 (closed): X17-image-build decision 1: keep the disabled provisioning user in the imageX17-image-build open decision 1 (docs/spikes/X17-image-build.md, B28-image-build): the provisioning user (wbprov) is the volume's only secure-token holder, and macOS refuses both deleting it and taking its token away. (decision 1), I139I139 (closed): S06-vm-lifecycle: SSH for the image build's provisioning boot without a NAT networkX17-image-build (#28) answered "no": a host without root can't get wb-guestd into a new macOS guest by writing to its disk. (decision 2), I143I143 (closed): NFR04-host-platforms: macOS 27 host for wb image build (X17 decision 3)X17-image-build (PR #141, #28) found that wb image build needs a macOS 27 host. (decision 3) and I145I145 (closed): SEC12-least-privilege: who holds the image build provisioning password (X17)X17-image-build (PR #141, #28) found that the image build needs a provisioning password: - wb-vmd sets it on VZMacGuestProvisioningOptions; - the build's one SSH session uses it; - wb-guestd's disable step needs the… (decision 4). The spec change for decision 3 is I143I143 (closed): NFR04-host-platforms: macOS 27 host for wb image build (X17 decision 3)X17-image-build (PR #141, #28) found that wb image build needs a macOS 27 host.. Decision 1 changed with I145I145 (closed): SEC12-least-privilege: who holds the image build provisioning password (X17)X17-image-build (PR #141, #28) found that the image build needs a provisioning password: - wb-vmd sets it on VZMacGuestProvisioningOptions; - the build's one SSH session uses it; - wb-guestd's disable step needs the…: the account stays, disabled, as wbadmin, and the host keeps a password for it per VM. Its secure token is usable on purpose. Decision 4 replaces I145I145 (closed): SEC12-least-privilege: who holds the image build provisioning password (X17)X17-image-build (PR #141, #28) found that the image build needs a provisioning password: - wb-vmd sets it on VZMacGuestProvisioningOptions; - the build's one SSH session uses it; - wb-guestd's disable step needs the…’s option 4 with S15-least-privilegeS15-least-privilege: Least Privilege on the HostThe security design for SEC12-least-privilege: which rights Wraith Box takes on the host, where credentials are held, and how each host process gets only the credentials it needs, for only as long as it needs them. (B145-least-privilegeB145-least-privilege: Where are credentials held on the host, and who may reach them?Recommended, the configured secret store holds every credential, and each host process gets a declared set of items just in time.). Source: X17-image-buildX17-image-build: Unattended image buildCan a macOS guest installed from an Apple restore image get past Setup Assistant, with wb-guestd running as a root LaunchDaemon, without SSH, scripted clicks, or MDM? (I28I28 (closed): X17-image-build: Unattended image buildX17-image-build (added to S11-verification-and-spikes in #14)). Changes S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does. ( only). Follow-ups: I138I138 (closed): S06-vm-lifecycle: wb-guestd can't delete a macOS user record (eDSPermissionError)S06-vm-lifecycle says wb-guestd creates, locks and removes project users. (deleting a project user’s record), I139I139 (closed): S06-vm-lifecycle: SSH for the image build's provisioning boot without a NAT networkX17-image-build (#28) answered "no": a host without root can't get wb-guestd into a new macOS guest by writing to its disk. (the network for the SSH session), I140I140 (closed): S11-verification-and-spikes: list the X17-image-build resultThe done-when of #28 asks S11-verification-and-spikes, "Spikes", to point to the X17-image-build result. (the S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq… spike list), I142I142 (closed): X17-image-build: measure whether guest root can revive the disabled provisioning user secure tokenFrom the security review of PR #141 (X17-image-build, #28), finding 2. (whether the disabled user’s secure token gives anything), I143I143 (closed): NFR04-host-platforms: macOS 27 host for wb image build (X17 decision 3)X17-image-build (PR #141, #28) found that wb image build needs a macOS 27 host. (decision 3), I144I144 (closed): S06-vm-lifecycle: which user installs the base layer before sealingFrom the security review of PR #141 (X17-image-build, #28), finding 3. (which user installs the base layer), I145I145 (closed): SEC12-least-privilege: who holds the image build provisioning password (X17)X17-image-build (PR #141, #28) found that the image build needs a provisioning password: - wb-vmd sets it on VZMacGuestProvisioningOptions; - the build's one SSH session uses it; - wb-guestd's disable step needs the… (decision 4, which host process holds the provisioning password).
Figure 1. The candidate, writing wb-guestd to the guest’s disk from the host, fails: the files belong to the host user, and launchd won’t start them. The build that works uses the macOS 27 provisioning options and one SSH session on the first boot, then only wb-guestd over vsock (S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does.).
Decision 1: may the provisioning user stay, disabled?
Section titled “Decision 1: may the provisioning user stay, disabled?”The provisioning user holds the guest volume’s only secure token, the key macOS uses to unlock and manage the volume. macOS refuses to delete that last holder, and refuses to take its token away. The I28I28 (closed): X17-image-build: Unattended image buildX17-image-build (added to S11-verification-and-spikes in #14) comment of 2026-10-04 asked for the user to be removed.
Decision 2: which network carries the SSH session?
Section titled “Decision 2: which network carries the SSH session?”Decision 3: do v1 hosts need macOS 27?
Section titled “Decision 3: do v1 hosts need macOS 27?”The provisioning options are new in macOS 27. NFR04-host-platformsNFR04-host-platforms: Host platformsFirst target: Apple Silicon, macOS 27 or later, because wb image build needs the guest provisioning options that are new in macOS 27 (X17-image-build). says macOS 15 or later. Tracked in I143I143 (closed): NFR04-host-platforms: macOS 27 host for wb image build (X17 decision 3)X17-image-build (PR #141, #28) found that wb image build needs a macOS 27 host..
Decision 4: which host process holds the provisioning password?
Section titled “Decision 4: which host process holds the provisioning password?”The provisioning options take a password, the one SSH session needs it, and the disable step needs it again to keep the secure token usable. Some host process has to hold it during a build, which is an exception to SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts.. The options, and the decision, are in I145I145 (closed): SEC12-least-privilege: who holds the image build provisioning password (X17)X17-image-build (PR #141, #28) found that the image build needs a provisioning password: - wb-vmd sets it on VZMacGuestProvisioningOptions; - the build's one SSH session uses it; - wb-guestd's disable step needs the…. Until it is decided there is no wb image build. Whatever it decides, S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does. requires that provisioning options for a session VM are refused and logged, that the password never reaches disk, a log, a gRPC message or an audit record, and that the guest gets it only on standard input.
I145I145 (closed): SEC12-least-privilege: who holds the image build provisioning password (X17)X17-image-build (PR #141, #28) found that the image build needs a provisioning password: - wb-vmd sets it on VZMacGuestProvisioningOptions; - the build's one SSH session uses it; - wb-guestd's disable step needs the…’s option 4, which avoids a shared password, works whichever way I142I142 (closed): X17-image-build: measure whether guest root can revive the disabled provisioning user secure tokenFrom the security review of PR #141 (X17-image-build, #28), finding 2. comes out, because a dead token is acceptable when images are rebuilt and never updated. So it would remove the need for a SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts. exception, and I142I142 (closed): X17-image-build: measure whether guest root can revive the disabled provisioning user secure tokenFrom the security review of PR #141 (X17-image-build, #28), finding 2. only has to rule out the token staying usable after a root reset.
Impact
Section titled “Impact”Evidence
Section titled “Evidence”- verified The host mounts the new guest’s Data volume as the user, and every file it writes gets the host user’s uid.
chownto root fails. Source: X17-image-buildX17-image-build: Unattended image buildCan a macOS guest installed from an Apple restore image get past Setup Assistant, with wb-guestd running as a root LaunchDaemon, without SSH, scripted clicks, or MDM?, “Answer” parts 1 and 2,results/e1-inject.log. - verified launchd refused a host-written LaunchAgent with “bad ownership/permissions”, and
smdskipped a host-written LaunchDaemon at boot. Source: “Answer” part 3,results/e2-launchd-x17.txt,results/e1-host-write-unprivileged.jsonl. - verified The provisioning options get past Setup Assistant, and one SSH session installs the daemon, which answers on vsock 23 to 26 s after the start. Source: “Answer” parts 4 and 5,
results/e5-provision-boot.jsonl. - verified macOS refuses to delete the provisioning user and to take away its secure token. Disabled, it can’t authenticate. Source: “Answer” parts 7 and 8,
results/e4-provision-boot.jsonl,results/e5-sealed-boot.jsonl. - verified The sealing scan failed with 8 findings before the cleanup, including Remote Login and the provisioning user, and passed after it and on the next boot. Source: “Answer” part 9,
results/e5-provision-boot.jsonl,results/e5-sealed-boot.jsonl. - verified 271.6 s to install and 127.1 s for the provisioning boot, about 6.6 minutes in all. Source: “Measurements”.
- assumed That the SSH session works over the build VM’s own network and the host’s userspace stack. I139I139 (closed): S06-vm-lifecycle: SSH for the image build's provisioning boot without a NAT networkX17-image-build (#28) answered "no": a host without root can't get wb-guestd into a new macOS guest by writing to its disk. tries it.
- assumed That a disabled account holding the secure token gives a project user or guest root nothing, which the spike didn’t test. Decision 1A and the SEC11-root-gains-nothingSEC11-root-gains-nothing: Guest root is not a privilegeFull control of the guest grants no control over enforcement, secrets, or policy. row rest on it, and I142I142 (closed): X17-image-build: measure whether guest root can revive the disabled provisioning user secure tokenFrom the security review of PR #141 (X17-image-build, #28), finding 2. measures it.
- assumed That root on the host would make the host-write candidate work. Not tried, because SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts. rules it out.
What it unblocks
Section titled “What it unblocks”The end-to-end tests of the walking skeleton need an image (V1-M2-walking-skeletonV1-M2-walking-skeleton: Walking skeletonwb-vmd boots a fixture VM bundle in its confined process, wb-guestd answers over vsock, a data disk made on the host holds the homes, and wb shell opens a PTY as a project user, with its output through the terminal fi…). Also I43I43 (closed): S06-vm-lifecycle: VM slot admission for image builds, updates and GUI work (NFR05-two-macos-vms)NFR05-two-macos-vms allows two running macOS guests per host, and S06-vm-lifecycle uses both: the work VM and the isolated VM. (VM slots for image builds), I49I49 (closed): S10-tech-stack: installation, restore image download, upgrades and migrationsS10-tech-stack "Packaging and signing" gives the shape of the macOS app bundle. (restore image download: the install reads a local file, so wb-vmd doesn’t need a network), and I86I86 (open): Cold boot to wb-guestd takes about 11 s, above the NFR01-startup ceilingFound by X18-vsock-handoff (#29). (cold boot to wb-guestd: 8.5 to 11.0 s here, with one disk).
Details and glossary
Why the host’s files don’t work. The host mounts the guest’s disk without root, so macOS ignores ownership on it: the host can write anywhere, but whatever it creates is stored with its own user id. launchd refused or skipped every such file. The host user’s id, 501, is also the id macOS gives the first account in the guest, so a daemon binary written that way would belong to that account. With root on the host the files could be owned by root, but Wraith Box never runs as root on the host.
Why SSH at all. Without root on the host and without MDM, the first root process in the guest has to come from the guest’s own provisioning. The macOS 27 options create an admin user and can turn Remote Login on, and SSH is the only way in that they open. The build uses it once, to install wb-guestd.
Why the user can’t be removed. In the spike, the provisioning user, the first account with a password, became the volume owner, and got its secure token. macOS won’t delete the last holder or take the token from it. Disabled, the account can’t log in and nobody knows its password. It stays in staff, everyone, localaccounts, _lpoperator, a share point group and com.apple.access_disabled. That none of these grants anything is assumed, _lpoperator (print queue operator) included.
- LaunchDaemon: a program launchd starts at boot, as root, from a file in
/Library/LaunchDaemons. - Setup Assistant: the macOS first-run screens that create the first account.
- Remote Login: macOS’s name for the SSH server.
- Secure token: what lets an account unlock the volume’s encryption key and approve changes to it.
- Sealing scan: the check
wb-guestdruns before an image is used. Any finding fails the build.