HYDRA: HYbrid Design for Remote Attestation (Using a Formally - - PowerPoint PPT Presentation

hydra hybrid design for remote attestation
SMART_READER_LITE
LIVE PREVIEW

HYDRA: HYbrid Design for Remote Attestation (Using a Formally - - PowerPoint PPT Presentation

HYDRA: HYbrid Design for Remote Attestation (Using a Formally Verified Microkernel) Karim Eldefrawy , Norrathep Rattanavipanon, Gene Tsudik HRL Labs UC Irvine UC Irvine (Currently at SRI) July 18, 2017 karim.eldefrawy@sri.com IoT/CPS/ES 2


slide-1
SLIDE 1

HYDRA: HYbrid Design for Remote Attestation

(Using a Formally Verified Microkernel)

Karim Eldefrawy, Norrathep Rattanavipanon, Gene Tsudik

July 18, 2017 karim.eldefrawy@sri.com

HRL Labs (Currently at SRI) UC Irvine UC Irvine

slide-2
SLIDE 2

IoT/CPS/ES

2

slide-3
SLIDE 3

3

★ CPU ★ Clock ★ Program and data memory ★ In addition to:

○ Comm interfaces (USB, CAN, Serial, WiFi, Ethernet …) ○ Analog to digital converters

Low/Medium-end Embedded Systems

slide-4
SLIDE 4

Remote Attestation (RA)

★ Remote verification of internal state of a prover by a verifier

○ Secure updates, deletion/erasure and resetting

★ Challenge-response protocol between

○ Trusted Verifier : powerful entity ○ Untrusted Prover : embedded device

Verifier Prover

1) challenge 3) response 2) checksum (e.g. MAC or Signature) 4) verify

4

slide-5
SLIDE 5

Design of RA

★ Hardware-only Attestation

○ Secure hardware (e.g., TPM) ○ Overkill for medium/low-end IoT/embedded devices

★ Software-only Attestation

○ A.k.a. timing-based attestation ○ Does not support multi-hop communication ○ Underlying assumptions (seriously) challenged [1]

★ Hybrid Attestation

○ Minimal hardware support for secure RA

[1] C. Castellucia, et al. On the difficulty of Software-Based Attestation of Embedded Devices, CCS 2009.

5

slide-6
SLIDE 6

Design of RA

★ Hardware-only Attestation

○ Secure hardware (e.g., TPM) ○ Overkill for medium/low-end IoT/embedded devices

★ Software-only Attestation

○ A.k.a. timing-based attestation ○ Does not support multi-hop communication ○ Underlying assumptions (seriously) challenged [1]

★ Hybrid Attestation

○ Minimal hardware support for secure RA

[1] C. Castellucia, et al. On the difficulty of Software-Based Attestation of Embedded Devices, CCS 2009.

6

slide-7
SLIDE 7

7

Adversary Model

○ Remote: exploits vulnerabilities and injects malware over the network. ○ Local: located sufficiently close to prover and can eavesdrop on, and manipulate the communication channel. ○ Physical: has full (local) physical access to prover and its hardware and can perform physical attacks, e.g., use side channel to extract and/or modify keys and values in memory.

slide-8
SLIDE 8

SMART**

First hybrid design of remote attestation for low-end microcontrollers (MCUs)

8

** K. Eldefrawy, et al. SMART: Secure & Minimal Architecture for (Establishing a Dynamic) Root ofTrust, NDSS’12.

slide-9
SLIDE 9

9

★ CPU ★ Clock ★ Program and data memory ★ In addition to:

○ Comm interfaces (USB, CAN, Serial, WiFi, Ethernet …) ○ Analog to digital converters

Low/Medium-end Embedded Systems

slide-10
SLIDE 10

SMART

Properties 1) Exclusive Access to Key 2) No Leaks 3) Immutability 4) Uninterruptability 5) Controlled Invocation

  • K. Eldefrawy, et al. Secure & Minimal Architecture for (Establishing a Dynamic) Root of Trust, NDSS 2012.
  • A. Francillon, et al. A Minimalist Approach to Remote Attestation, DATE 2014.

10

slide-11
SLIDE 11

SMART

Properties 1) Exclusive Access to Key 2) No Leaks 3) Immutability 4) Uninterruptability 5) Controlled Invocation Hardware Requirement ★ ROM ★ MCU (bus) access controls

11

slide-12
SLIDE 12

SMART

Properties 1) Exclusive Access to Key 2) No Leaks 3) Immutability 4) Uninterruptability 5) Controlled Invocation Hardware Requirement ★ ROM ★ MCU (bus) access controls

Can be emulated using a formally verified software component 12

slide-13
SLIDE 13

Hybrid RA Design using seL4

13

slide-14
SLIDE 14

What is it?

  • Formal verification of the OS

kernel ○ Spec Impl Binary

  • Capability-based access control
  • Formally proven access control

enforcement

seL4

14

slide-15
SLIDE 15

What is it?

  • Formal verification of the OS

kernel ○ Spec Impl Binary

  • Capability-based access control
  • Formally proven access control

enforcement

seL4

Why?

  • Emulate hardware-enforced

access controls in SMART

  • Provide isolation of Attestation

Process

15

slide-16
SLIDE 16

What is it?

  • Formal verification of the OS

kernel ○ Spec Impl Binary

  • Capability-based access control
  • Formally proven access control

enforcement

seL4

Why?

  • Emulate hardware-enforced

access controls in SMART

  • Provide isolation of Attestation

Process

How?

Map SMART properties into seL4 configuration

16

slide-17
SLIDE 17

Deriving Configuration

SMART Properties

★ Exclusive Access (E/A) to key ★ No leaks ★ Immutability ★ Uninterruptability ★ Controlled invocation

Att Process Config.

★ E/A to key ★ E/A to virtual address space ★ E/A to executable ★ Secure boot of seL4 and attestation process ★ Highest priority ★ E/A to Thread Control Block (TCB)

17

slide-18
SLIDE 18

Our Approach - HYDRA

★ Run Attestation Process (PRAtt) as initial user-space process

○ Contains capabilities to all objects, e.g. IPC, memory pages, and threads ○ Runs with highest scheduling priority ○ Manages the rest of user-space

18

slide-19
SLIDE 19

Our Approach - HYDRA

★ Run Attestation Process (PRAtt) as initial user-space process

○ Contains capabilities to all objects, e.g. IPC, memory pages and threads ○ Runs with highest scheduling priority ○ Manages the rest of user-space

★ Only spawn new process that does not contain capabilities to PRAtt’s:

○ Executable/Key ○ Working virtual memory ○ TCB

19

slide-20
SLIDE 20

seL4 Kernel PRAtt PR1 PR2 Clock Secure Boot

Bootloader verifies and starts seL4 microkernel Kernel verifies and passes control to PRAtt PRAtt spawns PR1 and PR2 Verifier sends an attestation request to PRAtt PRAtt performs att. and reports back to verifier 1 4 5

MM I/O RAM/Flash ROM

2 3

Verifier

1 2 3 4 5

20

slide-21
SLIDE 21

Implementation

➢ Prototype on I.MX6-SabreLite and Odroid-XU4 ➢ Existing secure boot (High Assurance Boot - HAB) mechanism in Sabre Lite

https://boundarydevices.com/product/sabre-lite-imx6-sbc/ http://www.hardkernel.com/main/products/prdt_info.php

21

slide-22
SLIDE 22

22 HYDRA with net and libs HYDRA w/o net stack HYDRA w/o net and libs seL4 Kernel Only Lines of Code 105,360 68,490 11,938 9,142 Exec Size 574KB 476KB N/A 215KB Operations (I.MX5-SabreLite at 1GHz) 1MB of Memory 20KB of Memory Number of Cycles Percentage Number of Cycles Percentage VerifyRequest 1,604 0.01% 1,604 0.29% Retrieve Memory 3,221,307 10.7% 45,624 8.21% MacMemory 26,880,057 89.29% 508,334 91.5% Total 30,102,968 100% 555,562 100%

Performance 1/3

slide-23
SLIDE 23

23

Performance 2/3

slide-24
SLIDE 24

24

Performance 3/3

slide-25
SLIDE 25

Lessons Learned

25

slide-26
SLIDE 26

Challenges when using seL4

Formal verification of seL4 assumes: ★ Proper initialization of the kernel

○ Motivate using hardware-enforced secure boot

26

slide-27
SLIDE 27

Challenges when using seL4

Formal verification of seL4 assumes: ★ Proper initialization of the kernel

○ Motivate using hardware-enforced secure boot

★ Correct behavior of the underlying hardware

○ Sol: Run seL4 on top of a formally verified processor ○ But does such hardware exist? ○ Not yet … but possible in the future, e.g. CHERI ISA [1] based on Bluespec SystemVerilog [2]

[1] R. N. Watson, et al. Capability hardware enhanced risc instructions: Cheri instruction-set architecture, 2016. [2] R. Nikhil and K. Czeck, BSV by Example. CreateSpace Independent Publishing Platform, 2010

27

slide-28
SLIDE 28

Platform Specific Secure Boot

★ Requires configurable/programmable secure boot ○ Not easy to find in commercial development boards ★ SabreLite’s High Assurance Boot (HAB) ○ Based on a digital signature scheme ○ Configurable through ROM APIs

28

slide-29
SLIDE 29

seL4 seL4 + Signature seL4 + Signature

Rod Ziolkowski, i.MX Applications Processor Trust Architecture, 2013

29

slide-30
SLIDE 30

Ensuring Freshness of Attestation Requests

★ Computational Denial-of-Service from:

○ Bogus requests ○ Delay, replay or reordering attacks

★ Solution: Verify requests!

○ Requires timestamp generated by a reliable read-only clock. ○ Read-only property can be enforced using seL4’s capability. ○ Reliable property requires a (semi-synchronous) real-time clock.

  • F. Brasser, et al. Remote Attestation for Low-End Embedded Devices: the Prover’s Perspective, DAC 2016.

30

slide-31
SLIDE 31

Ensuring Freshness of Attestation Requests

★ No real-time clock driver implementation in Sabre Lite. ★ Workaround by generating pseudo-timestamp using a counter + a secondary storage

○ When PRAtt starts, it loads T0 that was saved before the last reboot. ○ When the first request arrives, compare its timestamp (T1) with T0 ○ Verify request. If success, keep track of T1 and start counter. ○ TS = T1 + counter value ○ Periodically store TS

31

slide-32
SLIDE 32

In Summary

❖ First hybrid design for Remote Attestation using a formally verified microkernel (seL4)

➢ Emulate certain properties that were previously only realizable using hardware features

❖ Prototype on two commercially available platforms ❖ Challenges

➢ seL4 assumptions ➢ Secure boot ➢ Timestamp generation

32

slide-33
SLIDE 33

Questions?

slide-34
SLIDE 34

References

34

slide-35
SLIDE 35

KAttes

t

seL4 Kernel

PRAtt Timer Secure Boot

MM I/O RAM/Flash ROM

35

slide-36
SLIDE 36

KAttes

t

seL4 Kernel PRAtt Timer Secure Boot MM I/O RAM/Flash ROM T0

36

slide-37
SLIDE 37

KAttes

t

seL4 Kernel PRAtt Timer Secure Boot MM I/O RAM/Flash ROM T0

Verifie r

@ T1

37

slide-38
SLIDE 38

KAttes

t

seL4 Kernel PRAtt Timer Secure Boot MM I/O RAM/Flash ROM T0

Verifie r

T1

38

slide-39
SLIDE 39

KAttes

t

seL4 Kernel PRAtt Timer Secure Boot MM I/O RAM/Flash ROM T0

Verifie r

T1 TS = T1 + Timer

39

slide-40
SLIDE 40

Extras - ODROID experiments (for Wisec?)

40

slide-41
SLIDE 41

41