Documentation
¶
Overview ¶
Command amfidont relaxes one nominated code-signing verdict inside the running amfid daemon, for one binary, once, and then exits.
It attaches to /usr/libexec/amfid with x/machdebug, breaks at the return of -[AMFIPathValidator_macos validateWithError:], and — only when the validated binary's signing identifier matches the -identity allowlist — overwrites the validator's result ivars so the verdict reads Apple-signed and unrestricted. It patches exactly that one verdict, detaches, and exits. There is no resident daemon, no launchd job, and nothing is written to disk.
This is a research harness. amfid honors com.apple.private.virtualization only on binaries whose signature chains to Apple; that gate is what this tool relaxes so an experiment that needs a restricted VM device can run under a locally-signed binary.
It functions only on a host whose owner has already disabled Debugging Restrictions from Recovery ("csrutil enable --without debug"). It cannot be used to weaken a machine that has not already been deliberately weakened by its owner in a physical-presence flow. amfid is on the critical path for every process launch on the system: a crash while a thread is parked at a breakpoint, or an exit with a BRK still written, wedges every new launch. The one-shot shape and the mandatory watchdog bound that window.
Usage:
sudo amfidont -identity <signing-identifier> -- ./somebinary [args...]
If anything goes wrong, recover amfid with:
sudo launchctl kickstart -k system/com.apple.amfid