SlideShare una empresa de Scribd logo
1 de 23
Descargar para leer sin conexión
Secure Boot and Linux




Frédéric Crozat
Senior Software Engineer
fcrozat@suse.com
Secure Boot: an introduction
UEFI ?
     •   For some years now, BIOS is being replaced by
         firmware following UEFI (Unified Extensible
         Firmware Interface) specification.
     •   It allows manufacturers to better cope with modern
         hardware and OS vendors to have a better interface
         to manage it.
     •   BIOS compatibility can still be available with CSM
         (Compatibility Support Module) but this will
         disappear in the near future.
     •   Some UEFI implementations even have a shell :)



3
Secure Boot: what is it ? Why now ?
     •   It is a way to prevent pre-OS attack (before
         bootloader is started), to ensure bootloader and
         kernel are trusted and not run by a Bootkit
     •   We don't envision Secure Boot as a requirement for
         servers within the next 3 years
     •   We expect a majority (if not all) of new desktop
         systems to be shipped with Secure Boot enabled by
         default (requirement for Windows 8 Desktop)
     •   Secure Boot can be useful for secure servers
         against boot viruses but not a panacea



4
What Secure Boot implies
     •   OS must be signed and its signature accepted by
         UEFI firmware
     •   To get OS “signature” accepted by UEFI firmware,
         we need to either:
          ‒   Inject manually key in firmware (not user friendly)
          ‒   Use a distribution whose key has been integrated by
              hardware vendor or signed by UEFI Signing Service
              (Microsoft is acting as this service).
     •   To ensure Secure Boot can't be easily circumvented,
         some kernel features can be disabled when running
         under Secure Boot (distribution policy, to be
         discussed <insert your troll here>).

5
Secure Boot: SUSE solution
Our solution to Secure Boot 1/2
     •   Secure Boot enforces signature on the pre-OS boot
         environment.
     •   This signature process should still be in the hands of
         distribution (SUSE/openSUSE) and users.
     •   To allow this modularity, SUSE expanded shim
         loader (EFI application, created by Matthew Garrett
         to handle Secure Boot for Linux) to give back
         freedom to users and prevent locked-in.




7
Our solution to Secure Boot 2/2
     •   Shim loader is signed by UEFI
         Signing Service and SUSE
     •   It will verify grub2 is signed by SUSE
         or a key enrolled by user, called
         Machine Owner Key (MOK)
     •   Then grub2 will boot and do similar
         check on kernel
     •   And kernel will do the same on
         modules


8
Machine Owner Key (MOK)
     •   Enroll key from the OS (with a password for MOK
         list), using mokutils tool.
     •   Rebooted is required, where shim will check
         password: ensure physical user is present.
     •   This key is added to MOK list, saved into in an UEFI
         Boot Service Only Variable and will be used for
         future boots to ensure key is not modified.
     •   MOK list can only be modified in Secure Boot phase
         (before kernel is started).
     •   Enroll can also be done at boot time if key is
         available on EFI System Partition.


9
Restrictions in Secure Boot mode
     (SP3 only, not relevant for openSUSE)
      •   A controversial topic, at minimal :)
      •   SP3 will have basic enablement for Secure Boot, but
          will have some gaps (mostly for servers):
            ‒   Kexec / Kdump are disabled
      •   No direct access to IO port, must use kernel
          interface
            ‒   KMS drivers are required for graphics card
      •   No direct access to memory
            ‒   No /dev/mem, no /dev/rmem
      •   Not possible to load unsigned 3rd party modules


10
Implementing Secure Boot support for
<insert your favorite distro name here>
Kernel bits 1/2
      •   Convert kernel as a EFI executable (EFI Stub) =>
          UEFI firmware could boot kernel without bootloader
      •   UEFI variables access from kernel
      •   UEFI clock support (not required)
      •   UEFI getvideomode (flicker-free boot) (not required)
      •   UEFI reboot (not required)
      •   KMS drivers (already done in openSUSE)




12
Kernel bits 2/2
      •   Sign main kernel
      •   Sign all in-tree kernel modules
      •   Generate a “per build” kernel private key to sign out
          of tree kernel modules
      •   Kexec / kdump must be Secure Boot aware
      •   Xen hypervisor need to be Secure Boot aware
      •   Kernel should check its signature (and modules
          signature against bootloader)




13
Bootloaders
      •   Shim loader
      •   Grub2 needs to talk to shim loader
          check kernel signature




14
Build Service
      •   Secure store private key to sign shim loader
      •   Store private kernel build key outside build tree for
          later user
           ‒   Allow this private per-build key to be used for out of tree
               modules




15
Userspace
      •   xf86-video-modesettings (for non accelerated KMS
          drivers, like cirrus, aspeed, mga g200)
      •   Modutils / kmod supports for signature on kernel
          modules (display them, verify them)
      •   Tool to sign kernel / modules (pesign)
      •   Tool to manipulate UEFI keys and variables




16
Installer
      •   Installer DVD image should be Secure Boot aware
          (shim + grub2 should be used)
      •   Installer should also have some kind of signature
          checking (for stage 1, 2..) ?
      •   When started, installer should warn user it will install
          in Secure Boot mode, and what it implies




17
Into the key business
      •   Kernel and bootloader must be signed :
           ‒   <distro> Certificate Authority (best to separate it from the
               one used for package signature). Will be embedded in
               shim loader, to validate signature
           ‒   signing key (not a GPG one but a X.509 RSA 2048). This
               key will be used to sign bootloader (grub2) and kernel




18
“Legal paperwork”
     •   What is required to be signed by Microsoft (acting as UEFI Signing Service):
           ‒   Developer account at https://sysdev.microsoft.com/
           ‒   AuthentiCode certificate (discount at $99 for the first year), which will be used to sign binary to
               Microsoft (might requires some notarised ID)
           ‒   Sign (electronically) Microsoft Logo Program Testing Agreement v3 + UEFI Firmware Agreement
           ‒   Sign a test .exe with AuthentiCode certificate and send it to Microsoft
     •   Once it is done, you will be able to send .efi file (ie shim.efi) to Microsoft for signature:
           ‒   Create a .cab file containing shim.efi (with lcab)
           ‒   Sign it with your AuthentiCode certificate (with osslsigncode)
           ‒   Upload it on Microsoft website (with Silverlight :(
           ‒   Wait
           ‒   … Wait..
           ‒   Retrieved a new .cab file containing signed shim.efi




19
Efitools: the “ultimate” solution ?
Efitools
      •   James Bottomley, under Linux Foundation umbrella, has
          been working on another solution for Secure Boot:
          efitools.
      •   Current solution aka PreBootloader (shim) is bypassing
          most of UEFI services (BootService->LoadImage) and
          do not work with new generation of bootloader
          (gummiboot)
      •   James is proposing an “plugin” which will add its own
          security check.
           ‒   Pro: It had MOK support with this : only hash based, not
               certificate based
           ‒   Con: rely on Platform Infrastructure Spec, which is not part of
               UEFI spec (but is present in all tested Windows 8 systems
               around) ; only hash based, not certificate based

21
Summary
     •   With shim, we are able to get Linux running on today
         shipped systems, without compromising security.


     •   MOK handling allows flexibility for testing, upgrading
         and 3rd party support


     •   In the long term, shim and efitools will merge
         (already announced by both parties)




22
Questions ?




     Thank you.



23

Más contenido relacionado

La actualidad más candente

Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing PolicyModern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Alex Matrosov
 
Cigarette VS Bubble Gum
Cigarette VS Bubble GumCigarette VS Bubble Gum
Cigarette VS Bubble Gum
Naruenart
 

La actualidad más candente (20)

Implementing a UEFI BIOS into an Embedded System
Implementing a UEFI BIOS into an Embedded SystemImplementing a UEFI BIOS into an Embedded System
Implementing a UEFI BIOS into an Embedded System
 
Unified Extensible Firmware Interface (UEFI)
Unified Extensible Firmware Interface (UEFI)Unified Extensible Firmware Interface (UEFI)
Unified Extensible Firmware Interface (UEFI)
 
Uefi and bios
Uefi and biosUefi and bios
Uefi and bios
 
XPDDS17: EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
XPDDS17:  EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...XPDDS17:  EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
XPDDS17: EFI Secure Boot, Shim and Xen: Current Status and Developments - Da...
 
Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing PolicyModern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
Modern Bootkit Trends: Bypassing Kernel-Mode Signing Policy
 
firmware hacking, slash the pineapple for fun (codebali 2015)
firmware hacking, slash the pineapple for fun (codebali 2015)firmware hacking, slash the pineapple for fun (codebali 2015)
firmware hacking, slash the pineapple for fun (codebali 2015)
 
Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016
 
Firmware hacking, slash the pineapple for fun
Firmware hacking, slash the pineapple for funFirmware hacking, slash the pineapple for fun
Firmware hacking, slash the pineapple for fun
 
Windows thin pc
Windows thin pcWindows thin pc
Windows thin pc
 
Upgrade Ubuntu 18.04 Security with Secureboot
Upgrade Ubuntu 18.04 Security with SecurebootUpgrade Ubuntu 18.04 Security with Secureboot
Upgrade Ubuntu 18.04 Security with Secureboot
 
Bios vs uefi
Bios vs uefiBios vs uefi
Bios vs uefi
 
Cigarette VS Bubble Gum
Cigarette VS Bubble GumCigarette VS Bubble Gum
Cigarette VS Bubble Gum
 
C122 a015-en
C122 a015-enC122 a015-en
C122 a015-en
 
MikroTik User Guide
MikroTik User GuideMikroTik User Guide
MikroTik User Guide
 
Data protection in windows
Data protection in windowsData protection in windows
Data protection in windows
 
3494 Enterprise Tape Library
3494 Enterprise Tape Library3494 Enterprise Tape Library
3494 Enterprise Tape Library
 
Cis222 2
Cis222 2Cis222 2
Cis222 2
 
UEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and RealityUEFI Firmware Rootkits: Myths and Reality
UEFI Firmware Rootkits: Myths and Reality
 
Software update for IoT: the current state of play
Software update for IoT: the current state of playSoftware update for IoT: the current state of play
Software update for IoT: the current state of play
 
List of Software tools for encryption
List of Software tools for encryptionList of Software tools for encryption
List of Software tools for encryption
 

Destacado (6)

Boots: #FlywithBoots Social Media
Boots: #FlywithBoots Social MediaBoots: #FlywithBoots Social Media
Boots: #FlywithBoots Social Media
 
Safe and secure programming practices for embedded devices
Safe and secure programming practices for embedded devicesSafe and secure programming practices for embedded devices
Safe and secure programming practices for embedded devices
 
Secureboot Survival Guide
Secureboot Survival GuideSecureboot Survival Guide
Secureboot Survival Guide
 
Design Audit - Boots Pharmacy
Design Audit - Boots PharmacyDesign Audit - Boots Pharmacy
Design Audit - Boots Pharmacy
 
Spring boot
Spring bootSpring boot
Spring boot
 
Epp tipos de botas de seguridad
Epp  tipos de botas de seguridadEpp  tipos de botas de seguridad
Epp tipos de botas de seguridad
 

Similar a Distro Recipes 2013: Secure Boot and Linux: several issues, one solution

Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI security
Denis Gundarev
 
Windows 7 professional Vs Windows 7 enterprise
Windows 7 professional Vs Windows 7 enterpriseWindows 7 professional Vs Windows 7 enterprise
Windows 7 professional Vs Windows 7 enterprise
247infotech
 
Bootkits: past, present & future
Bootkits: past, present & futureBootkits: past, present & future
Bootkits: past, present & future
Alex Matrosov
 
BlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiledBlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiled
BlueHat Security Conference
 

Similar a Distro Recipes 2013: Secure Boot and Linux: several issues, one solution (20)

SUSE shim and things related to it
SUSE shim and things related to itSUSE shim and things related to it
SUSE shim and things related to it
 
Bootkits step by-step-slides-final-v1-release
Bootkits step by-step-slides-final-v1-releaseBootkits step by-step-slides-final-v1-release
Bootkits step by-step-slides-final-v1-release
 
Linux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involvedLinux booting process, Dual booting, Components involved
Linux booting process, Dual booting, Components involved
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI security
 
XPDS14 - Xen in EFI World - Daniel Kiper, Oracle
XPDS14 - Xen in EFI World - Daniel Kiper, OracleXPDS14 - Xen in EFI World - Daniel Kiper, Oracle
XPDS14 - Xen in EFI World - Daniel Kiper, Oracle
 
Windows 8 Client Part 1 "The OS internals for IT-Pro's"
Windows 8 Client Part 1 "The OS internals for IT-Pro's"Windows 8 Client Part 1 "The OS internals for IT-Pro's"
Windows 8 Client Part 1 "The OS internals for IT-Pro's"
 
EFI Secure Key
EFI Secure KeyEFI Secure Key
EFI Secure Key
 
Windows 7 professional Vs Windows 7 enterprise
Windows 7 professional Vs Windows 7 enterpriseWindows 7 professional Vs Windows 7 enterprise
Windows 7 professional Vs Windows 7 enterprise
 
Bootkits: past, present & future
Bootkits: past, present & futureBootkits: past, present & future
Bootkits: past, present & future
 
Linux kernel booting
Linux kernel bootingLinux kernel booting
Linux kernel booting
 
Opening last bits of the infrastructure
Opening last bits of the infrastructureOpening last bits of the infrastructure
Opening last bits of the infrastructure
 
BIOS AND OS
BIOS AND OSBIOS AND OS
BIOS AND OS
 
TC and TPM.ppt
TC and TPM.pptTC and TPM.ppt
TC and TPM.ppt
 
Secret of Intel Management Engine by Igor Skochinsky
Secret of Intel Management Engine  by Igor SkochinskySecret of Intel Management Engine  by Igor Skochinsky
Secret of Intel Management Engine by Igor Skochinsky
 
Case study on chrome os in detail.History, architecture,process
Case study on chrome os in detail.History, architecture,processCase study on chrome os in detail.History, architecture,process
Case study on chrome os in detail.History, architecture,process
 
S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918S4 sig-check-lpc-20130918
S4 sig-check-lpc-20130918
 
Secure boot general
Secure boot generalSecure boot general
Secure boot general
 
docslide-3df5a529-2ffd-ef23.ppt
docslide-3df5a529-2ffd-ef23.pptdocslide-3df5a529-2ffd-ef23.ppt
docslide-3df5a529-2ffd-ef23.ppt
 
BlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiledBlueHat v18 || First strontium uefi rootkit unveiled
BlueHat v18 || First strontium uefi rootkit unveiled
 
Boot process: BIOS vs UEFI
Boot process: BIOS vs UEFIBoot process: BIOS vs UEFI
Boot process: BIOS vs UEFI
 

Más de Anne Nicolas

Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Anne Nicolas
 

Más de Anne Nicolas (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

Distro Recipes 2013: Secure Boot and Linux: several issues, one solution

  • 1. Secure Boot and Linux Frédéric Crozat Senior Software Engineer fcrozat@suse.com
  • 2. Secure Boot: an introduction
  • 3. UEFI ? • For some years now, BIOS is being replaced by firmware following UEFI (Unified Extensible Firmware Interface) specification. • It allows manufacturers to better cope with modern hardware and OS vendors to have a better interface to manage it. • BIOS compatibility can still be available with CSM (Compatibility Support Module) but this will disappear in the near future. • Some UEFI implementations even have a shell :) 3
  • 4. Secure Boot: what is it ? Why now ? • It is a way to prevent pre-OS attack (before bootloader is started), to ensure bootloader and kernel are trusted and not run by a Bootkit • We don't envision Secure Boot as a requirement for servers within the next 3 years • We expect a majority (if not all) of new desktop systems to be shipped with Secure Boot enabled by default (requirement for Windows 8 Desktop) • Secure Boot can be useful for secure servers against boot viruses but not a panacea 4
  • 5. What Secure Boot implies • OS must be signed and its signature accepted by UEFI firmware • To get OS “signature” accepted by UEFI firmware, we need to either: ‒ Inject manually key in firmware (not user friendly) ‒ Use a distribution whose key has been integrated by hardware vendor or signed by UEFI Signing Service (Microsoft is acting as this service). • To ensure Secure Boot can't be easily circumvented, some kernel features can be disabled when running under Secure Boot (distribution policy, to be discussed <insert your troll here>). 5
  • 6. Secure Boot: SUSE solution
  • 7. Our solution to Secure Boot 1/2 • Secure Boot enforces signature on the pre-OS boot environment. • This signature process should still be in the hands of distribution (SUSE/openSUSE) and users. • To allow this modularity, SUSE expanded shim loader (EFI application, created by Matthew Garrett to handle Secure Boot for Linux) to give back freedom to users and prevent locked-in. 7
  • 8. Our solution to Secure Boot 2/2 • Shim loader is signed by UEFI Signing Service and SUSE • It will verify grub2 is signed by SUSE or a key enrolled by user, called Machine Owner Key (MOK) • Then grub2 will boot and do similar check on kernel • And kernel will do the same on modules 8
  • 9. Machine Owner Key (MOK) • Enroll key from the OS (with a password for MOK list), using mokutils tool. • Rebooted is required, where shim will check password: ensure physical user is present. • This key is added to MOK list, saved into in an UEFI Boot Service Only Variable and will be used for future boots to ensure key is not modified. • MOK list can only be modified in Secure Boot phase (before kernel is started). • Enroll can also be done at boot time if key is available on EFI System Partition. 9
  • 10. Restrictions in Secure Boot mode (SP3 only, not relevant for openSUSE) • A controversial topic, at minimal :) • SP3 will have basic enablement for Secure Boot, but will have some gaps (mostly for servers): ‒ Kexec / Kdump are disabled • No direct access to IO port, must use kernel interface ‒ KMS drivers are required for graphics card • No direct access to memory ‒ No /dev/mem, no /dev/rmem • Not possible to load unsigned 3rd party modules 10
  • 11. Implementing Secure Boot support for <insert your favorite distro name here>
  • 12. Kernel bits 1/2 • Convert kernel as a EFI executable (EFI Stub) => UEFI firmware could boot kernel without bootloader • UEFI variables access from kernel • UEFI clock support (not required) • UEFI getvideomode (flicker-free boot) (not required) • UEFI reboot (not required) • KMS drivers (already done in openSUSE) 12
  • 13. Kernel bits 2/2 • Sign main kernel • Sign all in-tree kernel modules • Generate a “per build” kernel private key to sign out of tree kernel modules • Kexec / kdump must be Secure Boot aware • Xen hypervisor need to be Secure Boot aware • Kernel should check its signature (and modules signature against bootloader) 13
  • 14. Bootloaders • Shim loader • Grub2 needs to talk to shim loader check kernel signature 14
  • 15. Build Service • Secure store private key to sign shim loader • Store private kernel build key outside build tree for later user ‒ Allow this private per-build key to be used for out of tree modules 15
  • 16. Userspace • xf86-video-modesettings (for non accelerated KMS drivers, like cirrus, aspeed, mga g200) • Modutils / kmod supports for signature on kernel modules (display them, verify them) • Tool to sign kernel / modules (pesign) • Tool to manipulate UEFI keys and variables 16
  • 17. Installer • Installer DVD image should be Secure Boot aware (shim + grub2 should be used) • Installer should also have some kind of signature checking (for stage 1, 2..) ? • When started, installer should warn user it will install in Secure Boot mode, and what it implies 17
  • 18. Into the key business • Kernel and bootloader must be signed : ‒ <distro> Certificate Authority (best to separate it from the one used for package signature). Will be embedded in shim loader, to validate signature ‒ signing key (not a GPG one but a X.509 RSA 2048). This key will be used to sign bootloader (grub2) and kernel 18
  • 19. “Legal paperwork” • What is required to be signed by Microsoft (acting as UEFI Signing Service): ‒ Developer account at https://sysdev.microsoft.com/ ‒ AuthentiCode certificate (discount at $99 for the first year), which will be used to sign binary to Microsoft (might requires some notarised ID) ‒ Sign (electronically) Microsoft Logo Program Testing Agreement v3 + UEFI Firmware Agreement ‒ Sign a test .exe with AuthentiCode certificate and send it to Microsoft • Once it is done, you will be able to send .efi file (ie shim.efi) to Microsoft for signature: ‒ Create a .cab file containing shim.efi (with lcab) ‒ Sign it with your AuthentiCode certificate (with osslsigncode) ‒ Upload it on Microsoft website (with Silverlight :( ‒ Wait ‒ … Wait.. ‒ Retrieved a new .cab file containing signed shim.efi 19
  • 21. Efitools • James Bottomley, under Linux Foundation umbrella, has been working on another solution for Secure Boot: efitools. • Current solution aka PreBootloader (shim) is bypassing most of UEFI services (BootService->LoadImage) and do not work with new generation of bootloader (gummiboot) • James is proposing an “plugin” which will add its own security check. ‒ Pro: It had MOK support with this : only hash based, not certificate based ‒ Con: rely on Platform Infrastructure Spec, which is not part of UEFI spec (but is present in all tested Windows 8 systems around) ; only hash based, not certificate based 21
  • 22. Summary • With shim, we are able to get Linux running on today shipped systems, without compromising security. • MOK handling allows flexibility for testing, upgrading and 3rd party support • In the long term, shim and efitools will merge (already announced by both parties) 22
  • 23. Questions ? Thank you. 23