Glitching and Side-Channel Analysis for All Colin OFlynn NewAE - - PowerPoint PPT Presentation

glitching and side channel
SMART_READER_LITE
LIVE PREVIEW

Glitching and Side-Channel Analysis for All Colin OFlynn NewAE - - PowerPoint PPT Presentation

Glitching and Side-Channel Analysis for All Colin OFlynn NewAE Technology Inc. RECON 2015 Montreal, QC. Overview W.t.f is side-channel power analysis (again) Example: IEEE 802.15.4 Node Example: AES-256 Bootloader W.t.f.


slide-1
SLIDE 1

Glitching and Side-Channel Analysis for All

Colin O’Flynn – NewAE Technology Inc. RECON 2015 – Montreal, QC.

slide-2
SLIDE 2

Overview

  • W.t.f is side-channel power analysis (again)
  • Example: IEEE 802.15.4 Node
  • Example: AES-256 Bootloader
  • W.t.f. is Glitching
  • Simple power glitching
slide-3
SLIDE 3

About Me

  • PhD at Dalhousie University in Halifax, Canada (Ongoing)
  • Designed open-source hardware security project

(ChipWhisperer)

  • Commercialization through NewAE Technology Inc.
  • Previously talked at Blackhat US/EU/AD, RECON, ESC
slide-4
SLIDE 4

Side Channel Power Analysis

slide-5
SLIDE 5

Side Channel Analysis

Crypto Device Secret Key Ciphertext Plaintext

slide-6
SLIDE 6

Super-Fast Side Channel

slide-7
SLIDE 7

Real-Life

slide-8
SLIDE 8

Breaking Apart

slide-9
SLIDE 9

Hardware Example

slide-10
SLIDE 10

Hackaday Prize 2014

slide-11
SLIDE 11

Cheap Hardware… First Ver

slide-12
SLIDE 12

ChipWhisperer-Lite Kickstarter

slide-13
SLIDE 13

Cheaper Hardware

slide-14
SLIDE 14

Open-Source Software

slide-15
SLIDE 15

Example of Power Analysis

<demo here>

slide-16
SLIDE 16

IEEE 802.15.4 Nodes

slide-17
SLIDE 17

IEEE 802.15.4

slide-18
SLIDE 18

Example #1: 802.15.4

http://eprint.iacr.org/2015/529

802.15.4 Node ZigBee (ZigBee IP, ZigBee Pro, RF4CE, etc.) WirelessHART MiWi ISA100.11a 6LoWPAN Nest Weave JenNet Thread Atmel Lightweight Mesh IEEE 802.15.5 DigiMesh

slide-19
SLIDE 19

Hardware Setup

slide-20
SLIDE 20

802.15.4 Frame Format

Frame Header

  • Seq. Number

Dest Address (ff = Broadcast) Source Addressing

  • Sec. Level.

FrameCounter Key ID Encrypted Payload + MAC (MIC in 802.15.4 parlance) CRC-16 Goes Here

slide-21
SLIDE 21

802.15.4 Decoding

  • 1. Validate headers and security options.
  • 2. Check that the received frame counter is numerically

greater than the last stored frame count.

  • 3. Look up the secret key based on message address

and/or key index.

  • 4. Decrypt the payload (and MAC if present).
  • 5. Validate the MAC (if present).
  • 6. Store the frame counter.

IEEE 802.15.4 Wireless Stack: Frame Decryption Procedure:

slide-22
SLIDE 22

Example #1: 802.15.4

Input to AES Block

slide-23
SLIDE 23

Many fixed bytes…

slide-24
SLIDE 24

CPA Attack Result

slide-25
SLIDE 25

ATMega128RFA1

slide-26
SLIDE 26

ATMegaRF AES Peripheral

slide-27
SLIDE 27

Example #2: AES-256 Bootloader

Tutorial: http://newae.com/sidechannel/cwdocs/tutorialaes256boot.html Paper (CCECE 2015): https://eprint.iacr.org/2014/899.pdf

slide-28
SLIDE 28

Bootloader Protocol

slide-29
SLIDE 29

AES-256 in CBC Mode

slide-30
SLIDE 30

Round 14

slide-31
SLIDE 31

Round 13

slide-32
SLIDE 32

Trace View

slide-33
SLIDE 33

Success Rate

slide-34
SLIDE 34

Getting Started in Side Channel Power

  • Build/buy a simple target device:
  • AVR dev-board
  • Arduino Uno
  • PIC
  • Get a scope with USB API
  • Picoscope
  • Most bench scopes
  • Be wary of cheap off-brand scopes, sometimes USB interface is

poor

  • Experiment!
slide-35
SLIDE 35

Glitching

slide-36
SLIDE 36

Glitching Target

int i,j,count; while(1){ count = 0; for (j = 0; j < 5000; j++){ for (i = 0; i < 5000; i++){ count++; } } printf("%d %d %d\n", count, i, j); }

slide-37
SLIDE 37

Easy Glitching

slide-38
SLIDE 38

High-Precision Glitches

slide-39
SLIDE 39

Easy Glitching

slide-40
SLIDE 40

Raspberry Pi Example

slide-41
SLIDE 41

Raspberry Pi Example

slide-42
SLIDE 42

Raspberry Pi Example

slide-43
SLIDE 43

Glitch Tool

slide-44
SLIDE 44

Glitch Waveform (Raspberry Pi)

slide-45
SLIDE 45

Getting Started in Glitching

  • Load simple code onto target
  • Determine/guess sensitive power rail
  • Test glitch parameters  ideally with profiling code
slide-46
SLIDE 46

Glitching in CW-Lite

slide-47
SLIDE 47

It’s fun!

Try Power Analysis and Glitching today! ChipWhisperer Project: www.chipwhisperer.com NewAE Technology Inc.: www.newae.com Personal:

@colinoflynn coflynn@newae.com http://www.oflynn.com