Dasharo Security: Verified Boot support
Test cases common documentation
Test setup
- Proceed with the Generic test setup: firmware.
- Proceed with the Generic test setup: OS installer.
- Proceed with the Generic test setup: OS installation.
VBO001.001 Generating keys for Verified Boot
Test description
This test aims to verify whether there is a possibility to generate vboot keys for signing the firmware.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
- Based on the dedicated documentation generate the keys.
- Check if the keys, after finishing the generating process, are available in
the
keys
subdirectory.
Expected result
The keys
location should contain the generated keys.
VBO002.001 Signing image without rebuild
Test description
This test aims to verify whether there is a possibility to sign the firmware image with generated keys without rebuilding.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
- Localize the keys, which were generated in the
VBO001.001
test case. - Based on the dedicated documentation sign the firmware image with the keys without rebuilding.
- Note the result.
Expected result
The output of the last command should contain information that resigning procedure was successful.
Example output:
...
INFO: sign_bios_at_end: BIOS image does not have FW_MAIN_B. Signing only FW_MAIN_A
- import root_key from /.../keys/root_key.vbpubk: success
- import recovery_key from /.../keys/recovery_key.vbpubk: success
successfully saved new image to: /.../protectli_vault_cml_v1.0.16_resigned.rom
The /.../protectli_vault_cml_v1.0.16.rom was resigned and saved as: /.../protectli_vault_cml_v1.0.16_resigned.rom
VBO003.001 Flashing device with the signed firmware
Test description
This test aims to verify whether there is a possibility to flash the locally signed firmware to the DUT.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
- Localize the firmware, which was signed in the
VBO002.001
test case. -
Flash the firmware by using the internal programmer and
flashrom
tool. If DUT is already flashed with the Dasharo firmware, the following command should be used:flashrom -p internal -w [path-to-binary] --fmap -i RW_SECTION_A
Otherwise, the following command should be used:
flashrom -p internal -w [path-to-binary] --ifd -i bios
-
Reboot the DUT. and note the results.
Expected result
The DUT reboots properly without issues related to firmware signing.
VBO004.001 Adding keys and building image
Test description
This test aims to verify whether there is a possibility to build firmware
on the local machine, based on Build manual
procedure dedicated to the
platform and sign it with the locally generated keys.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Make yourself familiar with Building manual procedure dedicated for the relevant platform:
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
- Localize the keys, which were generated in the
VBO001.001
test case. - Based on the dedicated documentation add locally generated keys to the coreboot config.
- Based on the dedicated documentation build firmware.
- Check if the binary file, after finishing the building process, is available
in the
build
subdirectory.
Expected result
The build
location should contain the binary file, which size is equal to the
flash chip size.
VBO005.001 Flashing device with built firmware
Test description
This test aims to verify it is possible to flash and boot DUT with signed firmware image.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
- Localize the firmware, which was built in the
VBO004.001
test case. -
Flash the firmware by using the internal programmer and
flashrom
tool. If DUT is already flashed with the Dasharo firmware, the following command should be used:flashrom -p internal -w [path-to-binary] --fmap -i RW_SECTION_A
Otherwise, the following command should be used:
flashrom -p internal -w [path-to-binary] --ifd -i bios
-
Reboot the DUT. and note the results.
Expected result
The DUT reboots properly without issues related to firmware signing.
VBO006.001 Verified boot support (firmware)
Test description
Verified Boot is a method of verifying that the firmware components come from a trusted source. This test aims to confirm that verified boot is enabled and functional.
Test setup
- Proceed with the Generic test setup: firmware.
- Disable Secure Boot.
Test steps
- Power on the DUT.
- Read coreboot loading logs.
Expected result
The logs should indicate that vboot is enabled and verstage has been entered:
VBOOT: Loading verstage.
VBO006.002 Verified boot support (Ubuntu)
Test description
Verified Boot is a method of verifying that the firmware components come from a trusted source. This test aims to confirm that verified boot is enabled and functional.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Download
cbmem
andflashrom
from https://cloud.3mdeb.com/index.php/s/zTqkJQdNtJDo5Nd to the DUT. - Disable Secure Boot.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
- Open a terminal window and execute the following command:
sudo ./cbmem -c | grep VBOOT
Expected result
The output of the command should indicate that vboot is enabled and verstage has been entered:
VBOOT: Loading verstage.
TPM: Extending digest for VBOOT: boot mode into PCR 0
TPM: Extending digest for VBOOT: GBB HWID into PCR 1
VBOOT WORK 8. 0x76c05000 0x00014000
PCR-0 2547cc736e951fa4919853c43ae890861a3b3264000000000000000000000000 SHA256 [VBOOT: boot mode]
PCR-1 e3324765a25f8a59c7c20cc35c1c33a8ab384159d2b40a269246b0b4491cdf89 SHA256 [VBOOT: GBB HWID]
VBO007.001 Verified boot: Booting from Slot A (firmware)
Test description
If the signatures for firmware stored in vboot Slot A are correct, vboot should proceed to boot from Slot A.
Test setup
- Proceed with the Generic test setup: firmware.
- Disable Secure Boot.
Test steps
- Power on the DUT.
- Read coreboot loading logs.
Expected result
The logs should indicate that vboot has chosen to boot from slot A:
Slot A is selected
VBO007.002 Verified boot: Booting from Slot A (Ubuntu)
Test description
If the signatures for firmware stored in vboot Slot A are correct, vboot should proceed to boot from Slot A.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Download
cbmem
andflashrom
from https://cloud.3mdeb.com/index.php/s/zTqkJQdNtJDo5Nd to the DUT. - Disable Secure Boot.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
- Open a terminal window and execute the following command:
sudo ./cbmem -c | grep "Slot A"
Expected result
The output of the command should indicate that vboot has chosen to boot from slot A:
Slot A is selected
VBO008.001 Verified boot: Booting from Recovery (Ubuntu)
Test description
If the signatures for firmware stored in vboot Slot A are incorrect, vboot should revert to booting from the recovery slot.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Download
cbmem
andflashrom
from https://cloud.3mdeb.com/index.php/s/zTqkJQdNtJDo5Nd to the DUT. - Disable Secure Boot.
- Obtain coreboot binary signed with wrong vboot keys.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Flash coreboot signed with wrong vboot keys by executing the following command:
flashrom -p internal --fmap -i RW_SECTION_A -w [coreboot binary]
-
Power off the DUT
- Connect to the DUT using the serial port.
- Power on the DUT
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window and execute the following command:
sudo ./cbmem -c | grep -i recovery
-
If booting into the system is impossible, read coreboot loading logs.
Expected result
The logs should indicate that vboot has chosen to boot from the recovery slot.
Example:
VB2:vb2_check_recovery() Recovery reason from previous boot: 0x3 / 0x3
VB2:vb2_check_recovery() We have a recovery request: 0x3 / 0x0
Recovery requested (1009000e)
VBO009.001 Recovery boot popup (firmware)
Test description
This test aims to verify whether the recovery mode information is displayed as the popup after rebooting the DUT which is flashed with the firmware with the wrong vboot keys.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Disable Secure Boot.
- Obtain
coreboot binary
signed with wrong vboot keys.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Flash coreboot signed with wrong vboot keys by executing the following command:
flashrom -p internal --fmap -i RW_SECTION_A -w [coreboot binary]
-
Reboot the DUT.
- Wait for the popup to appear.
Expected result
Popup with information about recovery mode should be displayed.
VBO010.001 Recovery boot popup confirmation (firmware)
Test description
This test aims to verify whether the recovery popup might be confirmed which allows to proceed to the next booting stages.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Disable Secure Boot.
- Obtain
coreboot binary
signed with wrong vboot keys.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Flash coreboot signed with wrong vboot keys by executing the following command:
flashrom -p internal --fmap -i RW_SECTION_A -w [coreboot binary]
-
Reboot the DUT.
- Wait for the popup to appear.
- Press
ENTER
.
Expected result
After pressing ENTER
the DUT should immediately move to the next stages of
booting.
VBO011.001 Booting after flashing with valid binary (Ubuntu)
Test description
This test aims to verify whether after flashing the DUT with the valid binary, the DUT will boot correctly from the default slot and no recovery popup will be displayed.
Test configuration data
FIRMWARE
= DasharoOPERATING_SYSTEM
= Ubuntu
Test setup
- Proceed with the Test cases common documentation section.
- Download
cbmem
andflashrom
from https://cloud.3mdeb.com/index.php/s/zTqkJQdNtJDo5Nd to the DUT. - Disable Secure Boot.
- Slot A is flashed with an binary with wrong-signed vboot keys.
- Obtain the correct
coreboot binary
appropriate for the DUT.
Test steps
- Power on the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Flash firmware with valid binary by executing the following command:
flashrom -p internal --fmap -i RW_SECTION_A -w [coreboot binary]
-
Reboot the DUT.
- Boot into the system.
- Log into the system by using the proper login and password.
-
Open a terminal window and execute the following command:
sudo ./cbmem -c | grep -i recovery
Expected result
- Popup with information about recovery mode should not be displayed.
-
The logs should indicate that vboot hasn't chosen to boot from the recovery slot. Example output:
VB2:vb2_check_recovery() Recovery reason from previous boot: 0x0 / 0x0