Efficient Control-Flow Subgraph Matching for Detecting Hardware - - PowerPoint PPT Presentation

efficient control flow subgraph matching for detecting
SMART_READER_LITE
LIVE PREVIEW

Efficient Control-Flow Subgraph Matching for Detecting Hardware - - PowerPoint PPT Presentation

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea Efficient Control-Flow Subgraph Matching for Detecting Hardware Trojans in RTL Models L. Piccolboni 1,2 , A. Menon 2 , and G. Pravadelli 2 1 Columbia University, New York, NY, USA 2 University of


slide-1
SLIDE 1

Efficient Control-Flow Subgraph Matching for Detecting Hardware Trojans in RTL Models

  • L. Piccolboni1,2, A. Menon2, and G. Pravadelli2

1 Columbia University, New York, NY, USA 2 University of Verona, Verona, Italy

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

slide-2
SLIDE 2

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojans

Hardware Trojan

Trigger Logic

activates the malicious behavior under specific conditions

  • A Hardware Trojan is defined as a malicious

and intentional alteration of an integrated circuit that results in undesired behaviors

1 / 21

Payload Logic

implements the actual malicious behavior

slide-3
SLIDE 3

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 2 / 21

Hardware Trojans

Limitations in Current Methodologies

  • Several methodologies have been proposed to

detect Trojans at Register-Transfer Level (RTL)

  • Nevertheless, there are still some limitations:
  • 1. Manual effort from designers is required
  • 2. They focus on a specific type of threat,

e.g., a particular payload or a trigger

slide-4
SLIDE 4

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 3 / 21

Contributions

  • We propose a verification approach based on

a Control-Flow Subgraph Matching Algorithm

Design Under Verification (DUV) Hardware Trojan Library

Extraction Algorithm

  • Get Control-Flow Graphs

(CFGs) from DUV and HTs

Detection Algorithm

  • Search instances of the

Trojan CFGs in the DUV

Hardware Trojan Report

1 2

3

RTL Verilog/VHDL RTL Verilog/VHDL

slide-5
SLIDE 5

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 4 / 21

Background

Control-Flow Graphs (CFGs)

  • We build a CFG for each process of the DUV/HT
  • basic block (node) = it is a sequence
  • f instructions without any branch
  • edge = connects the block b1 with b2

if the block b1 can be executed after b2 in at least one DUV/HT executions

b

slide-6
SLIDE 6

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Background

Control-Flow Graphs (CFGs)

first basic block

  • f the process

e1 s1 b2 b3 b4 b5

last basic block

  • f the process

4 / 21

  • We build a CFG for each process of the DUV/HT
slide-7
SLIDE 7

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Background

Control-Flow Graphs (CFGs)

Branch rule:

  • left if true
  • right if false

e1 s1 b2 b3 b4 b5

4 / 21

  • We build a CFG for each process of the DUV/HT
slide-8
SLIDE 8

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Background

Control-Flow Graphs (CFGs)

if (reset) if (c == 1) a = 1 b++ a = 1 b = 0 a++ b = 0

code associated with the basic blocks

e1 s1 b2 b3 b4 b5

4 / 21

  • We build a CFG for each process of the DUV/HT
slide-9
SLIDE 9

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Design Under Verification (DUV) Hardware Trojan Library

Extraction Algorithm

  • Get Control-Flow Graphs

(CFGs) from DUV and HTs

Detection Algorithm

  • Search instances of the

Trojan CFGs in the DUV

Hardware Trojan Report

1

RTL Verilog/VHDL RTL Verilog/VHDL

5 / 21

slide-10
SLIDE 10

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

  • We defined a Hardware Trojan (HT) Library that

includes the RTL implementations of known HT triggers and their camouflaged variants

5 / 21

slide-11
SLIDE 11

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Trigger #1: Cheat Codes

  • A cheat code is a value (or sequence of values) that

triggers the payload when observed in a register

6 / 21

if (reset) if (c1) if (c2 & v1)

s1 e1

trigger = v1 & v2 v1 = 1 v2 = 1 v1 = 0 v2 = 0

b1 e2 s2 b2 b3 b4 b6 b5 b7

slide-12
SLIDE 12

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 7 / 21

Hardware Trojan Library

Trigger #2: Dead Machines

  • A dead machine code triggers the payload when

specific state-based conditions are satisfied

if (reset)

s1 e1

case 1 case 2 reset vars

b1 e2 s2 b2 b3

if (cond) trigger = 1

b4 b7 b6 b5 b4

case 3

slide-13
SLIDE 13

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 8 / 21

Hardware Trojan Library

Trigger #3: Ticking Timebombs

  • A ticking timebomb triggers the payload when a

certain number of clock cycles has been passed

if (reset) if (cnt == N)

s1 e1

trigger = 1

b2 e2 s2 b3 b4 b5 b6 b1

if (reset) cnt = 0 ++cnt

slide-14
SLIDE 14

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Handling Camouflaged Variants

  • We need an automatic way to extend such basic

implementations to find camouflaged variants

9 / 21

slide-15
SLIDE 15

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Handling Camouflaged Variants

  • We need an automatic way to extend such basic

implementations to find camouflaged variants

if (reset) if (c1)

s1 e1

trigger = v1 & v2 v1 = 1 v2 = 1 v1 = 0 v2 = 0

b1 e2 s2 b2 b3 b4 b6 b5 b7

Extension directives:

  • 1. parametrizable 1

9 / 21

if (c2 & v1)

slide-16
SLIDE 16

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Handling Camouflaged Variants

  • We need an automatic way to extend such basic

implementations to find camouflaged variants

s1 e1 b1 e2 s2 b2 b3 b4 b6 b5 b7

Extension directives:

  • 1. parametrizable 1
  • 2. bound-number 10

if (reset) if (c1) trigger = v1 & v2 v1 = 1 v2 = 1 v1 = 0 v2 = 0

9 / 21

if (c2 & v1)

slide-17
SLIDE 17

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Handling Camouflaged Variants

  • We need an automatic way to extend such basic

implementations to find camouflaged variants

s1 e1 b1 e2 s2 b2 b3 b4 b6 b5 b7

Extension directives:

  • 1. parametrizable 1
  • 2. bound-number 10
  • 3. add-basic-blocks 2

b8 b9

$1 $2

if (reset) if (c1) trigger = v1 & v2 v1 = 1 v2 = 1 v1 = 0 v2 = 0

9 / 21

if (c2 & v1)

slide-18
SLIDE 18

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Handling Camouflaged Variants

  • We need an automatic way to extend such basic

implementations to find camouflaged variants

s1 e1 b1 e2 s2 b2 b3 b4 b6 b5 b7

Extension directives:

  • 1. parametrizable 1
  • 2. bound-number 10
  • 3. add-basic-blocks 2
  • 4. add-edge (b7, $1)

b8 b9

$1 $2

if (reset) if (c1) trigger = v1 & v2 v1 = 1 v2 = 1 v1 = 0 v2 = 0

9 / 21

if (c2 & v1)

slide-19
SLIDE 19

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Handling Camouflaged Variants

  • We need an automatic way to extend such basic

implementations to find camouflaged variants

s1 e1 b1 e2 s2 b2 b3 b4 b6 b5

Extension directives:

  • 1. parametrizable 1
  • 2. bound-number 10
  • 3. add-basic-blocks 2
  • 4. add-edge (b7, $1)
  • 5. add-edge (b7, $2)
  • 6. add-edge ($1, e2)
  • 7. add-edge ($2, e2)

b7 b8 b9

$1 $2

if (reset) if (c1) trigger = v1 & v2 v1 = 1 v2 = 1 v1 = 0 v2 = 0

9 / 21

if (c2 & v1)

slide-20
SLIDE 20

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Handling Camouflaged Variants

  • We need an automatic way to extend such basic

implementations to find camouflaged variants

s1 e1 b1 e2 s2 b2 b3 b4 b6 b5

Extension directives:

  • 1. parametrizable 1
  • 2. bound-number 10
  • 3. add-basic-blocks 2
  • 4. add-edge (b7, $1)
  • 5. add-edge (b7, $2)
  • 6. add-edge ($1, e2)
  • 7. add-edge ($2, e2)
  • 8. drop-edge (b7, e2)

b7 b8 b9

$1 $2

if (reset) if (c1) trigger = v1 & v2 v1 = 1 v2 = 1 v1 = 0 v2 = 0

9 / 21

if (c2 & v1)

slide-21
SLIDE 21

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Handling Camouflaged Variants

  • We need an automatic way to extend such basic

implementations to find camouflaged variants

Extension directives:

  • 1. parametrizable 1
  • 2. bound-number 10
  • 3. add-basic-blocks 2
  • 4. add-edge (b7, $1)
  • 5. add-edge (b7, $2)
  • 6. add-edge ($1, e2)
  • 7. add-edge ($2, e2)
  • 8. drop-edge (b7, e2)
  • 9. old-source-block b7

source

s1 e1 b1 s2 b2 b3 b4 b6 b5 b7 b8 b9

$1

if (reset) if (c1) trigger = v1 & v2 v1 = 1 v2 = 1 v1 = 0 v2 = 0

e2

$2 9 / 21

if (c2 & v1)

slide-22
SLIDE 22

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Handling Camouflaged Variants

  • We need an automatic way to extend such basic

implementations to find camouflaged variants

Extension directives:

  • 1. parametrizable 1
  • 2. bound-number 10
  • 3. add-basic-blocks 2
  • 4. add-edge (b7, $1)
  • 5. add-edge (b7, $2)
  • 6. add-edge ($1, e2)
  • 7. add-edge ($2, e2)
  • 8. drop-edge (b7, e2)
  • 9. old-source-block b7
  • 10. up-source-block $2

source

s1 e1 b1 s2 b2 b3 b4 b6 b5 b7 b8 b9

$1

if (reset) if (c1) trigger = v1 & v2 v1 = 1 v2 = 1 v1 = 0 v2 = 0

e2

$2 9 / 21

if (c2 & v1)

slide-23
SLIDE 23

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Library

Pros and Cons

  • We defined a Hardware Trojan (HT) Library that

includes the RTL implementations of known HT triggers and their camouflaged variants

Pros Cons

  • Unique verification approach
  • Easy to extend the approach

for new hardware Trojans

  • Easy to customize the library

to the needs of the user

  • Need of the implementations
  • f the hardware Trojans
  • Only the hardware Trojans in

the library or their variations can be detected

  • Unique verification approach

10 / 21

slide-24
SLIDE 24

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 11 / 21

Hardware Trojan Detection

Extraction Algorithm

2

Design Under Verification (DUV) Hardware Trojan Library

Extraction Algorithm

  • Get Control-Flow Graphs

(CFGs) from DUV and HTs

Detection Algorithm

  • Search instances of the

Trojan CFGs in the DUV

Hardware Trojan Report

RTL Verilog/VHDL RTL Verilog/VHDL

slide-25
SLIDE 25

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 11 / 21

Hardware Trojan Detection

Extraction Algorithm

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

slide-26
SLIDE 26

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 11 / 21

Hardware Trojan Detection

Extraction Algorithm

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

s1

slide-27
SLIDE 27

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 11 / 21

Hardware Trojan Detection

Extraction Algorithm

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

s1

if (reset == 1)

slide-28
SLIDE 28

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 11 / 21

Hardware Trojan Detection

Extraction Algorithm

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

s1 b2 b1

if (reset == 1) trig <= 0 if (value == N)

slide-29
SLIDE 29

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 11 / 21

Hardware Trojan Detection

Extraction Algorithm

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

s1 b2 b1 b4 b3

if (reset == 1) trig <= 0 trig <= 1 trig <= 0 if (value == N)

slide-30
SLIDE 30

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 11 / 21

Hardware Trojan Detection

Extraction Algorithm

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

s1 e1 b2 b1

if (reset == 1) trig <= 0

b4 b3

trig <= 1 trig <= 0 if (value == N)

slide-31
SLIDE 31

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 12 / 21

Hardware Trojan Detection

Extraction Algorithm: Probabilities

  • To calculate the probabilities associated with the

arcs, we use an approach based on a SMT solver

SMT Solver

[A. Cimatti et al., “The

MathSAT5 SMT Solver”]

Condition Number of Models

  • Scalability? YES, conditions are simple enough!
  • Plus, simple conditions are short-circuited

e.g., var == N à Number of models = 1

slide-32
SLIDE 32

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 12 / 21

Hardware Trojan Detection

Extraction Algorithm: Probabilities

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

s1 e1 b2 b1

if (reset == 1) trig <= 0

b4 b3

trig <= 1 trig <= 0 if (value == N)

slide-33
SLIDE 33

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 12 / 21

Hardware Trojan Detection

Extraction Algorithm: Probabilities

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

0.5 0.5

s1 e1 b2 b1

if (reset == 1) trig <= 0

b4 b3

trig <= 1 trig <= 0 if (value == N)

slide-34
SLIDE 34

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 12 / 21

Hardware Trojan Detection

Extraction Algorithm: Probabilities

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

0.5 0.5 ~ 1 ~

s1 e1 b2 b1

if (reset == 1) trig <= 0

b4 b3

trig <= 1 trig <= 0 if (value == N)

slide-35
SLIDE 35

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 12 / 21

Hardware Trojan Detection

module Trigger (input reset, input [127:0] value, output trig); always @(reset, value) begin if (reset == 1) begin trig <= 0; end else if (value == N) begin trig <= 1; end else begin trig <= 0; end end parameter N = 128’hffff_ffff_...._ffff;

Extraction Algorithm: Probabilities

0.5 0.5 ~ 1 ~ 1 1 1

s1 e1 b2 b1

if (reset == 1) trig <= 0

b4 b3

trig <= 1 trig <= 0 if (value == N) ~

slide-36
SLIDE 36

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 13 / 21

Hardware Trojan Detection

Detection Algorithm

3

Design Under Verification (DUV) Hardware Trojan Library

Extraction Algorithm

  • Get Control-Flow Graphs

(CFGs) from DUV and HTs

Detection Algorithm

  • Search instances of the

Trojan CFGs in the DUV

Hardware Trojan Report

RTL Verilog/VHDL RTL Verilog/VHDL

slide-37
SLIDE 37

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 13 / 21

Hardware Trojan Detection

Detection Algorithm

s1 e1 b2 b1

if (reset == 1) trig <= 0

b4 b3

trig <= 1 trig <= 0 if (value == N)

Trigger

0.5 0.5 ~ 1 ~ 1 1 1

slide-38
SLIDE 38

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 13 / 21

Hardware Trojan Detection

Detection Algorithm

Trigger

s1 e1 b2 b1 b4 b3

0.5 0.5 ~ 1 ~ 1 1 1

slide-39
SLIDE 39

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 13 / 21

Hardware Trojan Detection

Detection Algorithm

Trigger

s1 e1 b2 b1 b4 b3

slide-40
SLIDE 40

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 13 / 21

Hardware Trojan Detection

Detection Algorithm

s1 b2 b1 b4 b3

Abstracted Trigger

slide-41
SLIDE 41

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 13 / 21

Hardware Trojan Detection

Detection Algorithm

s1 e1 b2 b1

if (reset == 1) t = 0

b4 b3

0.5 0.5 0.75 1

b4 b4 b4 b4

DUV

0.25 1 ~ ~ 1 1 1 1 0.5 0.5 … … … t = 1 … if (c1 | c2) if (v1 == K)

s1 b2 b1 b4 b3

Abstracted Trigger

slide-42
SLIDE 42

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 13 / 21

Hardware Trojan Detection

Detection Algorithm

s1 b2 b1 b4 b3 b4 b4 b4 b4

Abstracted DUV

s1 b2 b1 b4 b3

Abstracted Trigger

search the trigger in the DUV

slide-43
SLIDE 43

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 13 / 21

Hardware Trojan Detection

Detection Algorithm

s1 b2 b1 b4 b3 b4 b4 b4 b4

Abstracted DUV

s1 b2 b1 b4 b3

Abstracted Trigger

search the trigger in the DUV

Match #1

slide-44
SLIDE 44

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 13 / 21

Hardware Trojan Detection

Detection Algorithm

s1 b1 b4 b4 b4 b4 b4

Abstracted DUV

s1 b2 b1 b4 b3

Abstracted Trigger

search the trigger in the DUV

b3 b2

Match #2

slide-45
SLIDE 45

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 14 / 21

Hardware Trojan Detection

Detection Algorithm: Confidence

  • Some Hardware Trojans can be similar to actual

legal code: we need to give a confidence value for each match returned by the detection alg.

  • The confidence value is in the range [0, 1]
  • 1 à highest confidence that is a Trojan
  • For each match we evaluate 4 conditions c1, c2,

c3 and c4 à confidence is a linear combination

  • f those conditions (weights vary with triggers)
slide-46
SLIDE 46

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 15 / 21

Hardware Trojan Detection

Detection Algorithm: Confidence

c1: presence of variables with known behavior

if (reset) if (cnt == N)

s1 e1

trigger = 1

b2 e2 s2 b2 b3 b4 b5 b1

if (!reset) cnt = 0 ++cnt

Trigger in the HT Library

slide-47
SLIDE 47

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 15 / 21

Hardware Trojan Detection

Detection Algorithm: Confidence

c1: presence of variables with known behavior

if (reset) if (var == N)

s1 e1 b2 e2 s2 b2 b3 b4 b5 b1

if (!reset) var = 0

Match in the DUV

it is similar to a counter!

var += k

slide-48
SLIDE 48

Hardware Trojan Detection

Detection Algorithm: Confidence

c2: presence of suspicious reset logics

Trigger in the HT Library

b6 s1

Match in the DUV

b5

0.5 if (reset) if (reset)

b1

  • Same reset mechanism of the process?
  • Suspicious variables are reset?

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 16 / 21

slide-49
SLIDE 49

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Detection

Detection Algorithm: Confidence

c3: average distance of the probabilities

Trigger in the HT Library

b7 b6 b9 b8 s1 b2 b1 b4 b3

Match in the DUV

b5

0.5 0.5 0.001 0.999 0.5 0.5 0.5 0.5

confidence = 1 – [|0.5 - 0.5| + |0.5 - 0.5| +

|0.5 - 0.001| + |0.5 - 0.999|] = 0.002 17 / 21

slide-50
SLIDE 50

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Detection

Detection Algorithm: Confidence

c3: average distance of the probabilities

Trigger in the HT Library

b7 b6 b9 b8 s1 b2 b1 b4 b3

Match in the DUV

b5

0.5 0.5 0.001 0.999 0.5 0.5 0.01 0.99

confidence = 1 – [|0.5 - 0.5| + |0.5 - 0.5| +

|0.01 - 0.001| + |0.99 - 0.999|] = 0.892 17 / 21

slide-51
SLIDE 51

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Hardware Trojan Detection

Detection Algorithm: Confidence

c4: is there a payload that is affine to the trigger?

Hardware Trojan Library RTL Verilog/VHDL

Added known implementations

  • f HT payloads
  • The payloads are searched as well in the DUV
  • Are there a matched payload and matched

trigger that share some variables?

18 / 21

slide-52
SLIDE 52

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 19 / 21

Experimental Results

  • We verified the effectiveness of our approach by

considering the Trust-HUB Benchmarks and the Cryptoplatform (component from OpenCores)

  • We created a HT Library that includes the same

types of HTs (but not the same code) of the HTs that have been included in the benchmarks

  • The goal here is to show that our verification

approach can help users to distinguish HTs

slide-53
SLIDE 53

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 19 / 21

Experimental Results

Cheat codes Name Blocks Edges Cheat-T001 4 4 Cheat-T002 5 6 Cheat-T003 6 7 Cheat-T004 16 21 Cheat-T005 11 14 Cheat-T006 11 14 Timebombs Name Blocks Edges Time-T001 13 16 Time-T002 14 19 Time-T003 12 15 Time-T004 6 7 Time-T005 14 17 Dead machines Name Blocks Edges Mach-T001 10 11 Mach-T002 11 13

HT Library (Triggers)

slide-54
SLIDE 54

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 19 / 21

Experimental Results

Payloads Name Effect Blocks Edges Payload-T001

  • Infor. leakage

16 21 Payload-T002 Increase Power 8 9 Payload-T003 Covert Channel 10 13 Payload-T004 Leakage Current 12 15 Payload-T005 Modify memory 7 7 Payload-T006 Modify output 7 7

HT Library (Payloads)

slide-55
SLIDE 55

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 19 / 21

Experimental Results

Trust-HUB Benchmarks Name # Diff. Instances Min. # Blocks Max. # Blocks Min. # Edges Max. # Edges AES 16 2101 2150

3160 3236

RS232 10 130 159

184 233

BasicRSA 4 81 93

119 139

Characteristics of Benchmarks

Cryptoplatform (CPU + memory + 5 crypto cores) Name # Diff. Instances Min. # Blocks Max. # Blocks Min. # Edges Max. # Edges Crypto 6 4402 4424

6503 6537

slide-56
SLIDE 56

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 19 / 21

Experimental Results

Quantitative Evaluation

Trust-HUB Benchmarks Family [A] [B] [C] [C]* This work AES 3/18 9/18 0/18 18/18

18/18

RS232 0/10 0/10 9/10 10/10

10/10

BasicRSA 0/4 2/4 4/4 4/4

4/4

A à [J. Rajendran et al., “Detecting Malicious Modifications

  • f Data in Third-Party Intellectual Property Cores”, DAC ‘15]

B à [J. Rajendran et al., “Formal Security Verification of Third-Party

Intellectual Property Cores for Information Leakage”, VLSID ’16]

C à [S. K. Haider et al., “HaTCh: Hardware Trojan Catcher”, ‘14]

* Assuming they are activated during the learning phase

slide-57
SLIDE 57

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea 19 / 21

Experimental Results

Qualitative Evaluation

Proposed Approach for Trust-HUB Benchmarks Name Matches ConfHT ConfMAX False+ Time (s)

AES-T800

9 0.93 0.65 5.04

AES-T1400

81 0.99 0.69 4.85

AES-T1900

11 0.97 0.72 4.82

RS232-T100

7 0.36 0.50 2 4.12

BasicRSA-T100

4 0.25 0.25 3 1.13

(Full results in the paper or in the poster)

slide-58
SLIDE 58

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Experimental Results

Proposed Approach for Cryptoplatform Name Matches ConfHT ConfMAX False+ Time (s)

Crypto-T000

23 N/A 0.35 N/A 11.80

Crypto-T100

34 0.81 0.39 12.88

  • 34

0.72 0.39 12.88

Crypto-T200

31 0.96 0.71 13.43

Crypto-T300

42 0.88 0.29 15.03

Crypto-T400

34 0.90 0.50 15.67

Qualitative Evaluation

19 / 21

slide-59
SLIDE 59

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea

Conclusions

20 / 21

  • We presented an automatic approach for

the detection of hardware Trojans at RTL

  • 1. Our approach is general: it adopts an approach

independent from the specific hardware Trojan

  • 2. Our approach is extendible: new Trojans can be

easily added to the Hardware Trojan Library

  • 3. Our approach is fast: it takes only few seconds

to find hardware Trojans in large DUVs

slide-60
SLIDE 60

Speaker: Luca Piccolboni Columbia University, NY, USA University of Verona, Verona, Italy

Questions?

Efficient Control-Flow Subgraph Matching for Detecting Hardware Trojans in RTL Models

ACM/IEEE CODES + ISSS 2017, Seoul, South Korea