Benutzer-Werkzeuge

Webseiten-Werkzeuge


wiki:secureboot

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.

Link zu der Vergleichsansicht

Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung
Nächste Überarbeitung
Vorherige Überarbeitung
wiki:secureboot [2023/06/23 21:34] – [Abhilfe] pulsarwiki:secureboot [2024/03/29 20:19] (aktuell) – [shim Bootloader] pulsar
Zeile 45: Zeile 45:
  
  
-==== Abhilfe ====+===== mokutil ===== 
 + 
 +Eine **Abhilfe** bietet hier das ''mokutil''.
  
 Es ist evtl. nötig die default Keys im UEFI wieder herszustellen, der Secure BootStick verlangt evtl. den Standard Microsoft Key Es ist evtl. nötig die default Keys im UEFI wieder herszustellen, der Secure BootStick verlangt evtl. den Standard Microsoft Key
Zeile 53: Zeile 55:
   mokutil --kek   mokutil --kek
  
-* [key 1] = C=US, ST=Texas, L=Round Rock, O=Dell Inc., CN=Dell Inc. Platform Key +  * [key 1] = C=US, ST=Texas, L=Round Rock, O=Dell Inc., CN=Dell Inc. Platform Key 
-* [key 2] = C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Corporation Third Party Marketplace Root+  * [key 2] = C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Corporation Third Party Marketplace Root
  
   mokutil --db   mokutil --db
-   + 
-* [key 1] = C=US, ST=Texas, L=Round Rock, O=Dell Inc., CN=Dell Inc. Key Exchange Key +  * [key 1] = C=US, ST=Texas, L=Round Rock, O=Dell Inc., CN=Dell Inc. Key Exchange Key 
-* [key 2] = C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Corporation Third Party Marketplace Root +  * [key 2] = C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Corporation Third Party Marketplace Root 
-* [key 3] = C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Root Certificate Authority 2010+  * [key 3] = C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Root Certificate Authority 2010
  
  
   mokutil --dbx   mokutil --dbx
-   + 
-* [key 1] = C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Root Certificate Authority 2010 +  * [key 1] = C=US, ST=Washington, L=Redmond, O=Microsoft Corporation, CN=Microsoft Root Certificate Authority 2010 
-* [key 2] = [SHA-256] 80b4d96931b... ewig lang ...856967df8e+  * [key 2] = [SHA-256] 80b4d96931b... ewig lang ...856967df8e
      
      
 Ansonsten gilt: Ansonsten gilt:
-Secure Boot deaktivieren und die folgenden Kommandos ausführen. Falls sich Secure Boot nicht deaktivieren lässt (Dell), dann ein System starten, welches mit den Standard Signaturen starten kann. In meinem Fall hatte OpenSuse neuere Keys bzw. seine eigenen Suse Key im NVRAM des UEFI Chips geladen und wohl auch die Secure Boot Advanced Targeting (SBAT) aktualisiert so das ältere Micosoft Keys nicht mehr funktionieren, sondern nur neuere Versionen davon.+Secure Boot deaktivieren und die folgenden Kommandos ausführen. Falls sich Secure Boot nicht deaktivieren lässt (Dell), dann ein System starten, welches mit den Standard Signaturen starten kann. In meinem Fall hatte OpenSuse neuere Keys bzw. seine eigenen Suse Key im NVRAM des UEFI Chips geladen und wohl auch die Secure Boot Advanced Targeting (SBAT) aktualisiert so das ältere Micosoft Keys nicht mehr funktionieren, sondern nur neuere Versionen davon - Hauptgrund warum der Boot-Stick nicht mehr startet.
  
-  mokutil --disable-validation+ 
 +folgender Kommando zeigt nur einen **[key 1]** Issuer: CN=SUSE Linux Enterprise Secure Boot CA - so sieht es auch aus wenn es funktioniert. 
 + 
 +  mokutil --list-enrolled 
 + 
 + 
 +Disabling/re-enabling Secure Boot: 
 + 
 +  mokutil --disable-validation or mokutil --enable-validation
   mokutil --reset   mokutil --reset
   mokutil --set-sbat-policy previous / delete   mokutil --set-sbat-policy previous / delete
      
-Choose a password between 8 and 16 characters long. Enter the same password to confirm it. Reboot. When prompted, press a key to perform MOK management. Select „Change Secure Boot state“. Enter each requested character of your chosen password to confirm the change. Note that you have to press Return/Enter after each character. Select „Yes“. Select „Reboot“. +Choose a password between 8 and 16 characters long. Enter the same password to confirm it. Reboot. When prompted, press a key to perform MOK management. Select „Change Secure Boot state“. Enter each requested character of your chosen password to confirm the change. Note that you have to press Return/Enter after each character. 
 + 
 +Select „Yes“.  
 +Select „Reboot“. 
  
 Im MOK Manager der direkt nach dem reboot aufgerufen wird alles löschen bzw. deaktiveren, MOK List delete und Validation deaktiveren. Im MOK Manager der direkt nach dem reboot aufgerufen wird alles löschen bzw. deaktiveren, MOK List delete und Validation deaktiveren.
Zeile 87: Zeile 100:
   sbat,1,2022052400   sbat,1,2022052400
   grub,2   grub,2
- 
- 
-folgender Kommando zeigt nur einen **[key 1]** Issuer: CN=SUSE Linux Enterprise Secure Boot CA 
- 
-  mokutil --list-enrolled 
-   
-  
  
 ==== Interessant aber ungetestet ==== ==== Interessant aber ungetestet ====
Zeile 101: Zeile 107:
   mokutil --mokx   mokutil --mokx
      
-===== mokutil ===== 
- 
-Disabling/re-enabling Secure Boot: 
- 
-  mokutil --disable-validation or mokutil --enable-validation 
- 
-Choose a password between 8 and 16 characters long. Enter the same password to confirm it. 
-Reboot. 
-When prompted, press a key to perform MOK management. 
-Select "Change Secure Boot state". 
-Enter each requested character of your chosen password to confirm the change. Note that you have to press Return/Enter after each character. 
-Select "Yes". 
-Select "Reboot" 
- 
  
  
Zeile 123: Zeile 115:
   # shim-install    # shim-install 
   No valid EFI partition   No valid EFI partition
 +
 +
 +The default boot loader used by openSUSE on UEFI systems is grub2. When in secure boot mode, an additional boot loader called 'shim' is used too. Instead of directly calling grub2 in that mode the firmware first loads 'shim'. 'shim' carries a signature by Microsoft in order to be recognized by the firmware. 'shim' in turn knows about the openSUSE certificate that was used to sign grub2. grub2 then is able to load linux kernels that are also signed by the openSUSE certificates. After loading the Linux kernel the scope of secure boot ends. The linux kernel used in openSUSE does not impose additional restrictions.
 +
 +In order to allow having custom boot loaders as well as custom kernels shim offers a way to import custom signatures. The program 'MokManager' is used for that purpose. When 'shim' is instructed to load a binary that is not signed by a well known entity it calls into MokManager which allows to import certificates into the database of well known signature issuers. 
 +
 +
 +Damit beim Suse Updates kein zu neuer restiktiver shim aktiv wird wurden nun
 +sicherheitshalber Updates für shim blockiert:
 +
 +<code>
 +iglu:~ # zypper la shim
 +Specified lock has been successfully added.
 +
 +iglu:~ # zypper ll
 +
 +# | Name | Type    | Repository | Comment
 +--+------+---------+------------+--------
 +1 | shim | package | (any)      | 
 +</code>
 +
  
  
Zeile 197: Zeile 210:
  
   mokutil --pk   mokutil --pk
 +
 +Dieser Kommando liefert nun 2 key zurück, in Suse keine Updates eingespielt, kann nur vom BootStick sein.
  
   mokutil --dbx   mokutil --dbx
wiki/secureboot.1687548882.txt.gz · Zuletzt geändert: 2023/06/23 21:34 von pulsar