+ All Categories
Home > Documents > Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria...

Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria...

Date post: 26-Jul-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
28
ACSAC’15 Los Angeles, California, USA Soteria: Offline Software Protection within Low-cost Embedded Devices Johannes Götzfried * , Tilo Müller * , Ruan de Clercq , Pieter Maene , Felix Freiling * , and Ingrid Verbauwhede * Department of Computer Science FAU Erlangen-Nuremberg, Germany COSIC, Department of Electrical Engineering (ESAT) KU Leuven, Belgium December 10, 2015 Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 1 / 19
Transcript
Page 1: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

ACSAC’15Los Angeles, California, USA

Soteria: Offline Software Protection within Low-costEmbedded Devices

Johannes Götzfried∗, Tilo Müller∗, Ruan de Clercq†, Pieter Maene†,Felix Freiling∗, and Ingrid Verbauwhede†

∗Department of Computer ScienceFAU Erlangen-Nuremberg, Germany

†COSIC, Department of Electrical Engineering (ESAT)KU Leuven, Belgium

December 10, 2015

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 1 / 19

Page 2: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Motivation

Outline

1 Motivation

2 Background: Sancus

3 Design

4 Implementation

5 Evaluation

6 Conclusion

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 2 / 19

Page 3: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Motivation

State-of-the-Art Software Protection

Mostly based on ObfuscationTransformations making programs harder to analyzeSome programs provably can be obfuscated (e.g. Password Checks)Some programs provably cannot be obfuscated (e.g. Quines)

→ In general: Obfuscation only increases the time needed for analysis

Software Protection for Embedded Devices:Attackers with clear economic motivations

Customizers tampering with dataExample: Amount of consumed energy measured by smart metersCompeting industrial entities analysing softwareExample: Re-engineering of a competitive product

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 2 / 19

Page 4: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Motivation

State-of-the-Art Software Protection

Mostly based on ObfuscationTransformations making programs harder to analyzeSome programs provably can be obfuscated (e.g. Password Checks)Some programs provably cannot be obfuscated (e.g. Quines)

→ In general: Obfuscation only increases the time needed for analysis

Software Protection for Embedded Devices:Attackers with clear economic motivations

Customizers tampering with dataExample: Amount of consumed energy measured by smart metersCompeting industrial entities analysing softwareExample: Re-engineering of a competitive product

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 2 / 19

Page 5: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Background: Sancus

Outline

1 Motivation

2 Background: Sancus

3 Design

4 Implementation

5 Evaluation

6 Conclusion

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 3 / 19

Page 6: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Background: Sancus

Sancus: System Overview

Low-cost extensible security architectureStrict isolation of software modulesSecure communication and attestationZero-software trusted computing base

N1

N2

IP

SP1

SP2

...

SM1,1 SM2,1 · · ·

SM2,2 SMj,k · · ·

...

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 3 / 19

Page 7: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Background: Sancus

Sancus: Software Modules

Unprotected

Entrypo

int

Code & constants Unprotected

SM1 text section

Protected data

SM1 protected data section

Unprotected

Mem

ory

KN,SP,SM1 SM1 metadata

Layout Keys

ProtectedstorageareaKN

Node

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 4 / 19

Page 8: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Background: Sancus

Sancus: Design Details

Program-Counter based access control

From/To Entry Text Protected Unprotected

Entry r-x r-x rw- rwxText r-x r-x rw- rwxUnprotected/

r-x r–– ––– rwxOther SM

Isolation can be enabled/disabled with dedicated new instructionsprotect layout,SPunprotect

Hierarchical key derivationKN,SP = kdf(KN , SP) [based on SP ID]KN,SP,SM = kdf(KN,SP, SM) [based on SM identity]

Shared secret between SM on N and SP: KN,SP,SMCan be used for remote attestation with an HMAC

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19

Page 9: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Design

Outline

1 Motivation

2 Background: Sancus

3 Design

4 Implementation

5 Evaluation

6 Conclusion

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 6 / 19

Page 10: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Design

Attacker Model

Not within our attacker modelNo DoS protectionNo hardware attacks

RAM dumpingChip probing

Within our attacker modelControl of all peripheral componentsControl of all software components

Including high-privilege software components, e.g., OS

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 6 / 19

Page 11: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Design

Basic Idea: Offline SW-Protection

→ We want: Offline SW-Protection

Problem: SMs are able to access each others text section (r–-)

From/To Entry Text Protected Unprotected

Entry r-x r-x rw- rwxText r-x r-x rw- rwxUnprotected/

r-x ––– ––– rwxOther SM

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 7 / 19

Page 12: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Design

Design of Soteria

Problem: Code resides unencrypted within ROMEncrypt Code within ROMDecrypt Code to RAM just before SM loading

Loading Process1 Loader SML derives KN,SPL,SML,SME = ESME = kdf(KN,SPL,SML , S̃ME )2 Loader SML decrypts SME with ESME and calls protect

SML uses authenticated encryption(AES-128 in CCM mode of operation)Decryption and protect is done atomically

3 SML is able to load the next encrypted module or to unprotect itself

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 8 / 19

Page 13: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Design

Loading Steps of a Module

Initial situation: SML is active and SME is encrypted

Code

SML Text Section

Encrypted Code

SME Encrypted Code

ROM

Data

SML Data Section

RAM

KN,SPL,SML

KN

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 9 / 19

Page 14: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Design

Loading Steps of a Module

1. Loader SML derives ESME

Code

SML Text Section

Encrypted Code

SME Encrypted Code

ROM

DataESME

SML Data Section

RAM

KN,SPL,SML

KN

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 10 / 19

Page 15: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Design

Loading Steps of a Module

2. SME gets decrypted to RAM and protected

Code

SML Text Section

Encrypted Code

SME Encrypted Code

ROM

DataESME

SML Data Section

Code Data

SME Code & Data

RAM

KN,SPL,SML

KN,SPE ,SME

KN

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 11 / 19

Page 16: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Design

Loading Steps of a Module

3. SML wipes data section and calls unprotect

Code

SML Text Section

Encrypted Code

SME Encrypted Code

ROM

Code Data

SME Code & Data

RAM

KN,SPE ,SME

KN

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 12 / 19

Page 17: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Design

Security Argument

Before Loading: SME is encrypted within ROM (or RAM)After Loading: SME is protected by MALIf SML is tampered with:

ESME is not derived correctly→ authenticated decryption fails

If SME is tampered with (before loading):Integrity property is violated→ authenticated decryption fails

If a reset is triggered:RAM is wiped→ no decrypted fragments of SME can be found

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 13 / 19

Page 18: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Implementation

Outline

1 Motivation

2 Background: Sancus

3 Design

4 Implementation

5 Evaluation

6 Conclusion

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 14 / 19

Page 19: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Implementation

Implementation DetailsHardware Implementation

Based on the openMSP430 project from OpenCoresPatched the OMSP430 to get RAM executablePatched the Sancus MAL to prevent read access to other modulesIncluded memory wipe after resetSuccessfully tested on the XC6VLX240T Virtex-6 FPGA(UART and GPIO)

Software ImplementationLibrary supporting encrypted modulesFully compatible to existing modulesImplementation of SML

Toolchain ModificationsAutomatically identify encrypted modulesTransparently encrypt them (authenticated encryption)Host software is not part of the TCBBased on LLVM and pyelftools

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 14 / 19

Page 20: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Implementation

Implementation DetailsHardware Implementation

Based on the openMSP430 project from OpenCoresPatched the OMSP430 to get RAM executablePatched the Sancus MAL to prevent read access to other modulesIncluded memory wipe after resetSuccessfully tested on the XC6VLX240T Virtex-6 FPGA(UART and GPIO)

Software ImplementationLibrary supporting encrypted modulesFully compatible to existing modulesImplementation of SML

Toolchain ModificationsAutomatically identify encrypted modulesTransparently encrypt them (authenticated encryption)Host software is not part of the TCBBased on LLVM and pyelftools

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 14 / 19

Page 21: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Implementation

Implementation DetailsHardware Implementation

Based on the openMSP430 project from OpenCoresPatched the OMSP430 to get RAM executablePatched the Sancus MAL to prevent read access to other modulesIncluded memory wipe after resetSuccessfully tested on the XC6VLX240T Virtex-6 FPGA(UART and GPIO)

Software ImplementationLibrary supporting encrypted modulesFully compatible to existing modulesImplementation of SML

Toolchain ModificationsAutomatically identify encrypted modulesTransparently encrypt them (authenticated encryption)Host software is not part of the TCBBased on LLVM and pyelftools

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 14 / 19

Page 22: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Implementation

Encryption Details

AES-128 in CCM mode of operation:According to RFC 3610Authentication tag length of sixteen bytesTwo bytes length field→ Maximum SM size of 64 kilobytesNo associated dataThirteen bytes nonce: S̃ME (zero padded)→ Unique identifier S̃ME : Name + current version of SME

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 15 / 19

Page 23: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Evaluation

Outline

1 Motivation

2 Background: Sancus

3 Design

4 Implementation

5 Evaluation

6 Conclusion

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 16 / 19

Page 24: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Evaluation

Area and Power

Evaluation on XC6VLX240T Virtex-6 FPGA with core running at 20Mhz:Plain openMSP430 core: 1,146 slice regs and 2,520 LUTsOverhead of Soteria compared to Sancus

Sancus Soteria OverheadREGs LUTs REGs LUTs REGs LUTs

1 SM 1,897 3,686 1,938 3,894 41 2082 SMs 2,110 4,100 2,150 4,322 40 2223 SMs 2,323 4,378 2,363 4,620 40 2424 SMs 2,536 4,778 2,576 5,034 40 256

Power overhead of Soteria compared to Sancus: 0.2%

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 16 / 19

Page 25: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Evaluation

Performance

No additional performance overhead once an application is runningConstant overhead for resetting: 2+ DRAM_SIZE/2 cyclesConstant overhead for protecting the loader: 72,976 cyclesConstant overhead for destroying the loader: 800 cyclesOverhead for loading software modules of different sizes:

Size (bytes) Total Time (cycles / ms)

208 424,312 (21.216)256 507,536 (25.377)512 951,464 (47.573)768 1,395,384 (69.769)

1024 1,839,304 (91.965)

Implementation of AES-128 in CCM mode has been tweaked for size≈ 2 kilobytes of ROM≈ 200 bytes of RAM

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 17 / 19

Page 26: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Conclusion

Outline

1 Motivation

2 Background: Sancus

3 Design

4 Implementation

5 Evaluation

6 Conclusion

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 18 / 19

Page 27: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Conclusion

Conclusion

Soteria as a software protection solutionZero-software trusted computing baseSoteria allows offline software protectionConfidentiality of code and data before and after loading

Soteria is lightweightLoader module only needs 200 bytes of RAM (AES)Only very little area and power overheadNo additional performance overhead during runtime

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 18 / 19

Page 28: Soteria: OfflineSoftwareProtectionwithinLow-cost … · Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 5 / 19. Design Outline 1 Motivation 2 Background: Sancus 3 Design

Thank you for your attention!

Further Information:https://www1.cs.fau.de/soteria

Götzfried et al. (FAU, KU Leuven) Soteria December 10, 2015 19 / 19


Recommended