Slide 1

Slide 1 text

DIY: Secure Embedded Projects using Trust Teddy Reed && David Anthony 1 Sunday, February 17, 13

Slide 2

Slide 2 text

Why • Fascination with embedded systems and devices • Popularity of Secure Boot, UEFI, and Trusted Computing • Lack of TPM availability • There are great Linux drivers in tpmdd, unfortunately the devices cannot be purchased without an NDA or cannot interface easily with embedded systems • Hope to inspire community 2 Sunday, February 17, 13

Slide 3

Slide 3 text

What • Short introduction to Trusted Computing focusing on features appealing to embedded developers • Compare criticisms to creativity • UEFI, Linux, and U-Boot drivers for your TPM • Secure Boot example using a TPM for U-Boot • More examples, configuration tutorials, documentation and getting-started “kits” 3 Sunday, February 17, 13

Slide 4

Slide 4 text

Part 1: TPM Trusted Platform Module “A facial recognition system which doesn’t recognize you if you change your shirt” - Ariel Segall 4 Sunday, February 17, 13

Slide 5

Slide 5 text

Secure, Trusted, Verified Boot Software Integrity (Local and Remote) Your Imagination 5 Sunday, February 17, 13

Slide 6

Slide 6 text

Protected Storage Non-Removable Private Keys Measurement Registers Hashing, RNG, Key Generation Apply access control to storage based on logical or physical machine state Allow portable-encrypted private keys, constrain use to a unique platform Track platform execution and apply access control to execution measurement Common crypto functions available to commodity hardware in memory-absent environments Building Blocks 6 Sunday, February 17, 13

Slide 7

Slide 7 text

Measurement Registers Track platform execution and apply access control to execution measurement Building Blocks A measurement register, or Platform Configuration Register (PCR), each 160-bit wide, can ONLY be extended, read, or reset 7 Sunday, February 17, 13

Slide 8

Slide 8 text

Measurement Registers Track platform execution and apply access control to execution measurement Building Blocks A measurement register, or Platform Configuration Register (PCR), each 160-bit wide, can ONLY be extended, read, or reset PCR_Extend(n, hash): PCR(n) := SHA1(PCR(n) + hash) 7 Sunday, February 17, 13

Slide 9

Slide 9 text

Asymmetric Key Cryptography Software Support Building Blocks 8 Sunday, February 17, 13

Slide 10

Slide 10 text

Trusted Computing Terminology • Ownership • Key types • Binding, Sealing • Attestation Appraisal • Measurement 9 Sunday, February 17, 13

Slide 11

Slide 11 text

Trusted Computing Terminology “Take Ownership” - Assigns an owner to the TPM, setting the owner password and creating a “Storage Root Key” (SRK) Clearable, Repeatable • Ownership • Key types • Binding, Sealing • Attestation Appraisal • Measurement 10 Sunday, February 17, 13

Slide 12

Slide 12 text

Trusted Computing Terminology Endorsement (TPM Identity) SRK - Root of key hierarchy transitive parent key Attestation Identity Signing Keys ...more! • Ownership • Key types • Binding, Sealing • Attestation Appraisal • Measurement 11 Sunday, February 17, 13

Slide 13

Slide 13 text

Trusted Computing Terminology • Ownership • Key types • Binding, Sealing • Attestation Appraisal • Measurement Binding - Data encryption with the TPM Endorsement Key Sealing - Data encryption with the additional property of PCR values at the time of encryption Quoting - Like sealing, but produces a signature 12 Sunday, February 17, 13

Slide 14

Slide 14 text

Trusted Computing Terminology Attestation - Vouching for the accuracy of information Appraisal - Assessing the information using a previously defined state • Ownership • Key types • Binding, Sealing • Attestation Appraisal • Measurement 13 Sunday, February 17, 13

Slide 15

Slide 15 text

Trusted Computing Terminology Static Root of Trust Dynamic Root of Trust Cumulative hashes of executables, libraries, scripts, etc. • Ownership • Key types • Binding, Sealing • Attestation Appraisal • Measurement 14 Sunday, February 17, 13

Slide 16

Slide 16 text

Trusted Computing Terminology http://goo.gl/oh21v Ariel Segall’s - Intro to Trusted Computing 101 15 Sunday, February 17, 13

Slide 17

Slide 17 text

Trusted Computing Terminology http://goo.gl/oh21v Trust us Ariel Segall’s - Intro to Trusted Computing 101 15 Sunday, February 17, 13

Slide 18

Slide 18 text

Criticisms Critique Creativity Remote Attestation Abuse and Service Constraints Manufacturer Trust Privacy Distributed Attestation Services Key-use Awareness and DAA Ignorance, EK-less 16 Sunday, February 17, 13

Slide 19

Slide 19 text

Criticisms Critique Creativity Remote Attestation Abuse and Service Constraints Manufacturer Trust Privacy Distributed Attestation Services Key-use Awareness and DAA EK-less TPM 17 Sunday, February 17, 13

Slide 20

Slide 20 text

Criticisms Critique Creativity Remote Attestation Abuse and Service Constraints Manufacturer Trust Privacy Distributed Attestation Services Key-use Awareness and DAA EK-less TPM 18 Sunday, February 17, 13

Slide 21

Slide 21 text

Criticisms Critique Creativity Remote Attestation Abuse and Service Constraints Manufacturer Trust Privacy Distributed Attestation Services Key-use Awareness and DAA EK-less TPM 19 Sunday, February 17, 13

Slide 22

Slide 22 text

Booting securely in the non-embedded world 20 Sunday, February 17, 13

Slide 23

Slide 23 text

Booting securely in the non-embedded world 20 Sunday, February 17, 13

Slide 24

Slide 24 text

OEM Custom UEFI Use ROM or pre-BIOS code to verify firmware signatures (using known or custom signature verification algorithms Check UEFI application, driver, and bootloader signatures against a user or OEM- controlled certificate store Check kernel, ram disk, and additional OS boot data signatures within the boot loader Trusted Grub TBOOT TXT: DRTM Anti-EM 21 Sunday, February 17, 13

Slide 25

Slide 25 text

OEM Custom UEFI Use ROM or pre-BIOS code to verify firmware signatures (using known or custom signature verification algorithms Check UEFI application, driver, and bootloader signatures against a user or OEM- controlled certificate store Check kernel, ram disk, and additional OS boot data signatures within the boot loader Trusted Grub TBOOT TXT: DRTM Anti-EM # 22 Sunday, February 17, 13

Slide 26

Slide 26 text

OEM Custom UEFI Use ROM or pre-BIOS code to verify firmware signatures (using known or custom signature verification algorithms Check UEFI application, driver, and bootloader signatures against a user or OEM- controlled certificate store Check kernel, ram disk, and additional OS boot data signatures within the boot loader Trusted Grub TBOOT TXT: DRTM Anti-EM ü ü ü 22 Sunday, February 17, 13

Slide 27

Slide 27 text

OEM Custom UEFI Use ROM or pre-BIOS code to verify firmware signatures (using known or custom signature verification algorithms Check UEFI application, driver, and bootloader signatures against a user or OEM- controlled certificate store Check kernel, ram disk, and additional OS boot data signatures within the boot loader Trusted Grub TBOOT TXT: DRTM Anti-EM ü ü ü 22 Sunday, February 17, 13

Slide 28

Slide 28 text

OEM Custom UEFI Use ROM or pre-BIOS code to verify firmware signatures (using known or custom signature verification algorithms Check UEFI application, driver, and bootloader signatures against a user or OEM- controlled certificate store Check kernel, ram disk, and additional OS boot data signatures within the boot loader Trusted Grub TBOOT TXT: DRTM Anti-EM ü ü 22 Sunday, February 17, 13

Slide 29

Slide 29 text

OEM Custom UEFI Use ROM or pre-BIOS code to verify firmware signatures (using known or custom signature verification algorithms Check UEFI application, driver, and bootloader signatures against a user or OEM- controlled certificate store Check kernel, ram disk, and additional OS boot data signatures within the boot loader Trusted Grub TBOOT TXT: DRTM Anti-EM ü ü 22 Sunday, February 17, 13

Slide 30

Slide 30 text

OEM Custom UEFI Use ROM or pre-BIOS code to verify firmware signatures (using known or custom signature verification algorithms Check UEFI application, driver, and bootloader signatures against a user or OEM- controlled certificate store Check kernel, ram disk, and additional OS boot data signatures within the boot loader Trusted Grub TBOOT TXT: DRTM Anti-EM ü ü # 22 Sunday, February 17, 13

Slide 31

Slide 31 text

Recap: Measurement • Fancy word for secured-logging • Systems and designers can implement a “static” or “dynamic” root ...of trust measurement • Struggle to add support for measurement • We missed some implementations, please don’t be mad :’( 23 Sunday, February 17, 13

Slide 32

Slide 32 text

Part 2: TPM on your embedded device 24 Sunday, February 17, 13

Slide 33

Slide 33 text

BeagleBone Revision A5, A6 JTAG Emulator (XDS100v2), USB Power, USB Ethernet, UART0 (Serial) Using 1 Micro USB! 25 Sunday, February 17, 13

Slide 34

Slide 34 text

} BeagleBone Revision A5, A6 JTAG Emulator (XDS100v2), USB Power, USB Ethernet, UART0 (Serial) Using 1 Micro USB! Out of the 96 pins (most with 7 configuration modes) almost every interface on the board is easily exposed to your creativity 25 Sunday, February 17, 13

Slide 35

Slide 35 text

} { BeagleBone Revision A5, A6 JTAG Emulator (XDS100v2), USB Power, USB Ethernet, UART0 (Serial) Using 1 Micro USB! Out of the 96 pins (most with 7 configuration modes) almost every interface on the board is easily exposed to your creativity Many supported Linux distributions, great documentation for assembling your own, and compiling your own kernel (even community support for 3.7/3.8) 25 Sunday, February 17, 13

Slide 36

Slide 36 text

USB Ethernet 5/3.3/1.8V MMC0 TPS6517B 256M DDR AM3359 26 Sunday, February 17, 13

Slide 37

Slide 37 text

USB Ethernet 5/3.3/1.8V GPMC I2C 1 I2C 2 SPI MMC0 TPS6517B 256M DDR AM3359 EEPROM MMC1 MMC2 Battery Charger Timer x4 CAN UART x4 27 Sunday, February 17, 13

Slide 38

Slide 38 text

USB Ethernet 5/3.3V, 1.8V GPMC I2C 1 I2C 3 SPI MMC0 TPS6517B 256MB DDR AM3359 EEPROM MMC1 MMC2 Battery Charger Timer x4 CAN UART x4 USB Ethernet 5/3.3/1.8V GPMC I2C 2 SPI MMC0 TPS6517B 256M DDR AM3359 EEPROM MMC2 Battery Charger CAN UART x4 28 Sunday, February 17, 13

Slide 39

Slide 39 text

USB Ethernet 5/3.3V, 1.8V GPMC I2C 1 I2C 3 SPI MMC0 TPS6517B 256MB DDR AM3359 EEPROM MMC1 MMC2 Battery Charger Timer x4 CAN UART x4 Testing Only! USB Ethernet 5/3.3/1.8V GPMC I2C 2 SPI MMC0 TPS6517B 256M DDR AM3359 EEPROM MMC2 Battery Charger CAN UART x4 29 Sunday, February 17, 13

Slide 40

Slide 40 text

USB Ethernet 5/3.3V, 1.8V GPMC I2C 2 I2C 3 SPI MMC0 TPS6517B 256MB DDR AM3359 EEPROM MMC1 MMC2 Battery Charger Timer x4 CAN UART x4 TPM USB Ethernet 5/3.3V, 1.8V GPMC I2C 1 I2C 3 SPI MMC0 TPS6517B 256MB DDR AM3359 EEPROM MMC1 MMC2 Battery Charger Timer x4 CAN UART x4 USB Ethernet 5/3.3/1.8V GPMC I2C 2 SPI MMC0 TPS6517B 256M DDR AM3359 EEPROM MMC2 Battery Charger CAN UART x4 30 Sunday, February 17, 13

Slide 41

Slide 41 text

I2C1_SDA I2C1_SCLK SYS_RESETn CLK Not so exciting here, we use BeagleBone’s I2C1 bus because it is reserved for non-cape components SYS_RESETn is used by the CPU for a soft or hard reset. The AM3359 will pull this line during a soft reset (with a variable frequency), and the hardware will pull it to force a hard reset An separate external clock assures no software control by the system 31 Sunday, February 17, 13

Slide 42

Slide 42 text

Configuration Schematic: Software: • U-Boot/Linux TPM driver (branches for each): http://github.com/theopolis/tpm-i2c-atmel • UEFI I2C TPM SecurityPkg: http://github.com/theopolis/SecurityPkg 32 Sunday, February 17, 13

Slide 43

Slide 43 text

Configuration Schematic: Software: • U-Boot/Linux TPM driver (branches for each): http://github.com/theopolis/tpm-i2c-atmel • UEFI I2C TPM SecurityPkg: http://github.com/theopolis/SecurityPkg What you can’t read that? 32 Sunday, February 17, 13

Slide 44

Slide 44 text

TPM Manufacturers • Atmel • Broadcom • Infineon • Intel • ITE • Nuvoton (?) • Sinosun • STMicro • Toshiba • *Software 33 Sunday, February 17, 13

Slide 45

Slide 45 text

Acquiring a TPM • Atmel AT97SC3204[T] • $6.30 - $6.50 • DigiKey, Mouser, AVNET Express • Option for purchasing EK-less TPM 34 Sunday, February 17, 13

Slide 46

Slide 46 text

( ) | TPM 33MHz Clock Board Alternate Storage 35 Sunday, February 17, 13

Slide 47

Slide 47 text

( ) | TPM 33MHz Clock Board Alternate Storage 36 Sunday, February 17, 13

Slide 48

Slide 48 text

Create a SRTM on the BeagleBone 37 Sunday, February 17, 13

Slide 49

Slide 49 text

Potential for Error • A static root of trust measurement implies a set of routines secured from any software attack possible MMC0’s write-protect pin (P8-42) is multiplexed with others. An SRTM using MMC0 violates the above statement as an attacker can change the MUX setting for the pin, thus disabling the write protecting and changing our initialization routines 38 Sunday, February 17, 13

Slide 50

Slide 50 text

Options • The BeagleBone exposes the AM3359 boot configuration pins, configure them for a default boot of MMC1, and control the WP pin externally • Similar, but use USB or SPI to retrieve the code • Permanently disable writing to the SD card in MMC0 using a PROGRAM_CSD command CMD27 with bit 13 set 39 Sunday, February 17, 13

Slide 51

Slide 51 text

! ROM Code reads a boot config from pins pulled high or low to determine a boot device then reads and executes a loader from device 40 Sunday, February 17, 13

Slide 52

Slide 52 text

! ROM Code reads a boot config from pins pulled high or low to determine a boot device then reads and executes a loader from device The default boot device is MMC1, using partition 1 and a FAT a file called MLO (x-loader) is executed By pulling WP high, we prevent SW modifications to this media* 40 Sunday, February 17, 13

Slide 53

Slide 53 text

! ROM Code reads a boot config from pins pulled high or low to determine a boot device then reads and executes a loader from device The default boot device is MMC1, using partition 1 and a FAT a file called MLO (x-loader) is executed By pulling WP high, we prevent SW modifications to this media* The MLO is called a second-phase loader (SPL), the first phase is the ROM code, and is where we initialize the SRTM 40 Sunday, February 17, 13

Slide 54

Slide 54 text

! ROM Code reads a boot config from pins pulled high or low to determine a boot device then reads and executes a loader from device The default boot device is MMC1, using partition 1 and a FAT a file called MLO (x-loader) is executed By pulling WP high, we prevent SW modifications to this media* The MLO is called a second-phase loader (SPL), the first phase is the ROM code, and is where we initialize the SRTM The SPL reads and measures U-Boot or UEFI from an alternate device (e.g., MMC0) The measurement chain continues into R/W storage 40 Sunday, February 17, 13

Slide 55

Slide 55 text

Use the SRTM for a Secure Boot Implemented with Hashing, Sealing, and Unsealing 41 Sunday, February 17, 13

Slide 56

Slide 56 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot Execute 42 Sunday, February 17, 13

Slide 57

Slide 57 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot SHA1( U-Boot ) PCR_Extend( ) Execute 42 Sunday, February 17, 13

Slide 58

Slide 58 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot SHA1( U-Boot ) PCR_Extend( Sealed U-Boot state ) TPM_Unseal( ) Execute 42 Sunday, February 17, 13

Slide 59

Slide 59 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot SHA1( U-Boot ) PCR_Extend( Sealed U-Boot state ) Halt MLO TPM_Unseal( ) Success Failure U-Boot Execute Execute 42 Sunday, February 17, 13

Slide 60

Slide 60 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot SHA1( U-Boot ) PCR_Extend( Sealed U-Boot state ) Halt MLO TPM_Unseal( ) Success Failure U-Boot Execute Execute 43 Sunday, February 17, 13

Slide 61

Slide 61 text

MLO 1. Initialize TPM: Startup, Selfcheck 2. Verify TPM Configuration (libSboot, libTLCL, TPM driver) 3. Read U-Boot 4. Extend a PCR with U-Boot hash Ok, so before we can secure boot, we must Seal a blob for U-Boot (Where U-Boot is what MLO will eventually execute) 5. Read Sealed U-Boot blob 6. Unseal U-Boot blob 44 Sunday, February 17, 13

Slide 62

Slide 62 text

But one more thing... During the Secure Boot: the second phase loader, called MLO, our SRTM, is verifying that the U-Boot it just read is the expected U-Boot by using the Extended PCR to Seal Remember, we enforce state by Sealing to PCRs This means we must Seal while the PCR is correctly Extended 45 Sunday, February 17, 13

Slide 63

Slide 63 text

A-Priori Secure Boot MLO Read U-Boot OMG Problem! SHA1( U-Boot ) PCR_Extend( ) MLO Unseal Blob U-Boot Write Blob MLO Read U-Boot (Success || Failure) SHA1( U-Boot ) PCR_Extend( ) MLO Unseal Blob MLO Execute U-Boot MLO Act 46 Sunday, February 17, 13

Slide 64

Slide 64 text

OMG Problem! U-Boot Write Blob MLO Execute U-Boot Also: Prevent arbitrary writes using access control on blob storage, in this example we use Physical Presence to enable reading and writing Compile MLO once to allow U-Boot to execute without verification, then a second time with verification enforced 47 Sunday, February 17, 13

Slide 65

Slide 65 text

If MLO is enforcing a Secure Boot, changing the U-Boot binary is not possible, even for an expected patch Aside: We use the TPM’s NVRAM to store blobs for agnostic storage support and to protect the blob from arbitrary writes 48 Sunday, February 17, 13

Slide 66

Slide 66 text

Use the SRTM for a Secure Boot Implemented with Signatures 49 Sunday, February 17, 13

Slide 67

Slide 67 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot Execute 50 Sunday, February 17, 13

Slide 68

Slide 68 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot Execute Signature , 50 Sunday, February 17, 13

Slide 69

Slide 69 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot SHA1( U-Boot ) PCR_Extend( ) Execute Signature , 50 Sunday, February 17, 13

Slide 70

Slide 70 text

Sealed U-Boot state TPM_Unseal( ) MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot SHA1( U-Boot ) PCR_Extend( ) Execute Signature , 50 Sunday, February 17, 13

Slide 71

Slide 71 text

Sealed U-Boot state TPM_Unseal( ) MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot SHA1( U-Boot ) PCR_Extend( ) Halt MLO Success Failure U-Boot Execute Execute Signature , 50 Sunday, February 17, 13

Slide 72

Slide 72 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot SHA1( U-Boot ) PCR_Extend( ) Halt MLO RSAVerify( ) Success Failure U-Boot Execute Execute Signature Signature , 51 Sunday, February 17, 13

Slide 73

Slide 73 text

MLO As long as boot pins are not changed, and device is write-protected MLO Read U-Boot SHA1( U-Boot ) PCR_Extend( ) Halt MLO RSAVerify( ) Success Failure U-Boot Execute Execute Signature Signature Optional , 52 Sunday, February 17, 13

Slide 74

Slide 74 text

A-Priori Secure Boot Compile MLO MLO Read U-Boot (Success || Failure) SHA1( U-Boot ) PCR_Extend( ) Sign U-Boot MLO Act + K(pub) MLO Read Signature RSAVerify( ) Signature 53 Sunday, February 17, 13

Slide 75

Slide 75 text

Note: A SRTM using signatures (certificates) does not require a TPM Well, it really is not a RTM is you are only verifying signatures, it is missing the ‘secure-logging’ block Expected updates to U-Boot will contain a valid signature and not require any change in Secure Boot enforcement 54 Sunday, February 17, 13

Slide 76

Slide 76 text

Use the SRTM for a Secure Boot Implemented with Hashing, Sealing, Unsealing and Signatures 55 Sunday, February 17, 13

Slide 77

Slide 77 text

MLO Success U-Boot Execute via Signature 56 Sunday, February 17, 13

Slide 78

Slide 78 text

MLO Success U-Boot Execute U-Boot #> via Signature 56 Sunday, February 17, 13

Slide 79

Slide 79 text

MLO Success U-Boot Execute U-Boot #> U-Boot #> fatload mmc 0 code.bin 80008000 via Signature * 56 Sunday, February 17, 13

Slide 80

Slide 80 text

MLO Success U-Boot Execute U-Boot #> U-Boot #> fatload mmc 0 code.bin 80008000 U-Boot #> envset bootargs root=/dev/nfs rw nfsroot=172.17.77.175:/export/rootfs via Signature * 56 Sunday, February 17, 13

Slide 81

Slide 81 text

MLO Success U-Boot Execute U-Boot #> U-Boot #> fatload mmc 0 code.bin 80008000 U-Boot #> envset bootargs root=/dev/nfs rw nfsroot=172.17.77.175:/export/rootfs SHA1( CMD, ENV ) PCR_Extend( ) via Signature * 56 Sunday, February 17, 13

Slide 82

Slide 82 text

MLO Success U-Boot Execute U-Boot #> U-Boot #> fatload mmc 0 code.bin 80008000 U-Boot #> envset bootargs root=/dev/nfs rw nfsroot=172.17.77.175:/export/rootfs SHA1( CMD, ENV ) PCR_Extend( ) For every command, and again for env modifications via Signature * 56 Sunday, February 17, 13

Slide 83

Slide 83 text

Finally, repeat the process for the kernel, ramdisk, and flattened device tree using a separate sealed blob, or appropriate signatures There are other ways to execute code in U-Boot, we aim to protect any path leading to execution of a kernel from U-Boot Assure measurement before any possible JMP 57 Sunday, February 17, 13

Slide 84

Slide 84 text

libSboot • Simple example of a Secured Boot • Implemented in U-Boot • Modeled loosely after Chromium’s vboot • Many more features coming http://github.com/theopolis/u-boot-sboot 58 Sunday, February 17, 13

Slide 85

Slide 85 text

Continuing Measurement 59 Sunday, February 17, 13

Slide 86

Slide 86 text

Linux Integrity Measurement Architecture Reporting Appraisal Kernel 60 Sunday, February 17, 13

Slide 87

Slide 87 text

Integrity Log 10 3772aaa767c90b2361cef5f56b2ef1bd4efbd349 ima 8b3f2772dec8248c25ef12ed130a7c52986f4a65 boot_aggregate 10 dc99efa590c706a43792618dde88c590a6942ec7 ima fe932380326d7c51d17bac45f5d1c9f576d19f6c /sbin/init 10 fcaa7505fae70096cb9b6a8ec06ec6400b756aa2 ima 0ddd922ae7f5a6dcf788438db1fe47e9a0641e6d ld-2.15.so 10 501975777299919e49aac14c262d6388eae38e79 ima 8d848950517879e0dd77dc9602cad294b454b05a ld.so.cache 10 195830b88844db79ff994c57022e94da416c486c ima 28c4c3a750f5679b9092b2bb2f98c5f745e422f7 libselinux.so.1 10 770cd9400624a5678da388545df1297e182ccd10 ima 03db374e3cedeaf987db096a034bccb5c5bcf3d0 libc-2.15.so 10 82d48ec5fc4344a18a9d17ec1bf1bd8511f99fe6 ima e801e50a5f3ce7acc6e39b1133bce04120c46c35 libpcre.so.1.0.1 10 81ee4b0bbf4f5b464135e3e3d79b2777bceaa236 ima 869231d2fe1afe45ab284adc0efe5a237509bc7f libdl-2.15.so 10 67f5923749dfa266721ee0d6ad038102297c1170 ima e5f8003967fd31f295a115e1d682dd0169b34592 config 10 24894f13a9def8dd2f18838f04fde4becc184fc3 ima 032663452ea268aa1528bd466dda3738bb59a8f2 libsepol.so.1 /sys/kernel/security/ima/ascii_runtime_measurements PCR, SHA1(file + name), Subsystem, SHA1(content), hint 61 Sunday, February 17, 13

Slide 88

Slide 88 text

Integrity Log 10 3772aaa767c90b2361cef5f56b2ef1bd4efbd349 ima 8b3f2772dec8248c25ef12ed130a7c52986f4a65 boot_aggregate 10 dc99efa590c706a43792618dde88c590a6942ec7 ima fe932380326d7c51d17bac45f5d1c9f576d19f6c /sbin/init 10 fcaa7505fae70096cb9b6a8ec06ec6400b756aa2 ima 0ddd922ae7f5a6dcf788438db1fe47e9a0641e6d ld-2.15.so 10 501975777299919e49aac14c262d6388eae38e79 ima 8d848950517879e0dd77dc9602cad294b454b05a ld.so.cache 10 195830b88844db79ff994c57022e94da416c486c ima 28c4c3a750f5679b9092b2bb2f98c5f745e422f7 libselinux.so.1 10 770cd9400624a5678da388545df1297e182ccd10 ima 03db374e3cedeaf987db096a034bccb5c5bcf3d0 libc-2.15.so 10 82d48ec5fc4344a18a9d17ec1bf1bd8511f99fe6 ima e801e50a5f3ce7acc6e39b1133bce04120c46c35 libpcre.so.1.0.1 10 81ee4b0bbf4f5b464135e3e3d79b2777bceaa236 ima 869231d2fe1afe45ab284adc0efe5a237509bc7f libdl-2.15.so 10 67f5923749dfa266721ee0d6ad038102297c1170 ima e5f8003967fd31f295a115e1d682dd0169b34592 config 10 24894f13a9def8dd2f18838f04fde4becc184fc3 ima 032663452ea268aa1528bd466dda3738bb59a8f2 libsepol.so.1 /sys/kernel/security/ima/ascii_runtime_measurements 10 3772aaa767c90b2361cef5f56b2ef1bd4efbd349 ima 8b3f2772dec8248c25ef12ed130a7c52986f4a65 boot_aggregate 62 Sunday, February 17, 13

Slide 89

Slide 89 text

10 3772aaa767c90b2361cef5f56b2ef1bd4efbd349 ima 8b3f2772dec8248c25ef12ed130a7c52986f4a65 boot_aggregate 10 dc99efa590c706a43792618dde88c590a6942ec7 ima fe932380326d7c51d17bac45f5d1c9f576d19f6c /sbin/init 10 fcaa7505fae70096cb9b6a8ec06ec6400b756aa2 ima 0ddd922ae7f5a6dcf788438db1fe47e9a0641e6d ld-2.15.so 10 501975777299919e49aac14c262d6388eae38e79 ima 8d848950517879e0dd77dc9602cad294b454b05a ld.so.cache 10 195830b88844db79ff994c57022e94da416c486c ima 28c4c3a750f5679b9092b2bb2f98c5f745e422f7 libselinux.so.1 10 770cd9400624a5678da388545df1297e182ccd10 ima 03db374e3cedeaf987db096a034bccb5c5bcf3d0 libc-2.15.so 10 82d48ec5fc4344a18a9d17ec1bf1bd8511f99fe6 ima e801e50a5f3ce7acc6e39b1133bce04120c46c35 libpcre.so.1.0.1 10 81ee4b0bbf4f5b464135e3e3d79b2777bceaa236 ima 869231d2fe1afe45ab284adc0efe5a237509bc7f libdl-2.15.so 10 67f5923749dfa266721ee0d6ad038102297c1170 ima e5f8003967fd31f295a115e1d682dd0169b34592 config 10 24894f13a9def8dd2f18838f04fde4becc184fc3 ima 032663452ea268aa1528bd466dda3738bb59a8f2 libsepol.so.1 Log 63 Sunday, February 17, 13

Slide 90

Slide 90 text

10 3772aaa767c90b2361cef5f56b2ef1bd4efbd349 ima 8b3f2772dec8248c25ef12ed130a7c52986f4a65 boot_aggregate 10 dc99efa590c706a43792618dde88c590a6942ec7 ima fe932380326d7c51d17bac45f5d1c9f576d19f6c /sbin/init 10 fcaa7505fae70096cb9b6a8ec06ec6400b756aa2 ima 0ddd922ae7f5a6dcf788438db1fe47e9a0641e6d ld-2.15.so 10 501975777299919e49aac14c262d6388eae38e79 ima 8d848950517879e0dd77dc9602cad294b454b05a ld.so.cache 10 195830b88844db79ff994c57022e94da416c486c ima 28c4c3a750f5679b9092b2bb2f98c5f745e422f7 libselinux.so.1 10 770cd9400624a5678da388545df1297e182ccd10 ima 03db374e3cedeaf987db096a034bccb5c5bcf3d0 libc-2.15.so 10 82d48ec5fc4344a18a9d17ec1bf1bd8511f99fe6 ima e801e50a5f3ce7acc6e39b1133bce04120c46c35 libpcre.so.1.0.1 10 81ee4b0bbf4f5b464135e3e3d79b2777bceaa236 ima 869231d2fe1afe45ab284adc0efe5a237509bc7f libdl-2.15.so 10 67f5923749dfa266721ee0d6ad038102297c1170 ima e5f8003967fd31f295a115e1d682dd0169b34592 config 10 24894f13a9def8dd2f18838f04fde4becc184fc3 ima 032663452ea268aa1528bd466dda3738bb59a8f2 libsepol.so.1 Log Aggregate PCR10= 64 Sunday, February 17, 13

Slide 91

Slide 91 text

10 3772aaa767c90b2361cef5f56b2ef1bd4efbd349 ima 8b3f2772dec8248c25ef12ed130a7c52986f4a65 boot_aggregate 10 dc99efa590c706a43792618dde88c590a6942ec7 ima fe932380326d7c51d17bac45f5d1c9f576d19f6c /sbin/init 10 fcaa7505fae70096cb9b6a8ec06ec6400b756aa2 ima 0ddd922ae7f5a6dcf788438db1fe47e9a0641e6d ld-2.15.so 10 501975777299919e49aac14c262d6388eae38e79 ima 8d848950517879e0dd77dc9602cad294b454b05a ld.so.cache 10 195830b88844db79ff994c57022e94da416c486c ima 28c4c3a750f5679b9092b2bb2f98c5f745e422f7 libselinux.so.1 10 770cd9400624a5678da388545df1297e182ccd10 ima 03db374e3cedeaf987db096a034bccb5c5bcf3d0 libc-2.15.so 10 82d48ec5fc4344a18a9d17ec1bf1bd8511f99fe6 ima e801e50a5f3ce7acc6e39b1133bce04120c46c35 libpcre.so.1.0.1 10 81ee4b0bbf4f5b464135e3e3d79b2777bceaa236 ima 869231d2fe1afe45ab284adc0efe5a237509bc7f libdl-2.15.so 10 67f5923749dfa266721ee0d6ad038102297c1170 ima e5f8003967fd31f295a115e1d682dd0169b34592 config 10 24894f13a9def8dd2f18838f04fde4becc184fc3 ima 032663452ea268aa1528bd466dda3738bb59a8f2 libsepol.so.1 Log Aggregate Quote( AIK ) + Log PCR10= Aggregate 64 Sunday, February 17, 13

Slide 92

Slide 92 text

10 3772aaa767c90b2361cef5f56b2ef1bd4efbd349 ima 8b3f2772dec8248c25ef12ed130a7c52986f4a65 boot_aggregate 10 dc99efa590c706a43792618dde88c590a6942ec7 ima fe932380326d7c51d17bac45f5d1c9f576d19f6c /sbin/init 10 fcaa7505fae70096cb9b6a8ec06ec6400b756aa2 ima 0ddd922ae7f5a6dcf788438db1fe47e9a0641e6d ld-2.15.so 10 501975777299919e49aac14c262d6388eae38e79 ima 8d848950517879e0dd77dc9602cad294b454b05a ld.so.cache 10 195830b88844db79ff994c57022e94da416c486c ima 28c4c3a750f5679b9092b2bb2f98c5f745e422f7 libselinux.so.1 10 770cd9400624a5678da388545df1297e182ccd10 ima 03db374e3cedeaf987db096a034bccb5c5bcf3d0 libc-2.15.so 10 82d48ec5fc4344a18a9d17ec1bf1bd8511f99fe6 ima e801e50a5f3ce7acc6e39b1133bce04120c46c35 libpcre.so.1.0.1 10 81ee4b0bbf4f5b464135e3e3d79b2777bceaa236 ima 869231d2fe1afe45ab284adc0efe5a237509bc7f libdl-2.15.so 10 67f5923749dfa266721ee0d6ad038102297c1170 ima e5f8003967fd31f295a115e1d682dd0169b34592 config 10 24894f13a9def8dd2f18838f04fde4becc184fc3 ima 032663452ea268aa1528bd466dda3738bb59a8f2 libsepol.so.1 Log Aggregate Quote( AIK ) + Log (Success || Failure) PCR10= Aggregate 64 Sunday, February 17, 13

Slide 93

Slide 93 text

10 3772aaa767c90b2361cef5f56b2ef1bd4efbd349 ima 8b3f2772dec8248c25ef12ed130a7c52986f4a65 boot_aggregate 10 dc99efa590c706a43792618dde88c590a6942ec7 ima fe932380326d7c51d17bac45f5d1c9f576d19f6c /sbin/init 10 fcaa7505fae70096cb9b6a8ec06ec6400b756aa2 ima 0ddd922ae7f5a6dcf788438db1fe47e9a0641e6d ld-2.15.so 10 501975777299919e49aac14c262d6388eae38e79 ima 8d848950517879e0dd77dc9602cad294b454b05a ld.so.cache 10 195830b88844db79ff994c57022e94da416c486c ima 28c4c3a750f5679b9092b2bb2f98c5f745e422f7 libselinux.so.1 10 770cd9400624a5678da388545df1297e182ccd10 ima 03db374e3cedeaf987db096a034bccb5c5bcf3d0 libc-2.15.so 10 82d48ec5fc4344a18a9d17ec1bf1bd8511f99fe6 ima e801e50a5f3ce7acc6e39b1133bce04120c46c35 libpcre.so.1.0.1 10 81ee4b0bbf4f5b464135e3e3d79b2777bceaa236 ima 869231d2fe1afe45ab284adc0efe5a237509bc7f libdl-2.15.so 10 67f5923749dfa266721ee0d6ad038102297c1170 ima e5f8003967fd31f295a115e1d682dd0169b34592 config 10 24894f13a9def8dd2f18838f04fde4becc184fc3 ima 032663452ea268aa1528bd466dda3738bb59a8f2 libsepol.so.1 Log Aggregate Quote( AIK ) + Log (Success || Failure) We can pre-computed possible valid logs PCR10= Aggregate 64 Sunday, February 17, 13

Slide 94

Slide 94 text

IMA calculates boot aggregate IMA measures each subsequent executable and mmap OpenPTS quotes and sends run log to trusted third party for appraisal StrongSwan, Trusted Network Connect Standards, and Network Endpoint Assessment protocols make network access policy decisions based on appraisal 65 Sunday, February 17, 13

Slide 95

Slide 95 text

Compare( ) Quote Policies 66 Sunday, February 17, 13

Slide 96

Slide 96 text

Compare( ) Success Failure Quote Policies Enterprise LAN Limited LAN Device Device 67 Sunday, February 17, 13

Slide 97

Slide 97 text

We can make local policy decisions too! Compare( ) Success Failure Quote Policies Enterprise LAN Limited LAN Device Device 67 Sunday, February 17, 13

Slide 98

Slide 98 text

IMA only measures by default With Linux 3.7, IMA Appraisal extensions are included: (a)IMA-Appraisal-Signature-Extension (b)IMA-Appraisal-Directory-Extension File{i} For all Files: Hash( ) security.ima := (a) Sign( File{i} Hash( ) ) (b) HMAC( File{i}’s metadata++ ) Wait, where did you get that key? 68 Sunday, February 17, 13

Slide 99

Slide 99 text

So..., where did you get that key? We need an HMAC to protect metadata, because we make expected changes The HMAC is protecting against offline attacks Linux Trusted and Encrypted Keys! Use the TPM to seal symmetric keys to state* 69 Sunday, February 17, 13

Slide 100

Slide 100 text

Linux Encryption Keys can be used without a TPM Linux uses Trusted Keys and the TPM to allow key use when an expected state is measured Offline retrieval of the Trusted Key is not possible unless the SRTM is bypassed These keys can be used in other creative ways such as device identity or network data encryption 70 Sunday, February 17, 13

Slide 101

Slide 101 text

Part 3: Gaps, Ideas and You 71 Sunday, February 17, 13

Slide 102

Slide 102 text

Securing your Embedded Devices: Booting • A Secured Boot can be used to maintain expected boot options (the embedded bootstrap does not change often while in production) •User programmable key stores allow the device owner to decide what firmware/ kernel/etc they want to accept 72 Sunday, February 17, 13

Slide 103

Slide 103 text

Securing your Embedded Devices: Measurement • Measurement may continue past booting, into the Operating System execution. While measurement will not protect against runtime attacks, it can enforce expected state •Expected OS executables and libraries can be pre-processed, along with user- defined update signatures 73 Sunday, February 17, 13

Slide 104

Slide 104 text

Securing your Embedded Devices: Attestation • Anonymous, and Identity-based Attestation allows remote services and protocols to enforce state policy •Distributed key infrastructures and trusted parties allow users to attest themselves remotely (remote services can enforce user-defined policys) 74 Sunday, February 17, 13

Slide 105

Slide 105 text

vTPM and XEN I’m not sure... I want to test IBM Software TPM 75 Sunday, February 17, 13

Slide 106

Slide 106 text

IBM Software TPM TCP/IP SW TPM0 SW TPM1 TCG Software Stack (TrouSerS) libtpm IBM TCG Utilities SW TPM2 TCG TPM Test Suite 76 Sunday, February 17, 13

Slide 107

Slide 107 text

IBM Software TPM TCP/IP SW TPM0 SW TPM1 TCG Software Stack (TrouSerS) libtpm IBM TCG Utilities SW TPM2 TCG TPM Test Suite 77 Sunday, February 17, 13

Slide 108

Slide 108 text

IBM Software TPM TCP/IP SW TPM0 SW TPM1 TCG Software Stack (TrouSerS) libtpm IBM TCG Utilities SW TPM2 TCG TPM Test Suite 78 Sunday, February 17, 13

Slide 109

Slide 109 text

Maybe TC/TPM is an overkill • Atmel ATSHA204 (newer version of AT88SA102S) enables identification with protected memory • Allows secure storage for private keys and additional sensitive data • Does not include crypto functions 79 Sunday, February 17, 13

Slide 110

Slide 110 text

Presentation Recap • Trust criticisms are real but we should be able to offer creative advantages • Trusted Computing hardware and concepts are available for embedded development • IMA, OpenPTS, StrongSwan’s NEA are already available, we present an example Secure Boot for U-Boot • More OSS capabilities are needed 80 Sunday, February 17, 13

Slide 111

Slide 111 text

TPM Kits • An Atmel AT97SC3204T (I2C TPM) • 28 Pin SSOP breakout • Maxim DS1077LZ-66+ OSC • 8 Pin SOIC breakout 81 Sunday, February 17, 13

Slide 112

Slide 112 text

82 Sunday, February 17, 13

Slide 113

Slide 113 text

Questions ??? 83 Sunday, February 17, 13