Skip to content

Dasharo Security: UEFI Secure Boot

SBO001.001 Check Secure Boot default state (firmware)

Test description

Secure Boot is a verification mechanism for ensuring that code launched by firmware is trusted. This test aims to verify that the Secure Boot state after flashing the platform with the Dasharo firmware is correct.

Test configuration data

  1. FIRMWARE = Dasharo

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Power on the DUT.
  2. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI Setup Menu.
  3. Enter the Device Manager menu using the arrow keys and Enter.
  4. Enter the Secure Boot Configuration submenu.
  5. Verify the Current Secure Boot State field.

Expected result

The Secure Boot State field should inform that the current state of Secure Boot is Disabled.

SBO002.001 UEFI Secure Boot (Ubuntu 22.04)

Test description

This test verifies that Secure Boot can be enabled from the boot menu and, after the DUT reset, it is seen from the OS.

Test configuration data

  1. FIRMWARE = Dasharo
  2. OPERATING_SYSTEM = Ubuntu 22.04

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Proceed with the Generic test setup: OS installer.
  3. Proceed with the Generic test setup: OS installation.
  4. Proceed with the Secure Boot Configuration to enable the Attempt Secure Boot option in the Secure Boot Configuration menu.

Test steps

  1. Power on the DUT.
  2. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI Setup Menu.
  3. Enter the Device Manager menu using the arrow keys and Enter.
  4. Enter the Secure Boot Configuration submenu.
  5. If a message To enable Secure Boot, set Secure Boot Mode to Custom and enroll the keys/PK first appears:
    1. Set Secure Boot Mode to Custom Mode
    2. Enter Advanced Secure Boot Keys Management submenu
    3. Select Reset to default Secure Boot Keys
    4. If a pop-up appears to confirm the selection, select Yes
    5. Press Esc to go back
  6. Verify that the Current Secure Boot State field says Enabled - if not, select the Attempt Secure Boot option below.
  7. Go back to the main menu using the ESC key.
  8. Select the Reset option to apply the settings and reboot.
  9. The DUT will now attempt to boot OPERATING_SYSTEM with Secure Boot enabled.
  10. Log into the system by using the proper login and password.
  11. Open a terminal window and run the following command:

    sudo dmesg | grep "Secure boot"
    
  12. Note the results.

Expected result

The output of the command should contain the line:

secureboot: Secure boot enabled

SBO002.002 UEFI Secure Boot (Windows 11)

Test description

This test verifies that Secure Boot can be enabled from the boot menu and, after the DUT reset, it is seen from the OS.

Test configuration data

  1. FIRMWARE = Dasharo
  2. OPERATING_SYSTEM = Windows 11

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Proceed with the Generic test setup: OS installer.
  3. Proceed with the Generic test setup: OS installation.
  4. Proceed with the Secure Boot Configuration to enable the Attempt Secure Boot option in the Secure Boot Configuration menu.

Test steps

  1. Power on the DUT.
  2. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI Setup Menu.
  3. Enter the Device Manager menu using the arrow keys and Enter.
  4. Enter the Secure Boot Configuration submenu.
  5. Verify that the Current Secure Boot State field says Enabled - if not, select the Attempt Secure Boot option below.
  6. Go back to the main menu using the ESC key.
  7. Select the Reset option to apply the settings and reboot.
  8. The DUT will now attempt to boot OPERATING_SYSTEM with Secure Boot enabled.
  9. Log into the system by using the proper login and password.
  10. Open Powershell as administrator and run the following command:

    Confirm-SecureBootUEFI
    
  11. Note the results.

Expected result

The output of the command should return the information, that Secure Boot is enabled:

True

SBO003.001 Attempt to boot file with the correct key from Shell (firmware)

Test description

This test verifies that Secure Boot allows booting a signed file with a correct key.

Test configuration data

  1. FIRMWARE = Dasharo
  2. Additional USB storage - at least 1GB - for keeping files for booting

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated GOOD_KEYS.img into USB storage using the following command:

    sudo dd if=path/to/GOOD_KEYS.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI Setup Menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Secure Boot Mode field to Custom Mode.
  9. Select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Enroll Signature Using File
  10. Select the certificate from the USB storage.
  11. Select the Commit Changes and Exit option.
  12. Press ESC until the setup menu.
  13. Select the Reset option.
  14. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  15. Select the UEFI Shell option using the arrow keys and press Enter.
  16. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  17. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

File boots correctly (no information: Command Error Status: Access Denied on the output) and the output of the command shows file content. Example output:

Hello, world!

SBO004.001 Attempt to boot file without the key from Shell (firmware)

Test description

This test verifies that Secure Boot blocks booting a file without a key.

Test configuration data

  1. FIRMWARE = Dasharo
  2. Additional USB storage - at least 1GB - for keeping files for booting

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated NOT_SIGNED.img into USB storage using the following command:

    sudo dd if=path/to/NOT_SIGNED.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  6. Select the UEFI Shell option using the arrow keys and press Enter.
  7. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  8. Boot the previously prepared file by typing its full name:

    hello.efi
    

Expected result

The output of the command doesn't show file content and information about access denied is displayed. Example output:

Command Error Status: Access Denied

SBO005.001 Attempt to boot file with the wrong-signed key from Shell (firmware)

Test description

This test verifies that Secure Boot blocks booting a file with the wrong-signed key.

Test configuration data

  1. FIRMWARE = Dasharo
  2. Additional USB storage - at least 1GB - for keeping files for booting

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated BAD_KEYS.img into USB storage using the following command:

    sudo dd if=path/to/BAD_KEYS.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  6. Select the UEFI Shell option using the arrow keys and press Enter.
  7. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  8. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

The output of the command doesn't show file content and information about access denied is displayed. Example output:

Command Error Status: Access Denied

SBO006.001 Reset Secure Boot Keys option availability (firmware)

Test description

This test aims to verify, that the Reset Secure Boot Keys option is available after flashing the platform with the Dasharo firmware.

Test configuration data

  1. FIRMWARE = Dasharo

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Power on the DUT.
  2. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI Setup Menu.
  3. Enter the Device Manager menu using the arrow keys and Enter.
  4. Enter the Secure Boot Configuration submenu.
  5. Set Advanced Secure Boot Keys Management submenu.
  6. Verify the Reset to default Secure Boot Keys field.

Expected result

The Reset Secure Boot Keys option should be listed after entering the key management submenu.

SBO007.001 Attempt to boot the file after restoring keys to default (firmware)

Test description

This test verifies that the Reset Secure Boot Keys option works correctly.

Test configuration data

  1. FIRMWARE = Dasharo
  2. Additional USB storage - at least 1GB - for keeping files for booting

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated GOOD_KEYS.img into USB storage using the following command:

    sudo dd if=path/to/GOOD_KEYS.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI Setup Menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Secure Boot Mode field to Custom Mode.
  9. Select options in the given order: Advanced Secure Boot Keys Management -> DB Options -> Enroll Signature -> Enroll Signature Using File
  10. Select the certificate from the USB storage.
  11. Select the Commit Changes and Exit option.
  12. Press ESC until the setup menu.
  13. Select the Reset option.
  14. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  15. Select the UEFI Shell option using the arrow keys and press Enter.
  16. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  17. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    
  18. Exit the shell by executing the following command:

    exit
    
  19. Press ESC until the setup menu.

  20. Enter the Device Manager menu using the arrow keys and Enter.
  21. Enter the Secure Boot Configuration submenu.
  22. Enter the Advanced Secure Boot Keys Management submenu.
  23. Select the Reset to default Secure Boot keys option using the arrow keys and Enter.
  24. If necessary - press Y to confirm saving the changes.
  25. Press ESC until the setup menu.
  26. Select the Reset option to apply the settings and reboot.
  27. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI Setup Menu.
  28. Enter the Device Manager menu using the arrow keys and Enter.
  29. Enter the Secure Boot Configuration submenu.
  30. Verify that the Current Secure Boot State field says Enabled.
  31. Press ESC until the setup menu.
  32. Select the One Time Boot menu using the arrow keys and Enter.
  33. Select the UEFI Shell option using the arrow keys and press Enter.
  34. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  35. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

The first attempt to run the signed-hello.efi file will results with file boots correctly (no information: Command Error Status: Access Denied on the output). The output of the command shows file content. Example output:

Hello, world!

The second attempt to run the signed-hello.efi file will ends with information about access denied displayed. Example output:

Command Error Status: Access Denied

After selecting the Reset Secure Boot Keys option, the Secure boot state should be automatically enabled.

SBO008.001 Attempt to enroll the key in the incorrect format (firmware)

Test description

This test verifies that Secure Boot doesn't allow enrolling keys in the incorrect format.

Test configuration data

  1. FIRMWARE = Dasharo

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Additional USB storage - at least 1GB - for keeping files for booting

Test steps

  1. Run sb-img-wrapper.sh script to generate certificate in wrong format.
  2. Flash generated BAD_FORMAT.img into USB storage using the following command:

    sudo dd if=path/to/BAD_FORMAT.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI Setup Menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Secure Boot Mode field to Custom Mode.
  9. Select options in the given order: Advanced Secure Boot Keys Management -> DB Options -> Enroll Signature -> Enroll Signature Using File
  10. Select the file with the .der extension from the USB storage.
  11. Select the Commit Changes and Exit option.

Expected result

The popup with information about ERROR: Unsupported file type! should appear.

SBO009.001 Attempt to boot file signed for intermediate certificate

Test description

This test verifies that a file signed with an intermediate certificate can be executed.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. Additional USB storage - at least 1GB - for keeping files for booting.

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated INTERMEDIATE.img into USB storage using the following command:

    sudo dd if=path/to/INTERMEDIATE.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Current Secure Boot State field to Enabled.
  9. Set the Secure Boot Mode field to Custom Mode.
  10. Select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Enroll Signature Using File.
  11. Select the certificate from the USB storage.
  12. Select the Commit Changes and Exit option.
  13. Press ESC until the setup menu.
  14. Select the Reset option.
  15. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  16. Select the UEFI Shell option using the arrow keys and press Enter.
  17. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  18. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

File boots correctly (no information: Command Error Status: Access Denied on the output) and the output of the command shows file content. Example output:

Hello, world!

SBO010.001 Check support for rsa2k signed certificates

Test description

This test verifies that a file can be booted via Secure Boot using an RSA2048 signed certificate.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. Additional USB storage - at least 1GB - for keeping files for booting.

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated RSA2048.img into USB storage using the following command:

    sudo dd if=path/to/RSA2048.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Current Secure Boot State field to Enabled.
  9. Set the Secure Boot Mode field to Custom Mode.
  10. Select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Enroll Signature Using File
  11. Select the certificate from the USB storage.
  12. Select the Commit Changes and Exit option.
  13. Press ESC until the setup menu.
  14. Select the Reset option.
  15. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  16. Select the UEFI Shell option using the arrow keys and press Enter.
  17. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  18. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

File boots correctly (no information: Command Error Status: Access Denied on the output) and the output of the command shows file content. Example output:

Hello, world!

SBO010.002 Check support for rsa3k signed certificates

Test description

This test verifies that a file can be booted via Secure Boot using an RSA3072 signed certificate.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. Additional USB storage - at least 1GB - for keeping files for booting.

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated RSA3072.img into USB storage using the following command:

    sudo dd if=path/to/RSA3072.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Current Secure Boot State field to Enabled.
  9. Set the Secure Boot Mode field to Custom Mode.
  10. Select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Enroll Signature Using File
  11. Select the certificate from the USB storage.
  12. Select the Commit Changes and Exit option.
  13. Press ESC until the setup menu.
  14. Select the Reset option.
  15. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  16. Select the UEFI Shell option using the arrow keys and press Enter.
  17. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  18. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

File boots correctly (no information: Command Error Status: Access Denied on the output) and the output of the command shows file content. Example output:

Hello, world!

SBO010.003 Check support for rsa4k signed certificates

Test description

This test verifies that a file can be booted via Secure Boot using an RSA4096 signed certificate.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. Additional USB storage - at least 1GB - for keeping files for booting.

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated RSA4096.img into USB storage using the following command:

    sudo dd if=path/to/RSA4096.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Current Secure Boot State field to Enabled.
  9. Set the Secure Boot Mode field to Custom Mode.
  10. Select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Enroll Signature Using File
  11. Select the certificate from the USB storage.
  12. Select the Commit Changes and Exit option.
  13. Press ESC until the setup menu.
  14. Select the Reset option.
  15. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  16. Select the UEFI Shell option using the arrow keys and press Enter.
  17. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  18. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

File boots correctly (no information: Command Error Status: Access Denied on the output) and the output of the command shows file content. Example output:

Hello, world!

SBO010.004 Check support for ecdsa256 signed certificates

Test description

This test verifies that a file can be booted via Secure Boot using an ESCDA256 signed certificate.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. Additional USB storage - at least 1GB - for keeping files for booting.

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated ECDSA256.img into USB storage using the following command:

    sudo dd if=path/to/ECDSA256.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Current Secure Boot State field to Enabled.
  9. Set the Secure Boot Mode field to Custom Mode.
  10. Select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Enroll Signature Using File
  11. Select the certificate from the USB storage.
  12. Select the Commit Changes and Exit option.
  13. Press ESC until the setup menu.
  14. Select the Reset option.
  15. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  16. Select the UEFI Shell option using the arrow keys and press Enter.
  17. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  18. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

File boots correctly (no information: Command Error Status: Access Denied on the output) and the output of the command shows file content. Example output:

Hello, world!

SBO010.005 Check support for ecdsa384 signed certificates

Test description

This test verifies that a file can be booted via Secure Boot using an ESCDA384 signed certificate.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. Additional USB storage - at least 1GB - for keeping files for booting.

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated ECDSA384.img into USB storage using the following command:

    sudo dd if=path/to/ECDSA384.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Current Secure Boot State field to Enabled.
  9. Set the Secure Boot Mode field to Custom Mode.
  10. Select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Enroll Signature Using File
  11. Select the certificate from the USB storage.
  12. Select the Commit Changes and Exit option.
  13. Press ESC until the setup menu.
  14. Select the Reset option.
  15. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  16. Select the UEFI Shell option using the arrow keys and press Enter.
  17. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  18. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

File boots correctly (no information: Command Error Status: Access Denied on the output) and the output of the command shows file content. Example output:

Hello, world!

SBO010.006 Check support for ecdsa521 signed certificates

Test description

This test verifies that a file can be booted via Secure Boot using an ESCDA521 signed certificate.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. Additional USB storage - at least 1GB - for keeping files for booting.

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated ECDSA521.img into USB storage using the following command:

    sudo dd if=path/to/ECDSA521.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Current Secure Boot State field to Enabled.
  9. Set the Secure Boot Mode field to Custom Mode.
  10. Select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Enroll Signature Using File
  11. Select the certificate from the USB storage.
  12. Select the Commit Changes and Exit option.
  13. Press ESC until the setup menu.
  14. Select the Reset option.
  15. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  16. Select the UEFI Shell option using the arrow keys and press Enter.
  17. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  18. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

File boots correctly (no information: Command Error Status: Access Denied on the output) and the output of the command shows file content. Example output:

Hello, world!

SBO011.001 Attempt to enroll expired certificate and boot signed image

Test description

This test verifies that an expired certificate cannot be used to verify a booted image.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. Additional USB storage - at least 1GB - for keeping files for booting.

Test setup

  1. Proceed with the Generic test setup: firmware.

Test steps

  1. Run sb-img-wrapper.sh script to generate keys and sign efi file.
  2. Flash generated EXPIRED.img into USB storage using the following command:

    sudo dd if=path/to/EXPIRED.img of=/dev/sdx
    
  3. Plug the USB storage into DUT.

  4. Power on the DUT.
  5. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  6. Enter the Device Manager menu using the arrow keys and Enter.
  7. Enter the Secure Boot Configuration submenu.
  8. Set the Current Secure Boot State field to Enabled.
  9. Set the Secure Boot Mode field to Custom Mode.
  10. Select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Enroll Signature Using File
  11. Select the certificate from the USB storage.
  12. Select the Commit Changes and Exit option.
  13. Press ESC until the setup menu.
  14. Select the Reset option.
  15. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  16. Select the UEFI Shell option using the arrow keys and press Enter.
  17. In the shell open the USB storage by executing the following command:

    FS0:
    

    One of the filesystems in the FS list will be the USB storage - typically FS0:

  18. Boot the previously prepared file by typing its full name:

    signed-hello.efi
    

Expected result

File does not boot correctly: Command Error Status: Access Denied.

SBO012.001 Boot OS Signed And Enrolled From Inside System (Ubuntu 22.04)

Test description

This test verifies that OS boots after enrolling keys and signing system from inside.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. OPERATING_SYSTEM = Ubuntu 22.04.

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Proceed with the Generic test setup: OS installer.
  3. Proceed with the Generic test setup: OS installation.
  4. Install the sbctl package through git by following installation guide.

Test steps

  1. Power on the DUT.
  2. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  3. Enter the Device Manager menu using the arrow keys and Enter.
  4. Enter the Secure Boot Configuration submenu.
  5. Set the Secure Boot Mode field to Custom Mode.
  6. Erase Secure Boot keys select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Erase all Secure Boot Keys
  7. Press F10 to save changes.
  8. Press ESC until the setup menu.
  9. Select the Reset option.
  10. The DUT will now attempt to boot OPERATING_SYSTEM.
  11. Login to OPERATING_SYSTEM.
  12. Remove Old Secure Boot keys:

    rm -rf /usr/share/secureboot
    

    Note: root right might be needed.

  13. Generate new Secure Boot keys:

    sbctl create-keys
    

    Note: root rights might be needed.

  14. Enroll generated Secure Boot keys:

    sbctl enroll-keys --yes-this-might-brick-my-machine
    

    Note: root rights might be needed.

  15. Sign all components in OPERATING_SYSTEM:

    sbctl verify | awk -F ' ' '{print $2}' | tail -n+2 | xargs -I "#" sbctl sign "#"
    

    Note: root rights might be needed.

  16. Reboot OPERATING_SYSTEM.

  17. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  18. Enter the Device Manager menu using the arrow keys and Enter.
  19. Enter the Secure Boot Configuration submenu.
  20. Set the Current Secure Boot State field to Enabled.
  21. Press F10 to save changes.
  22. Press ESC until the setup menu.
  23. Select the Reset option.
  24. The DUT will now attempt to boot OPERATING_SYSTEM.
  25. Login to OPERATING_SYSTEM.
  26. Check if Secure Boot is enabled:

    dmesg | grep secureboot
    

    Note: root rights might be needed.

Expected result

In dmesg output should be a line informing that Secure Boot is enabled.

SBO013.001 Check automatic certificate provisioning

Test description

This test verifies that the automatic certificate provisioning will install custom keys which will make Ubuntu unbootable. Before launching test, make sure that DTS with automatic certificate provisioning is attached and can be booted on DUT.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. OPERATING_SYSTEM = Ubuntu 22.04.
  3. Additional USB storagefor keeping Dasharo Tools Suite.
  4. Dasharo Tools Suite with UEFI secure boot support.

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Proceed with the Generic test setup: OS installer.
  3. Proceed with the Generic test setup: OS installation.
  4. Proceed with the DTS: Build image with UEFI Secure Boot support.

Test steps

  1. Power on the DUT.
  2. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  3. Enter the Device Manager menu using the arrow keys and Enter.
  4. Enter the Secure Boot Configuration submenu.
  5. Set the Secure Boot Mode field to Custom Mode.
  6. Erase Secure Boot keys select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Erase all Secure Boot Keys.
  7. Press F10 to save changes.
  8. Press ESC until the setup menu.
  9. Select the Reset option.
  10. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  11. Boot Dasharo Tools Suite from USB Storage.
  12. Wait until Dasharo Tools Suite enrolls keys and resets the DUT.
  13. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  14. Enter the Device Manager menu using the arrow keys and Enter.
  15. Enter the Secure Boot Configuration submenu.
  16. Set the Current Secure Boot State field to Enabled.
  17. Press F10 to save changes.
  18. Press ESC until the setup menu.
  19. Select the Reset option.
  20. Verify by booting signed Dasharo Tools Suite:
    1. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
    2. Boot Dasharo Tools Suite from USB Storage.
  21. Reboot the DUT.
  22. Verify by booting unsigned Ubuntu:
    1. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
    2. Boot OPERATING_SYSTEM.

Expected result

Dasharo Tools Suite system signed with custom keys should boot while Ubuntu should not boot as it is signed with Microsoft keys.

SBO013.002 Check automatic certificate provisioning KEK certificate

Test description

This test verifies that the automatic certificate provisioning installs the expected KEK certificate. Before launching test, make sure that DTS with automatic certificate provisioning is attached and can be booted on DUT.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. OPERATING_SYSTEM = Dasharo Tools Suite.
  3. Additional USB storagefor keeping Dasharo Tools Suite.
  4. Dasharo Tools Suite with UEFI secure boot support.

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Proceed with the Generic test setup: OS installer.
  3. Proceed with the Generic test setup: OS installation.
  4. Proceed with the DTS: Build image with UEFI Secure Boot support.

Test steps

  1. Power on the DUT.
  2. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  3. Enter the Device Manager menu using the arrow keys and Enter.
  4. Enter the Secure Boot Configuration submenu.
  5. Set the Secure Boot Mode field to Custom Mode.
  6. Erase Secure Boot keys select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Erase all Secure Boot Keys.
  7. Press F10 to save changes.
  8. Press ESC until the setup menu.
  9. Select the Reset option.
  10. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  11. Boot Dasharo Tools Suite from USB Storage.
  12. Wait until Dasharo Tools Suite enrolls keys and resets the DUT.
  13. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  14. Enter the Device Manager menu using the arrow keys and Enter.
  15. Enter the Secure Boot Configuration submenu.
  16. Set the Current Secure Boot State field to Enabled.
  17. Press F10 to save changes.
  18. Press ESC until the setup menu.
  19. Select the Reset option.
  20. While the DUT is booting, hold the BOOT_MENU_KEY to enter the boot menu.
  21. Boot Dasharo Tools Suite from USB Storage.
  22. Enter shell in Dasharo Tools Suite by pressing 9.
  23. Compare the current KEK certificate with the certificate that should be enrolled:

    1. Download the sample certificate:

      wget https://cloud.3mdeb.com/index.php/s/FGdaGq2QqnGWQew/download/KEK.crt -O /tmp/first_certificate.crt
      
    2. Convert the sample certificate:

      openssl x509 -in /tmp/first_certificate.crt -noout -text > /tmp/first_certificate.crt
      
    3. Export already enrolled certificate:

      mokutil --kek > /tmp/second_certificate.crt
      
    4. Compare the certificates:

      diff /tpm/first_certificate.crt /tmp/second_certificate.crt
      

Expected result

The data provided by both certificates should be equal, the form of the compared data might differ.

SBO014.001 Enroll certificates using sbctl

Test description

This test erases Secure Boot keys from the BIOS menu and verifies if new keys can be enrolled from the operating system using sbctl.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. OPERATING_SYSTEM = Ubuntu 22.04.

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Proceed with the Generic test setup: OS installer.
  3. Proceed with the Generic test setup: OS installation.
  4. Install the sbctl package through git by following installation guide.

Test steps

  1. Power on the DUT.
  2. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  3. Enter the Device Manager menu using the arrow keys and Enter.
  4. Enter the Secure Boot Configuration submenu.
  5. Set the Secure Boot Mode field to Custom Mode.
  6. Erase Secure Boot keys select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Erase all Secure Boot Keys
  7. Press F10 to save changes.
  8. Press ESC until the setup menu.
  9. Select the Reset option.
  10. The DUT will now attempt to boot OPERATING_SYSTEM.
  11. Login to OPERATING_SYSTEM.
  12. Remove old Secure Boot keys:

    rm -rf /usr/share/secureboot
    

    Note: root rights might be needed.

  13. Generate new Secure Boot keys:

    sbctl create-keys
    

    Note: root rights might be needed.

  14. Enroll generated Secure Boot keys:

    sbctl enroll-keys --yes-this-might-brick-my-machine
    

    < Note: root rights might be needed.

  15. Restart the DUT.

  16. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  17. Enter the Device Manager menu using the arrow keys and Enter.
  18. Enter the Secure Boot Configuration submenu.
  19. Set the Current Secure Boot State field to Enabled.
  20. Press F10 to save changes.
  21. Press ESC until the setup menu.
  22. Select the Reset option.

Expected result

You should not be able to boot the system after enrolling the keys and enabling Secure Boot.

SBO015.001 Attempt to enroll the key in the incorrect format (OS)

Test description

This test verifies that it is impossible to load a certificate in the wrong file format from the operating system while using sbctl.

Test configuration data

  1. FIRMWARE = Dasharo.
  2. OPERATING_SYSTEM = Ubuntu 22.04.

Test setup

  1. Proceed with the Generic test setup: firmware.
  2. Proceed with the Generic test setup: OS installer.
  3. Proceed with the Generic test setup: OS installation.
  4. Install the sbctl package through git by following installation guide.

Test steps

  1. Power on the DUT.
  2. While the DUT is booting, hold the BIOS_SETUP_KEY to enter the UEFI setup menu.
  3. Enter the Device Manager menu using the arrow keys and Enter.
  4. Enter the Secure Boot Configuration submenu.
  5. Set the Secure Boot Mode field to Custom Mode.
  6. Erase Secure Boot keys select options in the given order: Custom Secure Boot Options -> DB Options -> Enroll Signature -> Erase all Secure Boot Keys
  7. Press F10 to save changes.
  8. Press ESC until the setup menu.
  9. Select the Reset option.
  10. The DUT will now attempt to boot OPERATING_SYSTEM.
  11. Login to OPERATING_SYSTEM.
  12. Remove Old Secure Boot keys:

    rm -rf /usr/share/secureboot
    

    Note: root rights might be needed.

  13. Generate new Secure Boot keys:

    sbctl create-keys
    

    Note: root rights might be needed.

  14. Generate wrong format keys and move them to the appropriate locations:

    openssl ecparam -genkey -name secp384r1 -out db.key && openssl req -new -x509 -key db.key -out db.pem -days 365 -subj "/CN=3mdeb_test"
    openssl ecparam -genkey -name secp384r1 -out PK.key && openssl req -new -x509 -key PK.key -out PK.pem -days 365 -subj "/CN=3mdeb_test"
    openssl ecparam -genkey -name secp384r1 -out KEK.key && openssl req -new -x509 -key KEK.key -out KEK.pem -days 365 -subj "/CN=3mdeb_test"
    mv db.key /usr/share/secureboot/keys/db/
    mv PK.key /usr/share/secureboot/keys/PK/
    mv KEK.key /usr/share/secureboot/keys/KEK/
    

    Note: root rights might be needed.

  15. Attempt to enroll generated Secure Boot keys:

    sbctl enroll-keys --yes-this-might-brick-my-machine
    

    Note: root rights might be needed.

Expected result

Utility sbctl should fail while enrolling keys.