/apple-vuln-research-txm-sptm-firmware-extraction:apple-vuln-research-txm-sptm-firmware-extractionfrom apple-vuln-research-txm-sptm-firmware-extraction
Extracts and analyzes Apple Silicon TXM and SPTM firmware binaries from IM4P containers on macOS. Helps reverse-engineer panic codes, map error strings, and analyze trust boundary behavior.
Ships in apple-vuln-research-txm-sptm-firmware-extraction. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Apple's TXM (Trusted Execution Monitor) and SPTM (Secure Page Table Monitor) run at higher privilege than the kernel (GL0 and GL2 respectively). When they panic, the error codes are opaque (e.g., "TXM [Panic]: [code: 0x0000001A | 1]"). Understanding what triggered the panic requires extracting and reversing the firmware binary.
# TXM firmware (universal, same on all Apple Silicon with TXM)
find /System/Volumes/Preboot -name "txm.macosx.release.im4p" 2>/dev/null
# SPTM firmware (chip-specific)
find /System/Volumes/Preboot -name "sptm.macosx.release.im4p" 2>/dev/null
# Both are in the restore firmware directory:
# /System/Volumes/Preboot/<UUID>/restore/Firmware/
pip3 install --break-system-packages pyimg4
pyimg4 handles Apple's IM4P container format (ASN.1 DER wrapper + LZFSE compression).
# Extract TXM
pyimg4 im4p extract -i txm.macosx.release.im4p -o txm.raw
# Extract SPTM
pyimg4 im4p extract -i sptm.macosx.release.im4p -o sptm.raw
Output: decompressed Mach-O arm64e binary.
Typical sizes:
file txm.raw
# Expected: Mach-O 64-bit executable arm64e
strings txm.raw | head -5
# Should show TXM version string and panic messages
# List all panic conditions
strings txm.raw | grep "panic:"
# Find specific panic code context
strings txm.raw | grep -i "invalid\|boot.*state\|security.*mode"
# Get version info
strings txm.raw | grep "Version"
From TXM panic logs, you get: TXM [Panic]: [code: 0xNN | M]
The code maps to a specific panic() call in the binary. Common patterns:
panic: invalid secure boot state: %#xpanic: attempt to destroy already destroyed bufferpanic: bogus digest length: %lupanic: should never be called# Disassemble with objdump
objdump -d txm.raw > txm_disasm.txt
# Or load into Ghidra/IDA for full RE
# Base address from panic log: TXM load address field
# e.g., "TXM load address: 0xfffffe004031c000"
file txm.raw returns "Mach-O 64-bit executable arm64e"strings txm.raw | grep -c panic returns 20+ panic stringsFrom panic log:
panic(cpu 2 caller 0xfffffe0055140010): TXM [Panic]: [code: 0x0000001A | 1]
TXM UUID: FC4B4161-29AA-3A66-8A86-5211332F59FB
After extraction:
$ strings txm.raw | grep "invalid secure boot"
panic: invalid secure boot state: %#x
→ Code 0x1A = "invalid secure boot state" assertion in TXM's boot state machine.
trxm for TXM, sptm for SPTMWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub dmaynor/dmaynor-skills-marketplace --plugin apple-vuln-research-txm-sptm-firmware-extraction