14
Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner 1 , Hamed Nemati 2 , Matthias Stockmayer 2 , Pablo Buiras 1 , Roberto Guanciale 1 and Swen Jacobs 2 1 KTH Royal Institute of Technology 2 CISPA Helmholtz Center for Information Security (work in progress) ENTROPY ‘19, Stockholm

1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

Validation of Abstract Side-channel Models for Computer ArchitecturesAndreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,Pablo Buiras1, Roberto Guanciale1 and Swen Jacobs2

1 KTH Royal Institute of Technology

2 CISPA Helmholtz Center for Information Security

(work in progress)ENTROPY ‘19,Stockholm

Page 2: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

Side channels and Security

Program

P(a) ∼ P(b) if a ∼ b, ∀ a bNoninterference

2

Page 3: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

Side channels and Security

Processor

Program

Cache hierarchy Pipelining

SpeculationWeak memory

models

Hyperthreading

Multicore

Architecture

3

Page 4: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

Abstract observation models

....LD LD ST

MOV …ADD …CMP ...LD ...B label...

Program text

Program trace

σ

σ ∼P σ’ ObservationalEquivalence

4

σ’ ....LD LDST

Page 5: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

SCAM-V: Side Channel Abstract Model Validator

σ ∼P σ’ σ ≃P σ’⟹?

Abstract model Real hardware

5

Page 6: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

SCAM-V Pipeline Overview

approx ∼P

6

σ ≃P σ’ σ ∼P σ’

Page 7: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

BIR

7

● Infinite number of register variables

● Assignments, jumps, cond. jumps

● BIR expressions: arithmetic, bitwise, etc.

● Memory is an array● (Attacker) Observations

Abstract Assembly Language

Page 8: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

BIR

Observation statements

OBS(c, exp)

outputs the evaluation of exp in the current state,if c evaluates to true

OBS(true, exp) = OBS(exp)

8

Page 9: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

Lifting and BIR

9

B.eq l2 mul x1 x2 x3l2: ldr x2 {x1} +8

Binary

[l0: CJMP Z l2 l1][l1: X1= X2*X3; JMP l2][l2: OBS([tag(X1)]); X2= LOAD(MEM, X1); X1= X1+8; HALT]

BIR

Obs model:Cache tag Observation added

according to selected model

Page 10: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

SCAM-V Pipeline Overview

10

Page 11: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

SCAM-V Weakest Relation Synthesis

[l0: CJMP Z l2 l1][l1: X1= X2*X3; JMP l2][l2: OBS([tag(X1)]); X2= LOAD(MEM, X1); X1= X1+8; HALT]

Z ¬Z

[tag(X1)] [tag(X2*X3)]

Z’ ¬Z’

[tag(X1’)] [tag(X2’*X3’)]

(Z ∧ Z’ ⇒ tag(X1) = tag(X1’))∧ (Z ∧ ¬Z’ ⇒ tag(X1) = tag(X2’*X3’))∧ (¬Z ∧ Z’ ⇒ tag(X2*X3) = tag(X1’))∧ (¬Z ∧ ¬Z’ ⇒ tag(X2*X3) = tag(X2’*X3’))∧ address constraints (...)

11

Symbolic execution

Relation

σ ∼P σ’

Page 12: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

SCAM-V Pipeline Overview

SMT

12

σ ≃P σ’ σ ∼P σ’

Page 13: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

Testing / Measuring the channel

13

● ARMv8 (Raspberry Pi 3)

● Observation: tag and operation of every memory access

● Measuring: TrustZone instructions for cache inspection

● Cortex-M0 (MicroBit)

● Observation: program counter

● Measuring: internal system clock

Page 14: 1 2 Validation of Abstract Side-channel Stockholm ENTROPY ... · Validation of Abstract Side-channel Models for Computer Architectures Andreas Lindner1, Hamed Nemati2, Matthias Stockmayer2,

SCAM-V: Side Channel Abstract Model Validator

● Modern architectures are too complex to

directly analyze side-channels

● Abstract models based on system-state

observations

○ PC security model, Cache-line + tag

of memory access

● Assumption:States with equivalent observations in the model areindistinguishable to the attacker on real hardware

● Not always true! e.g. Spectre

● SCAM-V validates this assumption

14

Summary