SlideShare a Scribd company logo
Slide 1/43
Introduction to Secure Boot
Jonathan Ben-Avraham
TkOS
June 5, 2019
Revision 0.2
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
1 Preliminaries Slide 2/43
Lecture Overview
1 Preliminaries
Tk Open Systems Ltd
Topics Covered
Embedded Device Attack Surfaces
Attack Types
Security Limitations
Basic Defenses
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
1 Preliminaries 1 Slide 3/43
Tk Open Systems Ltd
Embedded Linux Consulting Company founded in 1996
Oces in Jerusalem (2), Yokneam (1)
21 Employees, 3 contractors, looking to hire new talent
Hundreds of Linux kernel patches contributed, U-Boot,
Buildroot, linux-mtd
Board Support Packages and Board Bring-up
ARM, Intel, Atmel and Xilinx MPSoC
Linux, FreeRTOS, SysGo PikeOS and Greenhills Integrity
DevOps, Linux sysadmin
yba@tkos.co.il
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
1 Preliminaries 2 Slide 4/43
Topics Covered
Attack types and defenses
Description of the bootchain common to most systems
Signicance of an immutable root of trust for secure boot
Description of basic secure boot
Relation of TPM to secure boot
Isolation technologies for protecting the boot environment
Isolation technologies in the run-time environment
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
1 Preliminaries 3 Slide 5/43
Embedded Device Attack Surfaces
Physical attack surface
Embedded devices - consumer, medical, industrial
Communication infrastructure - routers, deployed equipment
Weapons, drones
Logical attack surface
Servers, routers, other physically secure infrastructure
Telephones, laptops
Human attack surface
Security policy, separation of duties, training, controls
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
1 Preliminaries 4 Slide 6/43
Attack Types
Invasive, SoC level
Electron microscope plus Chipjuice, similar tools
Non-invasive, board level
JTAG
Logic analyzer
Side-channel analysis
Network probe or exploit
Human factor attack
spies, corruption, information leakage, self-attack
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
1 Preliminaries 5 Slide 7/43
Security Limitations
Any circuit can be reverse engineered and copied
Any persistent storage can be read unless erased
But data can be hidden or defensively destroyed
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
1 Preliminaries 6 Slide 8/43
Basic Defenses
Hardware level - tamper fuses, anti-tamper memory
components, self-destructive components
Logic level - unique keys per individual device to protect
against class exploits
Human level - security policies, separation of duties, training
and control
For the remainder of this talk about secure boot, We assume
that all of these defenses have been implemented and that the
attack surface is logical at the board level
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot Slide 9/43
Lecture Overview
2 Basic Secure Boot
Overview of Basic Secure Boot
Boot Chain
Typical Embedded Bootchain
ROM Bootloader
ROM Bootloader Functions
Second Program Loader (SPL)
Main Bootloader
OS Kernel
Initramfs (Initial RAM Filesystem)
Basic Secure Boot Chain of Trust
Comparison with PC Bootchain
Basic Secure Bootchain Vulnerabilities
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 1 Slide 10/43
Overview of Basic Secure Boot
Bootchain and boot environment
Authentication with digital signatures
Optional encrypting executables
Hardware and software isolation of the boot context
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 2 Slide 11/43
Boot Chain
The boot chain is the set of instructions that device executes
between power-on and application initialization.
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 3 Slide 12/43
Typical Embedded Bootchain
Microcode ROM bootloader, First stage bootloader, Primary
bootloader
SPL, (Second Program Loader) MLO (memory locator) in
TI terminology
Main bootloader - aboot, x-loader, U-Boot, GRUB
OS kernel or hypervisor
Initramfs (initial RAM lesystem)
Root lesystem
Device application code
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 4 Slide 13/43
ROM Bootloader
Installed on the SoC by the vendor but sometimes can be
updated
Size in tens of KB
No user interface - does not assume a serial port is available
Runs from internal SoC NVRAM
Some implementations can be fused OTP (optionally) to make
immutable
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 5 Slide 14/43
ROM Bootloader Functions
Initializes clocks, power supplies and media peripherals
Selects boot media (optional)
Reads SPL le from boot media and loads to SRAM
Veries SPL digital signature (optional)
Decrypts SPL (optional)
Starts SPL execution
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 6 Slide 15/43
Second Program Loader (SPL)
Small enough (typically less than 64KB) to run in SRAM
Resides on internal or external media
Runs from persistent media or SRAM
Initializes just enough hardware (SDRAM at least) to boot the
next stage
Can boot an OS kernel directly (called Falcon mode in
U-Boot)
Highly SoC-specic
Might not even initialize a serial port for console output but
usually does
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 7 Slide 16/43
Main Bootloader
Provides extra boot functionality such as network boot
Typically 200-700 KB size
Runs from SDRAM
Supports a wide range of peripheral devices
Can select kernel, device tree blobs (DTB's), initramfs (initial
RAM lesystem) les
Can have a command line interface
Can be scriptable - can be used to automate software
installation
Can often use SoC crypto engine to verify digital signatures
Not always required or desired, i.e. xed boot conguration
and minimal boot time required
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 8 Slide 17/43
OS Kernel
Re-allocates SDRAM, replacing memory-resident main
bootloader code
Can mount an initramfs or mount a root lesystem directly
Can have encrypted lesystem drivers to mount from
encrypted media
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 9 Slide 18/43
Initramfs (Initial RAM Filesystem)
Typically a small lesystem of 1-5 MB containing a libc of
some type and a shell (command-line) interpreter
Can load additional device driver les (kernel modules)
Can check read-only lesystem signatures or hashes
Can install OTA OS updates
Can mount encrypted root lesystem and transfer control
(switch_root)
Not always required or desired - increases boot time
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 10 Slide 19/43
Basic Secure Boot Chain of Trust
Digital certicates, decryption keys and hashes stored in the
SoC's OTP ash and fused (immutable root of trust)
Boot ROM - fused read-only (immutable) by developer in
production mode
SPL, main bootloader - encrypted and signed, veried by boot
ROM
Kernel and initramfs - encrypted and signed, veried by main
bootloader
Initramfs mounts encrypted root lesystem from media using
encryption key in OTP NVRAM
Root lesystem script checks digital signature of application
le, then executes
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 11 Slide 20/43
Comparison with PC Bootchain
BIOS or UEFI is provided by board vendor
Cannot easily be modied or replaced by developer
Source code is not usually provided
BIOS and UEFI provide equivalent of boot ROM, SPL and
some features of main bootloader
BIOS's do not provide encryption services or immutable data
storage
UEFI provides encryption services, but...
Requires vendor-provided hardware immutability such as Intel
Boot Guard.
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
2 Basic Secure Boot 12 Slide 21/43
Basic Secure Bootchain Vulnerabilities
Basic secure bootchain is actually pretty good, but:
No hardware enforced media isolation
Application programs have access to media containing SPL,
main bootloader and kernel, allowing copying for later analysis
Direct access to TPM or SoC crypto engine
Application programs have direct access to SoC crypto engine
or TPM allowing exploitation of vulnerabilities
Later bootchain crypto keys must be stored in later images
A root lesystem dm_crypt key must be sequestered in the
bootloader, or initramfs
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
3 NXP HABv4 Slide 22/43
Lecture Overview
3 NXP HABv4
NXP HABv4 Overview
Typical HABv4 Use Case
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
3 NXP HABv4 1 Slide 23/43
NXP HABv4 Overview
Provides infrastructure for basic secure boot on i.MX50,
i.MX53, i.MX6, i.MX7 and i.MX8
Uses RSA public key cryptography
Implemented in silicon in the SoC crypto engine IP block
Extends the SoC boot ROM functionality
Provides digital signature checking and decryption functions
for a boot image
Adds from 15 to 25 ms per MB of boot image to boot time
Extends the U-Boot SPL and main bootloader to provide
digital signature checking and decryption
Well documented, provides tools for image signing
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
3 NXP HABv4 2 Slide 24/43
Typical HABv4 Use Case
i.MX6 ROM boot authenticates and decrypts combined boot
image on eMMC boot partition
Encrypted boot image contains SPL, U-Boot and Linux kernel
and initramfs
Initramfs can mount a dm_crypt root lesystem using a
cleartext encryption key
The initramfs switch_roots to the root lesystem
The kernel frees the initramfs memory, destroying the cleartext
dm_crypt key
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
4 Trusted Platform Module Slide 25/43
Lecture Overview
4 Trusted Platform Module
TPM Overview
TPM Functions
TPM Implementations
TPM Summary
Comparison of HABv4 to TPM
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
4 Trusted Platform Module 1 Slide 26/43
TPM Overview
ISO/IEC 11889
A TPM is similar to a USB or parallel-port software license
dongle
Can tie the software on a device to a unique physical
encryption key
Can contain hashes of les or lesystems to verify integrity
Together with external persistent storage provides immutable
root of trust
Contains an unknowable RSA private key (the SRK) for
sub-key encryption
Facilitates per-unit media encryption keys
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
4 Trusted Platform Module 2 Slide 27/43
TPM Functions
Provides a xed set of standardized functions, both at boot
time and afterwards:
Random number generation
Automatic RSA key generation
SHA-1 and SHA-256 hash generation
Hash-based software metrics to detect modied software and
to enforce DRM
Asymmetric (and symmetric in TPM 2.0) encryption functions
External private key encryption using TPM device internal key
(Storage Root Key - SRK)
Often implemented as a surface mount component with SPI
interface
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
4 Trusted Platform Module 3 Slide 28/43
TPM Implementations
TPM can be implemented as:
Discrete chip - often with tamper resistance
Integrated TPM on SoC
Firmware TPM - must be protected by additional means such
as a Trusted Execution Environment
Software - A software TPM can be protected by running in a
virtual machine
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
4 Trusted Platform Module 4 Slide 29/43
TPM Summary
Wide range of vendor discretion in hardware and software
functions an implementation methods.
There is nothing magic about a TPM hardware implementation
Its presence does not in itself provide security
Data encrypted with an SRK is unrecoverable if the TPM is
reset or broken
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
4 Trusted Platform Module 5 Slide 30/43
Comparison of HABv4 to TPM
NXP i.MX crypto engine can store decryption keys (the root of
trust) that the developer generates
But it cannot generate keys by itself
A TPM generates its SRK by itself, internally
But the SRK private key cannot be exported from the TPM,
only the public key is exported
TPM does not store certicates or the root of trust, external
persustent storage is required
HABv4 basic secure boot can use the same private key for
many device units
A TPM-based secure boot uses keys that are unique to each
device
NXP i.MX crypto engine OTP is not designed to store
software metric hashes
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation Slide 31/43
Lecture Overview
5 Boot Isolation
Co-Processor Isolation of Boot Context
ARM TrustZone Design
ARM TrustZone Advantages
Secure Boot using ARM TrustZone
Boot Isolation using a Software Hypervisor
Comparison of ARM TrustZone with Hypervisor Isolation
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation 1 Slide 32/43
Co-Processor Isolation of Boot Context
The boot context is the SPL and main bootloader code, and
optionally the OS kernel and initramfs
Isolation achieved by adding a physical co-processor for boot
loading
The boot co-processor shares the same SDRAM as the main
processor
The boot media is accessible to the co-processor but not to
the main processor
TPM accessible only to co-processor
Examples: AMD Platform Security Processor (PSP),
Qualcomm 8084
Advantages: Complete isolation of boot media from
application environment
Disadvantages: A lot of extra silicon
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation 2 Slide 33/43
Co-processor Boot
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation 3 Slide 34/43
ARM TrustZone Design
A co-processor implemented as a processor mode with banked
CPU registers
Like ARM FIQ mode, but with extensions for bus and memory
access
Like Hyperthreading or hardware virtualization in Intel x86
architecture
Separated bus access mode
Separated SDRAM access mode - 33rd address bit
Available on Cortex-A architectures
Enables creation of a Trusted Execution Environment (TEE)
Implementation is highly SoC designer dependent
Is not itself virtualizable with ARM hardware virtualization -
only one per core
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation 4 Slide 35/43
ARM TrustZone Design
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation 5 Slide 36/43
ARM TrustZone Advantages
Low silicon overhead compared with co-processor
Powerful - can run a general operating system such as Linux -
M4 cannot
Flexible functionality - can be extended after deployment with
trustlets
Can have access to all buses and devices - unlike boot
co-processor
Can monitor the Rich World OS and media continuously
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation 6 Slide 37/43
Secure Boot using ARM TrustZone
Depends on SoC implementation of the TrustZone
Boot ROM starts the CPU in TrustZone mode and boots the
SPL in SRAM
SPL copies the main bootloader, or a trusted OS kernel and
lesystem into SDRAM
The trusted OS copies the application kernel into SDRAM, sets
the program counter and moves the CPU to non-trusted mode
There are now two distinct OS kernels in SDRAM
...and two distinct OS's running on the same CPU core
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation 7 Slide 38/43
Boot Isolation using a Software Hypervisor
The hypervisor code is trusted but constant (not exible as in
TEE)
The hypervisor runs in privileged mode
The application domains run in unprivileged mode
To run in a hypervisor domain, standard OS's such as Linux
must built to support paravirtualization
Major Linux distros provide dual mode kernels
A Linux kernel running as a hypervisor domain (guest) runs in
unprivileged mode
Communication between application domains via hypervisor
message queue only
Hypervisor conguration determines domain peripheral access
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation 8 Slide 39/43
Hypervisor Isolation
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
5 Boot Isolation 9 Slide 40/43
Comparison of ARM TrustZone with Hypervisor Isolation
Hypervisors provide software isolation, TrustZone is
hardware isolation
Hypervisor is CPU-only, does not segregate bus access, so is
open to DMA attacks
Hypervisors can generally be ported to many dierent
non-ARM architectures
A hypervisor can be run as an ARM Rich World OS to provide
a hybrid security model
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
6 Other Isolation Technologies Slide 41/43
Lecture Overview
6 Other Isolation Technologies
Intel Software Guard Extensions (SGX)
SGX Use Case
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
6 Other Isolation Technologies 1 Slide 42/43
Intel Software Guard Extensions (SGX)
CPU Memory Encryption engine (MEE) for on-the-y
encryption and decryption of code and data memory enclaves
Available in both privileged and non-privileged modes
Prevents even privileged code outside the enclave from reading
from the enclave
Writes to persistent storage from enclaves are automatically
encrypted
Designed for user-space application self-defense against
privileged attacks
Code run in enclaves must be signed, to prevent running
malware in an enclave
Allows running an application securely even on a hacked OS
Implementation of crypto functions on the CPU chip prevents
inter-chip bus snoop attacks
Requires a very large amount of silicon
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
6 Other Isolation Technologies 2 Slide 43/43
SGX Use Case
Proprietary, signed applications are distributed in encrypted
form
A wrapper program creates an enclave for the application code
The wrapper program initiates decryption the proprietary
application inside the enclave
The application runs in the enclave - neither the OS not the
wrapper can see it's code or data
SGX is not supported in Linux yet, although a patch set
available
Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2

More Related Content

What's hot

Stuxnet dc9723
Stuxnet dc9723Stuxnet dc9723
Stuxnet dc9723
Iftach Ian Amit
 
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
 
Tapping into the core
Tapping into the coreTapping into the core
Tapping into the core
Positive Hack Days
 
Slide used at ACM-SAC 2014 by Suzaki
Slide used at ACM-SAC 2014 by SuzakiSlide used at ACM-SAC 2014 by Suzaki
Slide used at ACM-SAC 2014 by Suzaki
Kuniyasu Suzaki
 
ARM: Trusted Zone on Android
ARM: Trusted Zone on AndroidARM: Trusted Zone on Android
ARM: Trusted Zone on Android
Kan-Han (John) Lu
 
Defeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode RootkitsDefeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode Rootkits
Alex Matrosov
 
Sdk For Firmware Development
Sdk For Firmware DevelopmentSdk For Firmware Development
Sdk For Firmware Development
Ramesh Prasad
 
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
Eric Koeppen
 
Intel Trusted eXecution Technology
Intel Trusted eXecution TechnologyIntel Trusted eXecution Technology
Intel Trusted eXecution Technology
Bibhu Biswal
 
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kuniyasu Suzaki
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
Linaro
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
Kuniyasu Suzaki
 
Trusted computing introduction and technical overview
Trusted computing introduction and technical overviewTrusted computing introduction and technical overview
Trusted computing introduction and technical overview
Sajid Marwat
 
XPDDS17: Introduction to Intel SGX and SGX Virtualization - Kai Huang, Intel
XPDDS17: Introduction to Intel SGX and SGX Virtualization - Kai Huang, IntelXPDDS17: Introduction to Intel SGX and SGX Virtualization - Kai Huang, Intel
XPDDS17: Introduction to Intel SGX and SGX Virtualization - Kai Huang, Intel
The Linux Foundation
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 
Q2.12: Power Management Across OSs
Q2.12: Power Management Across OSsQ2.12: Power Management Across OSs
Q2.12: Power Management Across OSs
Linaro
 
Defeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL RootkitDefeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL Rootkit
Alex Matrosov
 
LCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solution
Linaro
 
LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted Firmware
Linaro
 

What's hot (20)

Stuxnet dc9723
Stuxnet dc9723Stuxnet dc9723
Stuxnet dc9723
 
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
 
Tapping into the core
Tapping into the coreTapping into the core
Tapping into the core
 
Slide used at ACM-SAC 2014 by Suzaki
Slide used at ACM-SAC 2014 by SuzakiSlide used at ACM-SAC 2014 by Suzaki
Slide used at ACM-SAC 2014 by Suzaki
 
ARM: Trusted Zone on Android
ARM: Trusted Zone on AndroidARM: Trusted Zone on Android
ARM: Trusted Zone on Android
 
Defeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode RootkitsDefeating x64: Modern Trends of Kernel-Mode Rootkits
Defeating x64: Modern Trends of Kernel-Mode Rootkits
 
Sdk For Firmware Development
Sdk For Firmware DevelopmentSdk For Firmware Development
Sdk For Firmware Development
 
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
 
Intel Trusted eXecution Technology
Intel Trusted eXecution TechnologyIntel Trusted eXecution Technology
Intel Trusted eXecution Technology
 
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
Kernel Memory Protection by an Insertable Hypervisor which has VM Introspec...
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
 
Trusted computing introduction and technical overview
Trusted computing introduction and technical overviewTrusted computing introduction and technical overview
Trusted computing introduction and technical overview
 
XPDDS17: Introduction to Intel SGX and SGX Virtualization - Kai Huang, Intel
XPDDS17: Introduction to Intel SGX and SGX Virtualization - Kai Huang, IntelXPDDS17: Introduction to Intel SGX and SGX Virtualization - Kai Huang, Intel
XPDDS17: Introduction to Intel SGX and SGX Virtualization - Kai Huang, Intel
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 
Q2.12: Power Management Across OSs
Q2.12: Power Management Across OSsQ2.12: Power Management Across OSs
Q2.12: Power Management Across OSs
 
Defeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL RootkitDefeating x64: The Evolution of the TDL Rootkit
Defeating x64: The Evolution of the TDL Rootkit
 
LCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solutionLCA14: LCA14-502: The way to a generic TrustZone® solution
LCA14: LCA14-502: The way to a generic TrustZone® solution
 
LCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted FirmwareLCU14 500 ARM Trusted Firmware
LCU14 500 ARM Trusted Firmware
 

Similar to Tkos secure boot_lecture_20190605

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
CODE BLUE
 
Rloader, alternative tech to achieve fast boot time for ARM Linux
Rloader, alternative tech to achieve fast boot time for ARM LinuxRloader, alternative tech to achieve fast boot time for ARM Linux
Rloader, alternative tech to achieve fast boot time for ARM Linux
matt_hsu
 
Enabling TPM 2.0 on coreboot based devices
Enabling TPM 2.0 on coreboot based devicesEnabling TPM 2.0 on coreboot based devices
Enabling TPM 2.0 on coreboot based devices
Piotr Król
 
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
Jonathan MICHEL-VILLAZ
 
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCsw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
CanSecWest
 
BeagleBone Black Booting Process
BeagleBone Black Booting ProcessBeagleBone Black Booting Process
BeagleBone Black Booting Process
SysPlay eLearning Academy for You
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernel
guestf1a032
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
RuggedBoardGroup
 
Bootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus BulletinBootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus Bulletin
ESET
 
Ubuntu 16.04 LTS Security Features
Ubuntu 16.04 LTS Security FeaturesUbuntu 16.04 LTS Security Features
Ubuntu 16.04 LTS Security Features
Dustin Kirkland
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
Omkar Rane
 
Hardware backdooring is practical : slides
Hardware backdooring is practical : slidesHardware backdooring is practical : slides
Hardware backdooring is practical : slides
Moabi.com
 
Android memory analysis Debug slides.pdf
Android memory analysis Debug slides.pdfAndroid memory analysis Debug slides.pdf
Android memory analysis Debug slides.pdf
VishalKumarJha10
 
[Hackito2012] Hardware backdooring is practical
[Hackito2012] Hardware backdooring is practical[Hackito2012] Hardware backdooring is practical
[Hackito2012] Hardware backdooring is practical
Moabi.com
 
Software update for embedded systems
Software update for embedded systemsSoftware update for embedded systems
Software update for embedded systems
SZ Lin
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI security
Denis Gundarev
 
EXAM NOTES for DOD Standard 8570 CompTia Advanced Security Practitioner (CASP)
EXAM NOTES for DOD Standard 8570 CompTia Advanced Security Practitioner (CASP)EXAM NOTES for DOD Standard 8570 CompTia Advanced Security Practitioner (CASP)
EXAM NOTES for DOD Standard 8570 CompTia Advanced Security Practitioner (CASP)
David Sweigert
 
silo.tips_flash-bootloader-product-information.pdf
silo.tips_flash-bootloader-product-information.pdfsilo.tips_flash-bootloader-product-information.pdf
silo.tips_flash-bootloader-product-information.pdf
afra151
 
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
SnehaLatha68
 
Blue Hat IL 2019 - Hardening Secure Boot on Embedded Devices for Hostile Envi...
Blue Hat IL 2019 - Hardening Secure Boot on Embedded Devices for Hostile Envi...Blue Hat IL 2019 - Hardening Secure Boot on Embedded Devices for Hostile Envi...
Blue Hat IL 2019 - Hardening Secure Boot on Embedded Devices for Hostile Envi...
Cristofaro Mune
 

Similar to Tkos secure boot_lecture_20190605 (20)

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
 
Rloader, alternative tech to achieve fast boot time for ARM Linux
Rloader, alternative tech to achieve fast boot time for ARM LinuxRloader, alternative tech to achieve fast boot time for ARM Linux
Rloader, alternative tech to achieve fast boot time for ARM Linux
 
Enabling TPM 2.0 on coreboot based devices
Enabling TPM 2.0 on coreboot based devicesEnabling TPM 2.0 on coreboot based devices
Enabling TPM 2.0 on coreboot based devices
 
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
 
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCsw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
 
BeagleBone Black Booting Process
BeagleBone Black Booting ProcessBeagleBone Black Booting Process
BeagleBone Black Booting Process
 
Joanna Rutkowska Subverting Vista Kernel
Joanna Rutkowska   Subverting Vista KernelJoanna Rutkowska   Subverting Vista Kernel
Joanna Rutkowska Subverting Vista Kernel
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Bootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus BulletinBootkits: Past, Present & Future - Virus Bulletin
Bootkits: Past, Present & Future - Virus Bulletin
 
Ubuntu 16.04 LTS Security Features
Ubuntu 16.04 LTS Security FeaturesUbuntu 16.04 LTS Security Features
Ubuntu 16.04 LTS Security Features
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
 
Hardware backdooring is practical : slides
Hardware backdooring is practical : slidesHardware backdooring is practical : slides
Hardware backdooring is practical : slides
 
Android memory analysis Debug slides.pdf
Android memory analysis Debug slides.pdfAndroid memory analysis Debug slides.pdf
Android memory analysis Debug slides.pdf
 
[Hackito2012] Hardware backdooring is practical
[Hackito2012] Hardware backdooring is practical[Hackito2012] Hardware backdooring is practical
[Hackito2012] Hardware backdooring is practical
 
Software update for embedded systems
Software update for embedded systemsSoftware update for embedded systems
Software update for embedded systems
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI security
 
EXAM NOTES for DOD Standard 8570 CompTia Advanced Security Practitioner (CASP)
EXAM NOTES for DOD Standard 8570 CompTia Advanced Security Practitioner (CASP)EXAM NOTES for DOD Standard 8570 CompTia Advanced Security Practitioner (CASP)
EXAM NOTES for DOD Standard 8570 CompTia Advanced Security Practitioner (CASP)
 
silo.tips_flash-bootloader-product-information.pdf
silo.tips_flash-bootloader-product-information.pdfsilo.tips_flash-bootloader-product-information.pdf
silo.tips_flash-bootloader-product-information.pdf
 
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
Softcore processor.pptxSoftcore processor.pptxSoftcore processor.pptx
 
Blue Hat IL 2019 - Hardening Secure Boot on Embedded Devices for Hostile Envi...
Blue Hat IL 2019 - Hardening Secure Boot on Embedded Devices for Hostile Envi...Blue Hat IL 2019 - Hardening Secure Boot on Embedded Devices for Hostile Envi...
Blue Hat IL 2019 - Hardening Secure Boot on Embedded Devices for Hostile Envi...
 

Recently uploaded

Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 

Recently uploaded (20)

Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 

Tkos secure boot_lecture_20190605

  • 1. Slide 1/43 Introduction to Secure Boot Jonathan Ben-Avraham TkOS June 5, 2019 Revision 0.2 Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 2. 1 Preliminaries Slide 2/43 Lecture Overview 1 Preliminaries Tk Open Systems Ltd Topics Covered Embedded Device Attack Surfaces Attack Types Security Limitations Basic Defenses Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 3. 1 Preliminaries 1 Slide 3/43 Tk Open Systems Ltd Embedded Linux Consulting Company founded in 1996 Oces in Jerusalem (2), Yokneam (1) 21 Employees, 3 contractors, looking to hire new talent Hundreds of Linux kernel patches contributed, U-Boot, Buildroot, linux-mtd Board Support Packages and Board Bring-up ARM, Intel, Atmel and Xilinx MPSoC Linux, FreeRTOS, SysGo PikeOS and Greenhills Integrity DevOps, Linux sysadmin yba@tkos.co.il Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 4. 1 Preliminaries 2 Slide 4/43 Topics Covered Attack types and defenses Description of the bootchain common to most systems Signicance of an immutable root of trust for secure boot Description of basic secure boot Relation of TPM to secure boot Isolation technologies for protecting the boot environment Isolation technologies in the run-time environment Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 5. 1 Preliminaries 3 Slide 5/43 Embedded Device Attack Surfaces Physical attack surface Embedded devices - consumer, medical, industrial Communication infrastructure - routers, deployed equipment Weapons, drones Logical attack surface Servers, routers, other physically secure infrastructure Telephones, laptops Human attack surface Security policy, separation of duties, training, controls Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 6. 1 Preliminaries 4 Slide 6/43 Attack Types Invasive, SoC level Electron microscope plus Chipjuice, similar tools Non-invasive, board level JTAG Logic analyzer Side-channel analysis Network probe or exploit Human factor attack spies, corruption, information leakage, self-attack Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 7. 1 Preliminaries 5 Slide 7/43 Security Limitations Any circuit can be reverse engineered and copied Any persistent storage can be read unless erased But data can be hidden or defensively destroyed Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 8. 1 Preliminaries 6 Slide 8/43 Basic Defenses Hardware level - tamper fuses, anti-tamper memory components, self-destructive components Logic level - unique keys per individual device to protect against class exploits Human level - security policies, separation of duties, training and control For the remainder of this talk about secure boot, We assume that all of these defenses have been implemented and that the attack surface is logical at the board level Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 9. 2 Basic Secure Boot Slide 9/43 Lecture Overview 2 Basic Secure Boot Overview of Basic Secure Boot Boot Chain Typical Embedded Bootchain ROM Bootloader ROM Bootloader Functions Second Program Loader (SPL) Main Bootloader OS Kernel Initramfs (Initial RAM Filesystem) Basic Secure Boot Chain of Trust Comparison with PC Bootchain Basic Secure Bootchain Vulnerabilities Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 10. 2 Basic Secure Boot 1 Slide 10/43 Overview of Basic Secure Boot Bootchain and boot environment Authentication with digital signatures Optional encrypting executables Hardware and software isolation of the boot context Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 11. 2 Basic Secure Boot 2 Slide 11/43 Boot Chain The boot chain is the set of instructions that device executes between power-on and application initialization. Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 12. 2 Basic Secure Boot 3 Slide 12/43 Typical Embedded Bootchain Microcode ROM bootloader, First stage bootloader, Primary bootloader SPL, (Second Program Loader) MLO (memory locator) in TI terminology Main bootloader - aboot, x-loader, U-Boot, GRUB OS kernel or hypervisor Initramfs (initial RAM lesystem) Root lesystem Device application code Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 13. 2 Basic Secure Boot 4 Slide 13/43 ROM Bootloader Installed on the SoC by the vendor but sometimes can be updated Size in tens of KB No user interface - does not assume a serial port is available Runs from internal SoC NVRAM Some implementations can be fused OTP (optionally) to make immutable Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 14. 2 Basic Secure Boot 5 Slide 14/43 ROM Bootloader Functions Initializes clocks, power supplies and media peripherals Selects boot media (optional) Reads SPL le from boot media and loads to SRAM Veries SPL digital signature (optional) Decrypts SPL (optional) Starts SPL execution Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 15. 2 Basic Secure Boot 6 Slide 15/43 Second Program Loader (SPL) Small enough (typically less than 64KB) to run in SRAM Resides on internal or external media Runs from persistent media or SRAM Initializes just enough hardware (SDRAM at least) to boot the next stage Can boot an OS kernel directly (called Falcon mode in U-Boot) Highly SoC-specic Might not even initialize a serial port for console output but usually does Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 16. 2 Basic Secure Boot 7 Slide 16/43 Main Bootloader Provides extra boot functionality such as network boot Typically 200-700 KB size Runs from SDRAM Supports a wide range of peripheral devices Can select kernel, device tree blobs (DTB's), initramfs (initial RAM lesystem) les Can have a command line interface Can be scriptable - can be used to automate software installation Can often use SoC crypto engine to verify digital signatures Not always required or desired, i.e. xed boot conguration and minimal boot time required Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 17. 2 Basic Secure Boot 8 Slide 17/43 OS Kernel Re-allocates SDRAM, replacing memory-resident main bootloader code Can mount an initramfs or mount a root lesystem directly Can have encrypted lesystem drivers to mount from encrypted media Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 18. 2 Basic Secure Boot 9 Slide 18/43 Initramfs (Initial RAM Filesystem) Typically a small lesystem of 1-5 MB containing a libc of some type and a shell (command-line) interpreter Can load additional device driver les (kernel modules) Can check read-only lesystem signatures or hashes Can install OTA OS updates Can mount encrypted root lesystem and transfer control (switch_root) Not always required or desired - increases boot time Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 19. 2 Basic Secure Boot 10 Slide 19/43 Basic Secure Boot Chain of Trust Digital certicates, decryption keys and hashes stored in the SoC's OTP ash and fused (immutable root of trust) Boot ROM - fused read-only (immutable) by developer in production mode SPL, main bootloader - encrypted and signed, veried by boot ROM Kernel and initramfs - encrypted and signed, veried by main bootloader Initramfs mounts encrypted root lesystem from media using encryption key in OTP NVRAM Root lesystem script checks digital signature of application le, then executes Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 20. 2 Basic Secure Boot 11 Slide 20/43 Comparison with PC Bootchain BIOS or UEFI is provided by board vendor Cannot easily be modied or replaced by developer Source code is not usually provided BIOS and UEFI provide equivalent of boot ROM, SPL and some features of main bootloader BIOS's do not provide encryption services or immutable data storage UEFI provides encryption services, but... Requires vendor-provided hardware immutability such as Intel Boot Guard. Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 21. 2 Basic Secure Boot 12 Slide 21/43 Basic Secure Bootchain Vulnerabilities Basic secure bootchain is actually pretty good, but: No hardware enforced media isolation Application programs have access to media containing SPL, main bootloader and kernel, allowing copying for later analysis Direct access to TPM or SoC crypto engine Application programs have direct access to SoC crypto engine or TPM allowing exploitation of vulnerabilities Later bootchain crypto keys must be stored in later images A root lesystem dm_crypt key must be sequestered in the bootloader, or initramfs Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 22. 3 NXP HABv4 Slide 22/43 Lecture Overview 3 NXP HABv4 NXP HABv4 Overview Typical HABv4 Use Case Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 23. 3 NXP HABv4 1 Slide 23/43 NXP HABv4 Overview Provides infrastructure for basic secure boot on i.MX50, i.MX53, i.MX6, i.MX7 and i.MX8 Uses RSA public key cryptography Implemented in silicon in the SoC crypto engine IP block Extends the SoC boot ROM functionality Provides digital signature checking and decryption functions for a boot image Adds from 15 to 25 ms per MB of boot image to boot time Extends the U-Boot SPL and main bootloader to provide digital signature checking and decryption Well documented, provides tools for image signing Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 24. 3 NXP HABv4 2 Slide 24/43 Typical HABv4 Use Case i.MX6 ROM boot authenticates and decrypts combined boot image on eMMC boot partition Encrypted boot image contains SPL, U-Boot and Linux kernel and initramfs Initramfs can mount a dm_crypt root lesystem using a cleartext encryption key The initramfs switch_roots to the root lesystem The kernel frees the initramfs memory, destroying the cleartext dm_crypt key Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 25. 4 Trusted Platform Module Slide 25/43 Lecture Overview 4 Trusted Platform Module TPM Overview TPM Functions TPM Implementations TPM Summary Comparison of HABv4 to TPM Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 26. 4 Trusted Platform Module 1 Slide 26/43 TPM Overview ISO/IEC 11889 A TPM is similar to a USB or parallel-port software license dongle Can tie the software on a device to a unique physical encryption key Can contain hashes of les or lesystems to verify integrity Together with external persistent storage provides immutable root of trust Contains an unknowable RSA private key (the SRK) for sub-key encryption Facilitates per-unit media encryption keys Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 27. 4 Trusted Platform Module 2 Slide 27/43 TPM Functions Provides a xed set of standardized functions, both at boot time and afterwards: Random number generation Automatic RSA key generation SHA-1 and SHA-256 hash generation Hash-based software metrics to detect modied software and to enforce DRM Asymmetric (and symmetric in TPM 2.0) encryption functions External private key encryption using TPM device internal key (Storage Root Key - SRK) Often implemented as a surface mount component with SPI interface Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 28. 4 Trusted Platform Module 3 Slide 28/43 TPM Implementations TPM can be implemented as: Discrete chip - often with tamper resistance Integrated TPM on SoC Firmware TPM - must be protected by additional means such as a Trusted Execution Environment Software - A software TPM can be protected by running in a virtual machine Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 29. 4 Trusted Platform Module 4 Slide 29/43 TPM Summary Wide range of vendor discretion in hardware and software functions an implementation methods. There is nothing magic about a TPM hardware implementation Its presence does not in itself provide security Data encrypted with an SRK is unrecoverable if the TPM is reset or broken Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 30. 4 Trusted Platform Module 5 Slide 30/43 Comparison of HABv4 to TPM NXP i.MX crypto engine can store decryption keys (the root of trust) that the developer generates But it cannot generate keys by itself A TPM generates its SRK by itself, internally But the SRK private key cannot be exported from the TPM, only the public key is exported TPM does not store certicates or the root of trust, external persustent storage is required HABv4 basic secure boot can use the same private key for many device units A TPM-based secure boot uses keys that are unique to each device NXP i.MX crypto engine OTP is not designed to store software metric hashes Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 31. 5 Boot Isolation Slide 31/43 Lecture Overview 5 Boot Isolation Co-Processor Isolation of Boot Context ARM TrustZone Design ARM TrustZone Advantages Secure Boot using ARM TrustZone Boot Isolation using a Software Hypervisor Comparison of ARM TrustZone with Hypervisor Isolation Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 32. 5 Boot Isolation 1 Slide 32/43 Co-Processor Isolation of Boot Context The boot context is the SPL and main bootloader code, and optionally the OS kernel and initramfs Isolation achieved by adding a physical co-processor for boot loading The boot co-processor shares the same SDRAM as the main processor The boot media is accessible to the co-processor but not to the main processor TPM accessible only to co-processor Examples: AMD Platform Security Processor (PSP), Qualcomm 8084 Advantages: Complete isolation of boot media from application environment Disadvantages: A lot of extra silicon Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 33. 5 Boot Isolation 2 Slide 33/43 Co-processor Boot Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 34. 5 Boot Isolation 3 Slide 34/43 ARM TrustZone Design A co-processor implemented as a processor mode with banked CPU registers Like ARM FIQ mode, but with extensions for bus and memory access Like Hyperthreading or hardware virtualization in Intel x86 architecture Separated bus access mode Separated SDRAM access mode - 33rd address bit Available on Cortex-A architectures Enables creation of a Trusted Execution Environment (TEE) Implementation is highly SoC designer dependent Is not itself virtualizable with ARM hardware virtualization - only one per core Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 35. 5 Boot Isolation 4 Slide 35/43 ARM TrustZone Design Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 36. 5 Boot Isolation 5 Slide 36/43 ARM TrustZone Advantages Low silicon overhead compared with co-processor Powerful - can run a general operating system such as Linux - M4 cannot Flexible functionality - can be extended after deployment with trustlets Can have access to all buses and devices - unlike boot co-processor Can monitor the Rich World OS and media continuously Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 37. 5 Boot Isolation 6 Slide 37/43 Secure Boot using ARM TrustZone Depends on SoC implementation of the TrustZone Boot ROM starts the CPU in TrustZone mode and boots the SPL in SRAM SPL copies the main bootloader, or a trusted OS kernel and lesystem into SDRAM The trusted OS copies the application kernel into SDRAM, sets the program counter and moves the CPU to non-trusted mode There are now two distinct OS kernels in SDRAM ...and two distinct OS's running on the same CPU core Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 38. 5 Boot Isolation 7 Slide 38/43 Boot Isolation using a Software Hypervisor The hypervisor code is trusted but constant (not exible as in TEE) The hypervisor runs in privileged mode The application domains run in unprivileged mode To run in a hypervisor domain, standard OS's such as Linux must built to support paravirtualization Major Linux distros provide dual mode kernels A Linux kernel running as a hypervisor domain (guest) runs in unprivileged mode Communication between application domains via hypervisor message queue only Hypervisor conguration determines domain peripheral access Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 39. 5 Boot Isolation 8 Slide 39/43 Hypervisor Isolation Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 40. 5 Boot Isolation 9 Slide 40/43 Comparison of ARM TrustZone with Hypervisor Isolation Hypervisors provide software isolation, TrustZone is hardware isolation Hypervisor is CPU-only, does not segregate bus access, so is open to DMA attacks Hypervisors can generally be ported to many dierent non-ARM architectures A hypervisor can be run as an ARM Rich World OS to provide a hybrid security model Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 41. 6 Other Isolation Technologies Slide 41/43 Lecture Overview 6 Other Isolation Technologies Intel Software Guard Extensions (SGX) SGX Use Case Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 42. 6 Other Isolation Technologies 1 Slide 42/43 Intel Software Guard Extensions (SGX) CPU Memory Encryption engine (MEE) for on-the-y encryption and decryption of code and data memory enclaves Available in both privileged and non-privileged modes Prevents even privileged code outside the enclave from reading from the enclave Writes to persistent storage from enclaves are automatically encrypted Designed for user-space application self-defense against privileged attacks Code run in enclaves must be signed, to prevent running malware in an enclave Allows running an application securely even on a hacked OS Implementation of crypto functions on the CPU chip prevents inter-chip bus snoop attacks Requires a very large amount of silicon Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2
  • 43. 6 Other Isolation Technologies 2 Slide 43/43 SGX Use Case Proprietary, signed applications are distributed in encrypted form A wrapper program creates an enclave for the application code The wrapper program initiates decryption the proprietary application inside the enclave The application runs in the enclave - neither the OS not the wrapper can see it's code or data SGX is not supported in Linux yet, although a patch set available Intro to Secure Boot Copyright c Tk Open Systems 2019 Revision 0.2