Cycle Jerry Backer (1) , David Hly (2) and Ramesh Karri (1) - - PowerPoint PPT Presentation

cycle
SMART_READER_LITE
LIVE PREVIEW

Cycle Jerry Backer (1) , David Hly (2) and Ramesh Karri (1) - - PowerPoint PPT Presentation

SoC Security Through the Life Cycle Jerry Backer (1) , David Hly (2) and Ramesh Karri (1) Polytechnic School of Engineering, New York University Universit Grenoble Alpes, LCIS, Valence 1 Agenda Introduction SoC lifecycle Test


slide-1
SLIDE 1

SoC Security Through the Life Cycle

Jerry Backer(1), David Hély(2) and Ramesh Karri(1)

1

Polytechnic School of Engineering, New York University Université Grenoble Alpes, LCIS, Valence

slide-2
SLIDE 2

Agenda

  • Introduction

– SoC lifecycle – Test and Debug – Motivations

  • Focus on Debug Security

– Debug and SoC – Debug Threats – A secure Debug mechanism

  • Leveraging Test and Debug features for System Security

– Software threats – Test based countermeasure – Debug based countermeasure

  • Conclusions and Perspectives

2

slide-3
SLIDE 3

Syste System On Chip: T m On Chip: The he Stak Stakeholder eholders

  • System on Chip Architect
  • Specify the system
  • Components designers
  • Design on purpose components
  • System Integrator
  • Integrates the components
  • Fabrication Engineers
  • Manufacture the IC
  • Test the IC
  • Package the IC
  • Personalization Engineers
  • Configure the IC to the

customers

  • OS Providers
  • 3rd Party SW developers

3

  • J. Backer, D. Hely and R. Karri
slide-4
SLIDE 4

System System On Chi On Chip: T p: Test and est and De Debug bug

All need dedicated access to the system in order to:

  • Test the SoC: Check Fabrication has been properly

carried out

  • Debug the system (either hardware or software)

Extra Hardware is added to offer to the SoC stakeholders extra observability/controllability of the internal system What about Security?

4

slide-5
SLIDE 5
  • SoC Integration
  • SoC Integration

5

Main CPU 8051 μCont OTP DMAC AES Mem Cont.

SoC SoC Inte Integration tion

slide-6
SLIDE 6
  • SoC Integration
  • Test/Debug Layer: IP cores configured with internal scan chains,

wrapped for test, and connected via a test access mechanism (TAM) bus

  • SoC Integration

6

3PIP Internal Logic

SoC SoC Inte Integration tion

slide-7
SLIDE 7
  • SoC Integration
  • Test/Debug Layer: IP cores configured with internal scan chains,

wrapped for test, and connected via a test access mechanism (TAM) bus

  • SoC Integration

7

internal scan cells

SoC SoC Inte Integration tion

slide-8
SLIDE 8
  • SoC Integration
  • Test/Debug Layer: IP cores configured with internal scan chains,

wrapped for test, and connected via a test access mechanism (TAM) bus

  • SoC Integration

8

WBY WIR WBR WBR

WSO WSI WSC

SoC SoC Inte Integration tion

slide-9
SLIDE 9
  • SoC Integration
  • Test/Debug Layer: IP cores configured with internal scan chains,

wrapped for test, and connected via a test access mechanism (TAM) bus

  • SoC Integration

9

WBY WIR WBR WBR

WSO WSI WSC

  • Wrapper Boundary Register (WBR)
  • Wrapper Serial Input (WSI)
  • Wrapper Serial Output (WSO
  • Wrapper Bypass Register (WBY)
  • Wrapper Instruction Register (WIR)
  • Wrapper Serial Control (WSC)
  • selectWIR
  • shiftWR
  • captureWR
  • updateWR

SoC SoC Inte Integration tion

slide-10
SLIDE 10
  • SoC Integration
  • Test/Debug Layer: IP cores configured with internal scan chains,

wrapped for test, and connected via a test access mechanism (TAM) bus

  • SoC Integration

10

Main CPU WSO WSI WSC OTP WSO WSI WSC 8051 μCont WSO WSI WSC Test Interface TAM Bus WBR WBR WBR

SoC SoC Inte Integration tion

slide-11
SLIDE 11
  • SoC Integration
  • Functional Layer: IP cores interconnected to meet functional
  • specifications. Connections done via system bus, network-on-chip (NoC),

sideband and coherence interfaces

  • SoC Integration

11

Main CPU 8051 μCont OTP DMAC AES Mem Cont.

System bus

slide-12
SLIDE 12
  • Scan-based side-channel attack via test layer
  • Goal: Use internal scan cells to leak assets such as encryption keys
  • Case study: AES core [1][2]

1. Put SoC in normal mode 2. Use functional input ports to set AES plaintext 3. Run AES for one round 4. Switch SoC to test mode 5. Shift out round output via test output port (e.g. WSO port) 6. Analyze output* 7. Repeat until key is obtain

  • * Differential analysis by tracing bit flips between plaintexts and ciphertexts

12

  • Scan-based Side Channel Attack

Test Lay est Layer er Attac Attack

slide-13
SLIDE 13

Motivations

  • Securing Test and Debug Mecanisms:

– How to keep high observability and controllability for test and debug while guaranteeing a high level of security for the SoC assets?

  • Leveraging Test and Debug hardware for

mission mode security:

– How to reuse the unused test and debug hardware in mission mode to provide new security services?

13

slide-14
SLIDE 14

Agenda

  • Introduction

– SoC lifecycle – Test and Debug – Motivations

  • Focus on Debug Security

– Debug and SoC – Debug Threats – A secure Debug mechanism

  • Leveraging Debug features for System Security

– Software threats – Test based countermeasure – Debug based countermeasure

  • Conclusions and Perspectives

14

slide-15
SLIDE 15

Who uses the SoC DfD infrastructure?

Debug Instrumentation of Systems-on-Chip

15

slide-16
SLIDE 16

Debug Instrumentation of Systems-on-Chip

μP μP

DSP

System Fabric

LCD

SF SF SF SF SF

Debug Bus Trace Bus

SF JTAG

  • SoC DfD infrastructure
  • Signal filter (SF)
  • Trace bus
  • Debug bus
  • Joint test Access Group (JTAG)

WiFi

16

slide-17
SLIDE 17
  • SoC integrator/debugger
  • Original equipment manufacturer (OEM)
  • Outsourced Semiconductor test and assembly

(OSAT) Post-silicon validation

Debug Instrumentation of Systems-on-Chip

Who uses the SoC DfD infrastructure?

17

slide-18
SLIDE 18

Post-silicon validation

  • SoC integrator
  • OEM
  • O.S. vendor
  • 3rd party software

developer In-field

Debug Instrumentation of Systems-on-Chip

Who uses the SoC DfD infrastructure?

18

slide-19
SLIDE 19

Post-silicon validation

  • SoC

integrator

  • OEM

In-field retirement

Debug Instrumentation of Systems-on-Chip

Who uses the SoC DfD infrastructure?

19

slide-20
SLIDE 20

Post-silicon validation

  • SoC

integrator

  • OEM

In-field retirement

  • SoC integrator
  • OEM
  • OS vendor
  • 3rd party software

developer

  • SoC

integrator/debug ger

  • OEM
  • OSAT

Security implication: rogue debugger can use DfD to illegally leak SoC assets

Who uses the SoC DfD infrastructure?

Debug Instrumentation of Systems-on-Chip

20

slide-21
SLIDE 21

Threat Model

SoC Assets and Asset Owners

  • Cryptographic keys
  • Unique ID
  • Configuration/calibration data
  • Premium content
  • Proprietary firmware

SoC Assets

21

slide-22
SLIDE 22

SoC Assets and Asset Owners

  • Cryptographic keys
  • Unique ID
  • Configuration/calibration data
  • Premium content
  • Proprietary firmware

SoC Assets

  • IP vendors
  • SoC integrator
  • OEM
  • O.S. vendor
  • 3rd party software vendors

Asset Owners

Threat Model

22

slide-23
SLIDE 23

SoC Assets and Asset Owners

  • Cryptographic keys
  • Unique ID
  • Configuration/calibration data
  • Premium content
  • Proprietary firmware

SoC Assets

  • IP vendors
  • SoC integrator
  • OEM
  • O.S. vendor
  • 3rd party software vendors

Asset Owners

Threat Model

  • SoC security requirement: specific assets are confidential to asset owners
  • DfD traces expose assets to all debuggers
  • Rogue debuggers leverage traces to leak SoC assets

23

slide-24
SLIDE 24

SoC

trace-based debug 010111011001… 100100100110… 0110110110110… 1110110100100… decompress MOV r0, #10 MOV r1, #3 ADD r0, r0, r1 Extract asset MOV r0, #10 MOV r1, #3 ADD r0, r0, r1 compressed traces disassembly firmware

Objective: Leak confidential SoC assets such as cryptographic keys and proprietary firmware

Threat Model

24

slide-25
SLIDE 25

SoC

trace-based debug 010111011001… 100100100110… 0110110110110… 1110110100100… decompress MOV r0, #10 MOV r1, #3 ADD r0, r0, r1 Extract asset MOV r0, #10 MOV r1, #3 ADD r0, r0, r1 compressed traces disassembly firmware

  • Objective: Leak confidential SoC assets such as cryptographic keys

and proprietary firmware

  • Assumptions
  • 1. Only SoC integrator is trusted
  • 2. Rogue debugger has insider knowledge of SoC design

Threat Model

25

slide-26
SLIDE 26

SoC

trace-based debug 010111011001… 100100100110… 0110110110110… 1110110100100… decompress MOV r0, #10 MOV r1, #3 ADD r0, r0, r1 Extract asset MOV r0, #10 MOV r1, #3 ADD r0, r0, r1 compressed traces disassembly firmware

  • Objective: Leak confidential SoC assets such as cryptographic keys

and proprietary firmware

  • Assumptions
  • 1. Only SoC integrator is trusted
  • 2. Rogue debugger has insider knowledge of SoC design
  • 3. No collusion among rogue debuggers
  • Attack:
  • Configure DfD for trace-base debugging
  • Decompress debug traces to reconstruct firmware/execution

flow

  • Extract asset from decompressed traces

Threat Model

26

slide-27
SLIDE 27
  • Permanent JTAG Lock
  • JTAG authentication
  • Trace encryption
  • Restricted memory segments

JTAG JTAG

Encrypt(Trace, Key)

Existing Security Mechanisms

0x00000000 – 0x000FFF : restricted 0xFFFFE100 – 0xFFFFE4FF : restricted

27

slide-28
SLIDE 28
  • Requirements
  • 1. Enforce confidentiality policy of SoC assets
  • 2. Maintain debug observability
  • 3. Limit area, power costs
  • 1. Have no impact on debugging time
  • 2. Have no impact on SoC horizontal design flow and supply

chain

Proposed Secure DfD Infrastructure

28

slide-29
SLIDE 29
  • Secure asset tagging
  • Tag size = # debuggers
  • Debugger authentication
  • Debugger ID = tag size
  • No confidentiality requirement for debugger ID
  • Asset filtering

Secure asset tagging 0001 0100 1000

JTAG

debugger ID Debugger authentication 0001

=

0x0000 … DfD funnel Asset filtering debugger ID

Proposed Secure DfD Infrastructure

29

slide-30
SLIDE 30
  • Secure Asset Tagging
  • Tag = confidentiality access policy for each asset
  • Asset owner sets tag of each asset
  • Read-only LUT added to DfD infrastructure to store confidentiality of

assets

Asset owner

0001 0xFFF00000 – 0xFFF00003 0001 0x0000FF00 – 0x000102FF 0001 0x00000000 – 0x000FFFFF

Asset address Tag

DfD LUT

Proposed Secure DfD Infrastructure

30

slide-31
SLIDE 31
  • Debugger Authentication
  • Each SoC has
  • Several challenge-response pairs (CRPs)
  • Unique SoC key K
  • Each debugger must
  • Register with debug server
  • Provide <usr, pswd> combination during registration
  • The SoC integrator
  • Secures the debug server
  • Stores the CRPs and K of each SoC in server
  • Stores debugger tag ID in debug server
  • Provides interface for debugger to securely login to debug

server

  • Adds JTAG authentication module to DfD infrastructure

JTAG authentication

Proposed Secure DfD Infrastructure

31

slide-32
SLIDE 32
  • Debugger Authentication

Proposed Secure DfD Infrastructure

Ci

Secure Debug Server

UNLOCK

JTAG JTAG IR JTAG authentication

1

Send UNLOCK request Generate(Ci, Ri) Retrieve SoC key K Send Ci

JTAG authentication Debugger Debug server

Send <usr,pswd>, Ci Validate login Get debugger Tag ID Search for (Ci, R’i) Search for SoC key K Send R’I||ID||H(R’i||ID, K) Verify H(R’i||ID,K) if HD(Ri, R’i)≤t , UNLOCK = 1 Initiate debug R’i||ID|| H(R’i||ID,K)

ID

32

slide-33
SLIDE 33
  • Asset Filtering
  • Asset Filtering Module (AFM)
  • Monitor values of data signals to trace
  • Verify access policy of authenticated debugger for each value of

data signal

Proposed Secure DfD Infrastructure

Trace Bus

Signal Filter

address data signal 1 signal 2

33

slide-34
SLIDE 34
  • Asset Filtering
  • Asset Filtering Module (AFM)

Proposed Secure DfD Infrastructure

Trace Bus

Signal Filter

address data signal 1 signal 2

DfD LUT 0xFFF00000

0x000…

0001 0xFFF00000 – 0xFFF00003 0001 0x0000FF00 – 0x000102FF 0001 0x00000000 – 0x000FFFFF 34

slide-35
SLIDE 35
  • Asset Filtering
  • Asset Filtering Module (AFM)

Proposed Secure DfD Infrastructure

Trace Bus

Signal Filter

address data signal 1 signal 2

DfD LUT 0xFFF00000

0x000…

0001 0xFFF00000 – 0xFFF00003 0001 0x0000FF00 – 0x000102FF 0001 0x00000000 – 0x000FFFFF

0001

=

ID

35

slide-36
SLIDE 36

Proposed Secure DfD Infrastructure

  • Debugger Authentication Implementation
  • Physical Unclonable Function for CRPs
  • Index-Based Syndrome (IBS) [1] for SoC K
  • IBS Encode of K[i]
  • IBS Decode of S[i]

PUF

Ci Ri

PUF

[C1…Cq] [R1…Rq]

IBS-Encode

Si

[1] M.-D. Yu et.al., “Secure and Robust Error Correction for Physical Unclonable Functions”, IEEE Design & Test of Computers, vol. 27, pp 48-65,

  • Jan. 2010

NVM

[C1…Cq]

PUF [R’1…R’q] IBS-Encode

Si K’[i]

36

slide-37
SLIDE 37

Proposed Secure DfD Infrastructure

  • Debugger Authentication Implementation

PRNG

=

IBS PUF SHA- 1HMA C NVM

HD

Ci Ci Ri UNLOCK R’i K R0… ID ID H(R’i||ID,K)

  • Pseudo-random number generator

(PRNG)

  • Arbiter PUF
  • IBS Decode

[C1…Cq]

37

slide-38
SLIDE 38

Proposed Secure DfD Infrastructure

  • Area and Power Costs
  • 6% area and power overheads compared to ARM9 processor [2].

Component Area (μm2) Power (μW) DfD LUT 24,939.5 20,108.6 Authentication Module PRNG 853.7 1,051.8 PUF 22,335 21,110.8 NVM 2,493.4 2,467.6 IBS-Decoder 49.2 38.1 SHA1-HMAC 18,115 18,933.8 Asset Filtering Module 356.7 427.6

[2] S. Segars, “The ARM9 Family-High Performance Microprocessors for Embedded Applications”, IEEE ICCD, Oct. 1998, pp 230-235.

38

slide-39
SLIDE 39
  • We propose a secure DfD infrastructure that
  • Maintains confidentiality of assets during trace-based debugging
  • Does not impact SoC horizontal design methodology
  • Incurs small area and performance costs
  • Continuing work:
  • Increase flexibility of secure DfD
  • Reduce/minimize storage requirements of debug server
  • Runtime tracking of assets

Secur Secure e DfD DfD-Conc Conclusions lusions

39

slide-40
SLIDE 40

Agenda

  • Introduction

– SoC lifecycle – Test and Debug – Motivations

  • Focus on Debug Security

– Debug and SoC – Debug Threats – A secure Debug mechanism

  • Leveraging Debug features for System Security

– Software threats – Test based countermeasure – Debug based countermeasure

  • Conclusions and Perspectives

40

slide-41
SLIDE 41

Software Security Threats

Memory Extraction

USB

read(0xFFFFF000) secret key

0xFFFFF000

secret key secret key

  • Objective: Leak sensitive data (e.g. cryptographic key, firmware) from

SoC

  • Approach: Leverage external peripherals to access sensitive data in

memory

41

slide-42
SLIDE 42

Software Security Threats

Memory Hijacking

USB

BAD BAR*

0xFFFFFF00 SoC Memory

write(0xFFFFFF00, BAD BAR)

  • Objective: Modify SoC operating state
  • Change configuration settings
  • Modify privileges, debug state, etc
  • Approach: Leverage external peripherals to modify configuration registers

*BAR: Base Address Register – Used to configure address mapping of system

42

slide-43
SLIDE 43

Software Security Threats

Code Injection

void vulnerable(char *array) { char buf[8]; strcpy(buf, array); } Program stack local variables

  • f

vulnerable return address parameters

  • f

vulnerable Software code

  • Objective: Execute arbitrary (malicious) code on system
  • Approach: Leverage software vulnerability to inject code

43

slide-44
SLIDE 44

Software Security Threats

Code Injection

void vulnerable(char *array) { char buf[8]; strcpy(buf, array); } Software code

  • Objective: Execute arbitrary (malicious) code on system
  • Approach: Leverage software vulnerability to inject code

Program stack Malicious code injected

  • nto stack

0x80044F04 parameters

  • f

vulnerable 0xAEEFFE04DC31BA 0x80044F04

44

slide-45
SLIDE 45
  • Countermeasures against extraction and hijacking
  • Memory management unit (MMU)
  • Memory protection unit (MPU)
  • Countermeasures against code injection and reuse
  • Executable space protection (NX-bit)
  • Address space layout randomization (ASLR)
  • Control flow integrity (CFI) checking

Motivation Existing

countermeasures

45

slide-46
SLIDE 46
  • Countermeasures against extraction and hijacking
  • Memory management unit (MMU)Significant area cost
  • Memory protection unit (MPU)62% area cost on typical USB IP
  • Countermeasures against code injection and reuse
  • Executable space protection (NX-bit)Vulnerable to code reuse
  • Address space layout randomization (ASLR)Vulnerable to JIT
  • Control flow integrity (CFI) checking Changes to 3rd party IP
  • Countermeasures incur significant area and performance costs
  • NX-bit does not protect against code reuse attacks
  • ASLR is vulnerable to memory leaks and Just-in-Time (JIT) code reuse
  • CFI requires changes to internal logic of IP cores (i.e. new instructions)

Motivation drawback of countermeasures

46

slide-47
SLIDE 47
  • Countermeasures against extraction and hijacking
  • Memory management unit (MMU)Monitor memory transfers
  • Memory protection unit (MPU)Monitor memory transfers
  • Countermeasures need to observe innerworkings of software

execution in real time to detect attacks

  • Countermeasures against code injection and reuse
  • Executable space protection (NX-bit)
  • Address space layout randomization (ASLR)
  • Control flow integrity (CFI) checking Monitor execution flow

Motivation requirements of

countermeasures

47

slide-48
SLIDE 48

Can we come up with an approach to observe software execution in real-time without the limitations of existing countermeasures?

Motivation

  • Leverage observability provided by SoC debug

architecture to monitor software execution for security threats

48

slide-49
SLIDE 49
  • Need for runtime software observability for software

security

  • Monitor memory transfers to thwart memory hijacking and

extraction

  • Monitor software control flow to detect code injection and reuse
  • SoC debug instrumentation to enable real-time
  • bservability
  • Requires changes to internal logic of 3rd party IP cores
  • Incurs significant hardware and power costs
  • Delays SoC time-to-market

Reuse SoC debug instruments to detect software attacks

Motiva Motivation tion

49

slide-50
SLIDE 50
  • SoC debug architecture readily available for runtime observability

System Fabric

WiFi DI DI DI DI

SF SF SF SF SF

DI Trace Bus Debug Bus

JTAG

  • Real-time tracing
  • Debug instrument (DI)
  • Signal filter (SF)
  • Trace bus
  • Debug bus
  • JTAG port

Reuse SoC tracing instruments to detect software attacks

UART

USB

CPU0

Motiva Motivation tion

50

slide-51
SLIDE 51
  • Signals to trace depend on IP core type:
  • Processor core: program counters, instructions executed,

memory operands, process ID, pipeline statuses, addresses of executed basic blocks, etc

  • System fabric: data and address of memory transfers,

control signals of said transfers, etc.

Motivation

51

slide-52
SLIDE 52
  • Enhance debug architecture with Security Monitoring Module (SMM)
  • SMM taps IP monitored signals to detect security threats
  • Add SMM to trace-based architecture of relevant IP cores such as

system fabric and processor cores

  • SMM allows integration of security features within SoC design

Motivation

52

slide-53
SLIDE 53

SMM for System Fabric IP

Proposed Approach

53

slide-54
SLIDE 54

SMM for System Processor IP

Proposed Approach

1. Obtain basic block static control flow graph (CFG) of software code

54

slide-55
SLIDE 55

SMM for System Processor IP

Proposed Approach

1. Obtain basic block static control flow graph (CFG) of software code 2. Build signature table of golden software execution flow 3. Encrypt signature table and add it to software binary

55

slide-56
SLIDE 56

SMM for System Processor IP

Proposed Approach

1. Obtain basic block static control flow graph (CFG) of software code 2. Build signature table of golden software execution flow 3. Encrypt signature table and add it to software binary BB address

CPU Core

Process ID

process ID buffer

=

Signature cache Signature generator

H

violation

reserved v

to RAM Gsig Rsig

56

slide-57
SLIDE 57

Implementation of System Fabric SMM

  • Simulate 64-bit Atom processor
  • Evaluate on SPEC CPU 2006 and MiBench workloads
  • Simulate several iterations of signature cache to optimize hit rate,

access latency, and area overhead

Proposed Approach

57

slide-58
SLIDE 58
  • We enhance the trace-based debug

architecture that

  • Detects common software attacks in embedded systems
  • Requires no changes to IP cores
  • Incurs small and power costs
  • Continuing work:
  • Evaluate performance overhead of proposed mechanism
  • Explore how other debugging features can be leveraged to detect
  • ther types of attacks
  • Design SMMs to prevent, not just detect
  • Design SMM as a configurable security plug-in IP

Results and on going actions

58

slide-59
SLIDE 59

Agenda

  • Introduction

– SoC lifecycle – Test and Debug – Motivations

  • Focus on Debug Security

– Debug and SoC – Debug Threats – A secure Debug mechanism

  • Leveraging Test and Debug features for System Security

– Software threats – Test based countermeasure – Debug based countermeasure

  • Conclusions and Perspectives

59

slide-60
SLIDE 60

Conclusions

  • Test and Debug Features require dedicated

security mechanisms whith:

– Low overhead – Standard access – Easy deployment for all stake holders

  • They also provide good mission mode

security opportunities

– Low overhead – Easy integration

60

slide-61
SLIDE 61

Perspectives and On going Actions

  • Test and debug based attacks are carried out
  • n real SoC in order to demonstrate the

vulnerabilities and to enhance the proposed secure implementation

  • New

Test and debug based security mechanisms are being developed and evaluated using dedicated SoC and benchmarks

61