Extract APFS FileVault encryption hashes directly from a Mac in Recovery mode without disk imaging or disk removal.
Produces $fvde$ hashes compatible with hashcat modes 16700 (AES-128) and 18300 (AES-256).
- Reads the APFS container superblock to locate the encrypted keybag
- Decrypts the container keybag using AES-XTS with the container UUID
- Follows volume unlock record pointers to each volume's keybag
- Decrypts volume keybags using AES-XTS with the volume UUID
- Parses KEK blobs (TLV-encoded) to extract salt, PBKDF2 iterations, and wrapped KEK
- Outputs hashcat-compatible
$fvde$hashes
APFSextract also resolves volume names, extracts password hints when present, and warns if a hash belongs to a recovery key (which won't yield the user password).
- Download
apfsextract-darwin-amd64from the latest release - Format a USB stick as exFAT
- Copy the binary to the USB and rename it to
apfsextract
Requires Go 1.23+. Cross-compile for macOS from any OS:
GOOS=darwin GOARCH=amd64 go build -o apfsextract .The compiled binary has zero dependencies.
- Plug the USB into the target Mac
- Power on and hold Cmd+R to boot into Recovery mode
- From the menu bar: Utilities > Terminal
- Run:
chmod +x /Volumes/YOURUSB/apfsextract
/Volumes/YOURUSB/apfsextractThe tool will:
- List APFS containers and let you select one (or auto-select if there's only one)
- Display discovered volumes with names and encryption status
- Extract all
$fvde$hashes - Write
extracted_hashes.txtandextraction_report.txtback to the USB
You can also specify the device directly:
/Volumes/YOURUSB/apfsextract /dev/disk0s2Transfer extracted_hashes.txt to your cracking machine:
# AES-128 ($fvde$1)
hashcat -m 16700 extracted_hashes.txt <wordlist>
# AES-256 ($fvde$2)
hashcat -m 18300 extracted_hashes.txt <wordlist>- Intel Macs with APFS FileVault encryption (macOS High Sierra 10.13+)
- The target Mac must have a Recovery partition (standard on all Macs shipping with OS X 10.7+)
This tool does not support T2/Apple Silicon Macs where the encryption key is bound to the Secure Enclave.
Based on the APFS keybag structures documented in: