-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bin/tpmr .ash_history: add needed functions to be able to call tpmr r…
…ecalculate_firmware_pcr_from_cbfs .ash_history: add tpmr recalculate_firmware_pcr_from_cbfs but remove unneeded deprecated ways of doing things Signed-off-by: Thierry Laurion <[email protected]>
- Loading branch information
Showing
2 changed files
with
93 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
#mount /boot in read-only by default | ||
mount /boot | ||
#verify detached signature of /boot content | ||
find /boot/kexec*.txt | gpg --verify /boot/kexec.sig - | ||
#remove invalid kexec_* signed files | ||
mount /dev/sda1 /boot && mount -o remount,rw /boot && rm /boot/kexec* && mount -o remount,ro /boot | ||
#Generate keys from GPG smartcard: | ||
mount-usb && gpg --home=/.gnupg/ --card-edit | ||
#Copy generated public key, private_subkey, trustdb and artifacts to external media for backup: | ||
mount -o remount,rw /media && mkdir -p /media/gpg_keys; gpg --export-secret-keys --armor [email protected] > /media/gpg_keys/private.key && gpg --export --armor [email protected] > /media/gpg_keys/public.key && gpg --export-ownertrust > /media/gpg_keys/otrust.txt && cp -r ./.gnupg/* /media/gpg_keys/ 2> /dev/null | ||
#Insert public key and trustdb export into reproducible rom: | ||
cbfs -o /media/coreboot.rom -a "heads/initrd/.gnupg/keys/public.key" -f /media/gpg_keys/public.key && cbfs -o /media/coreboot.rom -a "heads/initrd/.gnupg/keys/otrust.txt" -f /media/gpg_keys/otrust.txt | ||
#Flush changes to external media: | ||
mount -o,remount ro /media | ||
#Flash modified reproducible rom with inserted public key and trustdb export from precedent step. Flushes actual rom's keys (-c: clean): | ||
flash.sh -c /media/coreboot.rom | ||
#Attest integrity of firmware as it is | ||
seal-totp | ||
#Verify Intel ME state: | ||
cbmem --console | grep '^ME' | ||
cbmem --console | less | ||
mount /boot #mount /boot in read-only by default | ||
find /boot/kexec*.txt | gpg --verify /boot/kexec.sig - #verify detached signature of /boot content | ||
media-scan /dev/sdXZ #scan Y partition of X device for detached signed ISOs to boot from | ||
mount-usb --mode rw #mount usb in read-write mode | ||
mount-usb --mode ro #mount usb in read-only mode | ||
flash.sh -c /media/coreboot.rom #flash coreboot.rom WITHOUT preserving user settings | ||
flash.sh /media/coreboot.rom -p #flash coreboot.rom WITH preserving user settings | ||
cbmem --console | grep '^ME' #view ME console | ||
cbmem --console | less #view coreboot console | ||
tpmr recalculate_firmware_pcr_from_cbfs #Replay coreboot TPM event log from CBFS | ||
# Reboot/power off (important for devices with no keyboard to escape recovery shell) | ||
reboot # Press Enter with this command to reboot | ||
poweroff # Press Enter with this command to power off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters