Proving the wild jungle jump Master Systems Network Engineering - - PowerPoint PPT Presentation

proving the wild jungle jump
SMART_READER_LITE
LIVE PREVIEW

Proving the wild jungle jump Master Systems Network Engineering - - PowerPoint PPT Presentation

Proving the wild jungle jump Master Systems Network Engineering University of Amsterdam Research Project 2 (#48) Supervisors: Niek Timmers Student: Albert Spruyt James Gratchoff Lukasz Chmielewski james.gratchoff@os3.nl What is a wild


slide-1
SLIDE 1

Proving the wild jungle jump

Master Systems Network Engineering University of Amsterdam Research Project 2 (#48)

Student: James Gratchoff james.gratchoff@os3.nl Supervisors: Niek Timmers Albert Spruyt Lukasz Chmielewski

slide-2
SLIDE 2

What is a wild jungle jump?

2

slide-3
SLIDE 3

3 The effect of corrupting the program counter of the processor in such a way that it points the attacker to a controlled address Purpose

  • Run arbitrary code on a secure device

Why?

  • Riscure saw this behaviour happening while attacking systems

implementing secure boot

What is a wild jungle jump?

slide-4
SLIDE 4

I. Introduction

  • II. Scope
  • III. Research question
  • IV. Related work
  • V. Target overview
  • VI. Approach
  • VII. Set up
  • VIII. Assumptions
  • IX. Results
  • X. Conclusions and future work

Outline

4

slide-5
SLIDE 5

5 Research performed at Riscure in Delft

  • Specialised in side channel analysis and fault injection

FI is a successful and cheap way to attack systems:

  • Cryptographic systems (AES, RSA)
  • Smartcards

Fault injection

  • Clock
  • Temperature
  • Optical (Light)
  • Electromagnetic radiation
  • Power

Introduction

Electromagnetic FI

slide-6
SLIDE 6

6 Power fault injection

  • Insert an impulse or drop of power in the system to change the

behaviour of the processor without interupting its process

Targeting one kind of architecture

  • ARM

Scope

slide-7
SLIDE 7

What is the feasibility of a wild jungle jump?

  • How can the PC be corrupted?
  • What is the likelihood of a glitch corrupting the PC?
  • What are the repercussions of a wild jungle jump?

Research questions

7

slide-8
SLIDE 8
  • No research perfomed around PC corruption with FI
  • 2012

Barenghi et al: Fault injection attacks on cryptographic devices?

  • Memory instructions are the only instructions prone to power FI.
  • 2014

Thessalonikefs: EMFI on a Wandboard

  • Skip instructions

Related work

8

slide-9
SLIDE 9

9 Wandboard

  • Freescale IMX6 platform with an ARM Cortex A9 processor
  • RISC infrastructure
  • 792 MHz (1,26 ns/cycle)
  • 32-bit

Target

This processor is also present in:

slide-10
SLIDE 10

10

Cortex A9 overview

Register architecture

  • 37 registers separated in 7 different banks
  • User bank:

General purpose registers Bank specific Shared by all banks: Define the next instruction to execute Stack Pointer, Link Register, Program Counter Program Status Register

slide-11
SLIDE 11

11

  • Hands on tool to perform FI
  • Assumptions about how to corrupt the PC
  • Code implementation (assembly)
  • Power FI test with wide parameters
  • Result analysis
  • Narrow parameters

raise percentage of success

Approach

slide-12
SLIDE 12

12 Set of hardware provided by Riscure

  • VC glitcher: Glitch generator
  • Glitch Amplifier
  • Picoscope 5203: Digital oscilloscope for monitoring
  • Wandboard

Set of software

  • Picoscope 6.0: Oscilloscope software
  • Inspector FI 4.8.3: Define FI parameters
  • FI GraphIt 1.0: Result analysis tool

Set up

slide-13
SLIDE 13

13

Set up (2)

slide-14
SLIDE 14

14

Set up (3)

slide-15
SLIDE 15

15 To corrupt the PC a glitch could:

  • 1. Skip one or more instructions
  • 2. Corrupt an instruction

Code goals:

  • Prove the feasibility of these assumptions

Assumptions

slide-16
SLIDE 16

16 Target: Set of instructions incrementing a counter Goal: Characterization of such attack vector Results:

  • Counter returned lower values than loop length
  • Difference in number of instructions skipped observed

Success Rate: 45%

Results- Instruction skip characterization

slide-17
SLIDE 17

17 Target: End and start of consecutive functions Goal: Glue functions together

  • Value of the registers set in the first reused in the second

functions

Results: Success Success Rate: 0,01% Remark: Exploitable code could not be found in open source implementation investigated

Results- Instruction skip (2)

slide-18
SLIDE 18

18 Target: MOV instruction i.e. MOV R1, R2 Goal: Flip the destination register (12-15 bit ) to 1 Result: Success! Attack vector: Arbitrary code execution Success Rate: 0,16% Remark: Instruction often present but not controllable by the attacker

Results – Instruction corruption characterization (MOV)

slide-19
SLIDE 19

19 Target: Load instruction Goal: Flip the destination register to PC Attack vector: Memcopy Result: Success!

  • Code execution by copying an address

pointing to the start of the attacker’s code

Success Rate: 3,4 % Remark: Present in U-boot

Results – Instruction corruption (LDR)

slide-20
SLIDE 20

20 Downsides

  • Dependencies to reproduce the attack:
  • compiler version or chain
  • Need of deep understanding of assembly code
  • Finding the right FI parameters can be a tedious job

Wild jungle jump is feasible with power FI

  • By skipping instruction
  • Corrupting a MOV or LDR instruction

Attack is possible in existing implementation

  • Memcopy

Conclusions

slide-21
SLIDE 21

21

  • Prove the possibility of a wild jungle jump in other

architectures (x86, AMD)

  • Find other open source real life example of where a wild

jungle jump can occur

  • Perform a wild jungle jump using other FI techniques

Future work

slide-22
SLIDE 22

References:

¡ EMFI ¡picture ¡ h.ps://www.riscure.com/ ¡ ¡ Fault ¡injec:on ¡a.acks ¡on ¡cryptographic ¡devices: ¡Theory, ¡prac:ce, ¡and ¡

  • countermeasures. ¡Barenghi, ¡Breveglieri, ¡Koren, ¡Naccache. ¡2012 ¡

ARM ¡logo: ¡ h.ps://commons.wikimedia.org/wiki/File:ARM_logo.svg ¡ Wandboard: ¡ h.p://www.wandboard.org/ ¡ I-­‑phone ¡4S, ¡Ipad2, ¡Samsung ¡GS ¡III: ¡ h.ps://wikipedia.org ¡ ARM ¡instruc:on ¡decoding: ¡ +h.p://emucode.blogspot.nl/2010/09/decoding-­‑arm-­‑instruc:on-­‑set.html ¡ Electro ¡Magne:c ¡Fault ¡Injec:on ¡Characteriza:on. ¡George ¡Thessalonikefs ¡2014 ¡

slide-23
SLIDE 23

Questions?

Thank you for your attention