EM Analysis in the IoT Context: Lessons Learned from an Attack on - - PowerPoint PPT Presentation

em analysis in the iot context lessons learned from an
SMART_READER_LITE
LIVE PREVIEW

EM Analysis in the IoT Context: Lessons Learned from an Attack on - - PowerPoint PPT Presentation

EM Analysis in the IoT Context: Lessons Learned from an Attack on Thread Daniel Dinu 1 , Ilya Kizhvatov 2 1 Virginia Tech 2 Radboud University Nijmegen CHES 2018 Outline 1 Introduction 2 Side-Channel Vulnerability Analysis 3 The Most Feasible


slide-1
SLIDE 1

EM Analysis in the IoT Context: Lessons Learned from an Attack on Thread

Daniel Dinu1, Ilya Kizhvatov2

1Virginia Tech 2Radboud University Nijmegen

CHES 2018

slide-2
SLIDE 2

Outline

1 Introduction 2 Side-Channel Vulnerability Analysis 3 The Most Feasible Attack 4 Countermeasures 5 Lessons Learned

1 / 14

slide-3
SLIDE 3

EM Analysis

Oscilloscope PC Target Device leakage commands/traces data

2 / 14

slide-4
SLIDE 4

Thread

Networking protocol for the IoT Simple for consumer Built-in security Power efficient IPv6 connectivity Robust mesh network Runs on IEEE 802.15.4 radio silicon More than 100 members

3 / 14

slide-5
SLIDE 5

Motivation

Numerous low-cost hardware and software tools for side-channel attacks Evaluate the effort required to apply an EM attack in the IoT context

Do cryptographic implementations in the network layer need protection against side-channel attacks?

4 / 14

slide-6
SLIDE 6

Outline

1 Introduction 2 Side-Channel Vulnerability Analysis 3 The Most Feasible Attack 4 Countermeasures 5 Lessons Learned

4 / 14

slide-7
SLIDE 7

Communication Security

Security is enforced at two layers:

Medium Access Control (MAC) — AES–CCM using key KMAC Mesh Link Establishment (MLE) — AES–CCM using key KMLE

A node gets the master key K when it is commissioned to a Thread network Fresh keys are generated from the 16-byte K and 4-byte Sequence number: KMAC || KMLE = HMAC–SHA–256(K, Sequence || “Thread”) The default key rotation period is set to 28 days

5 / 14

slide-8
SLIDE 8

Processing a MLE Parent Request Message

Child Parent (Router) MLE Parent Request Received Sequence = Current Sequence ? Generate temporary key HMAC–SHA–256 Tag verification AES–CCM

YES NO

6 / 14

slide-9
SLIDE 9

AES–CCM

Combines CBC–MAC mode and CTR mode The execution of both modes of operation can be attacked The attacker can control up to 12 input bytes of the first block:

Source MAC Address – 8 bytes Frame Counter – 4 bytes

Known attack: Jaffe [CHES’07], O’Flynn and Chen [COSADE’16] AES-CBC 49 Source MAC Address Frame Counter 05 00 15 AES-CTR 01 Source MAC Address Frame Counter 05 00 01

7 / 14

slide-10
SLIDE 10

Relationship between K and KMLE

Master key to MLE key (K − → KMLE)

Key derivation using HMAC

8 / 14

slide-11
SLIDE 11

Relationship between K and KMLE

Master key to MLE key (K − → KMLE)

Key derivation using HMAC

MLE key to master key (KMLE − → K)

Send MLE Child ID Request to ask for the master key The MLE Child ID Response includes the master key

8 / 14

slide-12
SLIDE 12

Relationship between K and KMLE

Master key to MLE key (K − → KMLE)

Key derivation using HMAC

MLE key to master key (KMLE − → K)

Send MLE Child ID Request to ask for the master key The MLE Child ID Response includes the master key

Master key and MLE key are equivalent! K ← → KMLE

8 / 14

slide-13
SLIDE 13

Outline

1 Introduction 2 Side-Channel Vulnerability Analysis 3 The Most Feasible Attack 4 Countermeasures 5 Lessons Learned

8 / 14

slide-14
SLIDE 14

The Most Feasible Attack

Attacker Target Router

9 / 14

slide-15
SLIDE 15

The Most Feasible Attack

Attacker Target Router MLE Advertisement MLE Advertisement MLE Advertisement

Step 1: Observe an MLE Advertisement message Record the Sequence number

9 / 14

slide-16
SLIDE 16

The Most Feasible Attack

Attacker Target Router MLE Parent Request

Step 2: Inject MLE Parent Request messages Recorded Sequence number Random Source MAC Address and Frame Number

9 / 14

slide-17
SLIDE 17

The Most Feasible Attack

Attacker Target Router MLE Parent Request

Step 3: Observe the EM leakage Save the injected inputs and corresponding EM traces

9 / 14

slide-18
SLIDE 18

The Most Feasible Attack

Attacker Target Router

Step 4: Recover the MLE key KMLE Mount a DEMA attack

9 / 14

slide-19
SLIDE 19

The Most Feasible Attack

Attacker Target Router MLE Child ID Request MLE Child ID Response

Step 5: Get the master key K Send a MLE Child ID Request message The MLE Child ID Response message contains K

9 / 14

slide-20
SLIDE 20

The Most Feasible Attack

Attacker Target Router Thread communication

Full network access!

9 / 14

slide-21
SLIDE 21

Experimental Setup

Target: TI CC2538 (Cortex-M3, 32 MHz) Thread stack: OpenThread Oscilloscope: LeCroy waveRunner 625Zi Langer EM probes No trigger signal from target!

10 / 14

slide-22
SLIDE 22

Results

Sampling rate set to 1 GS/s 10,000 EM traces acquired in about 3 hours Full recovery of the MLE key KMLE Two key bytes were much more difficult to recover than the rest Message fragmentation prevented recovery of the master key The attack may succeed on other implementations of the stack

11 / 14

slide-23
SLIDE 23

Outline

1 Introduction 2 Side-Channel Vulnerability Analysis 3 The Most Feasible Attack 4 Countermeasures 5 Lessons Learned

11 / 14

slide-24
SLIDE 24

Countermeasures

Shielding & tamper resistance Protected cryptographic implementations Protocol level mitigations Security certification scheme

12 / 14

slide-25
SLIDE 25

Countermeasures

Shielding & tamper resistance Protected cryptographic implementations Protocol level mitigations Security certification scheme

A combination of the above countermeasures is recommended for high security!

12 / 14

slide-26
SLIDE 26

Outline

1 Introduction 2 Side-Channel Vulnerability Analysis 3 The Most Feasible Attack 4 Countermeasures 5 Lessons Learned

12 / 14

slide-27
SLIDE 27

Lessons Learned

Lessons learned from our evaluation can be applied to other IoT systems and protocols.

13 / 14

slide-28
SLIDE 28

Lessons Learned

Lessons learned from our evaluation can be applied to other IoT systems and protocols.

Prevent electromagnetic leakage

13 / 14

slide-29
SLIDE 29

Lessons Learned

Lessons learned from our evaluation can be applied to other IoT systems and protocols.

Prevent electromagnetic leakage Do not allow access to the master key from temporary key(s)

13 / 14

slide-30
SLIDE 30

Lessons Learned

Lessons learned from our evaluation can be applied to other IoT systems and protocols.

Prevent electromagnetic leakage Do not allow access to the master key from temporary key(s) A network-wide master key is a double-edged sword

13 / 14

slide-31
SLIDE 31

Lessons Learned

Lessons learned from our evaluation can be applied to other IoT systems and protocols.

Prevent electromagnetic leakage Do not allow access to the master key from temporary key(s) A network-wide master key is a double-edged sword

Side-channel attacks are a real threat for the IoT!

13 / 14

slide-32
SLIDE 32

SECURE

14 / 14

slide-33
SLIDE 33

SECURE

Thank you!

14 / 14

slide-34
SLIDE 34

Appendix

slide-35
SLIDE 35

References

Joshua Jaffe. A first-order DPA attack against AES in counter mode with unknown initial

  • counter. In Cryptographic Hardware and Embedded Systems - CHES 2007.

Colin O’Flynn and Zhizhang Chen. Power analysis attacks against IEEE 802.15.4 nodes. In Constructive Side-Channel Analysis and Secure Design - COSADE 2016.

1 / 8

slide-36
SLIDE 36

Thread Stack

Source: https://www.threadgroup.org/

2 / 8

slide-37
SLIDE 37

Mesh Link Establishment (MLE)

Facilitates the secure configuration of radio links Allows exchange of network parameters MLE messages are sent inside UDP datagrams Routers periodically multicast MLE Advertisement messages Link configuration is initiated by a MLE Parent Request message

3 / 8

slide-38
SLIDE 38

Establishing a Communication Link

Child (N1) Parent (N2) MLE Parent Request MLE Parent Response MLE Child ID Request MLE Child ID Response Attach. MLE Child Update Request MLE Child Update Response Child Sync. MLE Link Request MLE Link Accept & Request MLE Link Accept Link Sync.

4 / 8

slide-39
SLIDE 39

HMAC–SHA–256

m = Sequence “Thread” 0x80 0x00 . . . 0x00 len The attacker targets k1 and k2 k1, k2, and Sequence give KMAC and KMLE Not enough control of the input! IV F K ⊕ ipad F m IV F K ⊕ opad F KMAC KMLE k1 k2

5 / 8

slide-40
SLIDE 40

Attack Feasibility

Attack Effort

Adaptation of the rating for smart cards from the Joint Interpretation Library Last step of the attack is feasible ⇒ enhanced-basic no rating basic enhanced-basic moderate high

Equipment Cost

Cost Oscilloscope Attack Success HIGH LeCroy WaveRunner 6Zi ✓ MEDIUM PicoScope, ChipWhisperer-Pro ✓ LOW ChipWhisperer-Lite ✗

6 / 8

slide-41
SLIDE 41

Guessing Entropy

Figure: Evolution of the guessing entropy for the second key byte.

7 / 8

slide-42
SLIDE 42

Correlation Matrix

Figure: Correlation of all key candidates for the second key byte when using 3,000 traces.

8 / 8