Differential Attacks on PIN Processing APIs Graham Steel LSV - - PowerPoint PPT Presentation

differential attacks on pin processing apis
SMART_READER_LITE
LIVE PREVIEW

Differential Attacks on PIN Processing APIs Graham Steel LSV - - PowerPoint PPT Presentation

Differential Attacks on PIN Processing APIs Graham Steel LSV Overview Photo: redspotted/Flickr 1/15 Verizon Breach Report 2008 Released April 2009 2/15 Verizon Breach Report 2008 Released April 2009 While statistically not a large


slide-1
SLIDE 1

Differential Attacks

  • n PIN Processing APIs

Graham Steel LSV

slide-2
SLIDE 2

1/15

Overview

Photo: redspotted/Flickr

slide-3
SLIDE 3

2/15

Verizon Breach Report 2008

Released April 2009

slide-4
SLIDE 4

2/15

Verizon Breach Report 2008

Released April 2009 “While statistically not a large percentage of our overall caseload in 2008, attacks against PIN information represent individual data-theft cases having the largest aggregate exposure in terms of unique records,” “In other words, PIN-based attacks and many of the very large compromises from the past year go hand in hand.”

slide-5
SLIDE 5

2/15

Verizon Breach Report 2008

Released April 2009 “While statistically not a large percentage of our overall caseload in 2008, attacks against PIN information represent individual data-theft cases having the largest aggregate exposure in terms of unique records,” “In other words, PIN-based attacks and many of the very large compromises from the past year go hand in hand.” “We’re seeing entirely new attacks that a year ago were thought to be only academically possible,”

slide-6
SLIDE 6

2/15

Verizon Breach Report 2008

Released April 2009 “While statistically not a large percentage of our overall caseload in 2008, attacks against PIN information represent individual data-theft cases having the largest aggregate exposure in terms of unique records,” “In other words, PIN-based attacks and many of the very large compromises from the past year go hand in hand.” “We’re seeing entirely new attacks that a year ago were thought to be only academically possible,” “What we see now is people going right to the source [..] and stealing the encrypted PIN blocks and using complex ways to un-encrypt the PIN blocks.” (Quotes from Wired Magazine interview with report author, Bryan Sartin)

slide-7
SLIDE 7

3/15

Cash Machine Network

ATM HSBC Maestro UK SocGen

slide-8
SLIDE 8

4/15

HSMs

Manufacturers include IBM, VISA, nCipher, Thales, Utimaco, HP Cost around $10 000

slide-9
SLIDE 9

5/15

Deriving a PIN: IBM 3624 Method

IPIN derived by: Encode account number (PAN) as 0000AAAAAAAAAAAA

slide-10
SLIDE 10

5/15

Deriving a PIN: IBM 3624 Method

IPIN derived by: Encode account number (PAN) as 0000AAAAAAAAAAAA 3DES encrypt under a PDK (PIN Derivation Key)

slide-11
SLIDE 11

5/15

Deriving a PIN: IBM 3624 Method

IPIN derived by: Encode account number (PAN) as 0000AAAAAAAAAAAA 3DES encrypt under a PDK (PIN Derivation Key) Take 4 leftmost hexadecimal digits of result

slide-12
SLIDE 12

5/15

Deriving a PIN: IBM 3624 Method

IPIN derived by: Encode account number (PAN) as 0000AAAAAAAAAAAA 3DES encrypt under a PDK (PIN Derivation Key) Take 4 leftmost hexadecimal digits of result Decimalise using a mapping table (’dectab’) 0123456789ABCDEF 0123456789012345

slide-13
SLIDE 13

5/15

Deriving a PIN: IBM 3624 Method

IPIN derived by: Encode account number (PAN) as 0000AAAAAAAAAAAA 3DES encrypt under a PDK (PIN Derivation Key) Take 4 leftmost hexadecimal digits of result Decimalise using a mapping table (’dectab’) 0123456789ABCDEF 0123456789012345 PIN = IPIN + Offset (modulo 10 each digit)

slide-14
SLIDE 14

6/15

PIN Processing API

Verify PIN:

{PIN}K,PAN,Dectab → Offset

yes/no

K, PDK

slide-15
SLIDE 15

6/15

PIN Processing API

Verify PIN:

{PIN}K,PAN,Dectab → Offset

yes/no

K, PDK If host machine is attacked, PIN should remain secure (ANSI X7.8, ISO 9564 requirement)

slide-16
SLIDE 16

7/15

Decimalisaton Table Attack (Clulow ’02, Bond & Zeilinski ’03)

Suppose in a hacked switch, an attacker has a set

{PIN}K,PAN,Dectab,Offset that verifies PIN is correct

slide-17
SLIDE 17

7/15

Decimalisaton Table Attack (Clulow ’02, Bond & Zeilinski ’03)

Suppose in a hacked switch, an attacker has a set

{PIN}K,PAN,Dectab,Offset that verifies PIN is correct

Original Dectab 0123456789ABCDEF 0123456789012345 Dectab’ 0123456789ABCDEF 1123456789112345

slide-18
SLIDE 18

7/15

Decimalisaton Table Attack (Clulow ’02, Bond & Zeilinski ’03)

Suppose in a hacked switch, an attacker has a set

{PIN}K,PAN,Dectab,Offset that verifies PIN is correct

Original Dectab 0123456789ABCDEF 0123456789012345 Dectab’ 0123456789ABCDEF 1123456789112345 Repeat verification command with Dectab’ Successfull verification indicates no 0s in PIN

slide-19
SLIDE 19

8/15

More dectab attack

To find the 0s, try changing the offset Attacker set offset Result from HSM Knowledge of PIN 0001 Incorrect PIN ???? 0010 Incorrect PIN ???? 0100 Incorrect PIN ???? 1000 Incorrect PIN ???? 0011 Incorrect PIN ???? 0101 Correct PIN ?0?0

slide-20
SLIDE 20

9/15

More PIN Cracking Attacks

Dectab attacks Reformatting attacks Check value attack Calculate offset attack Competing verification algorithms attack All require attacker to make ‘tweaked’ queries to HSM

slide-21
SLIDE 21

10/15

Preventing Tweaked Queries

We use a Message Authentication Code (MAC) Existing MAC on card: CVV/CVC - Card Verification Value(/Code) 5 decimal digits Designed to make construction of fake cards more difficult

slide-22
SLIDE 22

10/15

Preventing Tweaked Queries

We use a Message Authentication Code (MAC) Existing MAC on card: CVV/CVC - Card Verification Value(/Code) 5 decimal digits Designed to make construction of fake cards more difficult PAN Exp date Service code 0 pad 16 digits max 4 digits 3 digits 9 digits max Block B1 Block B2

slide-23
SLIDE 23

10/15

Preventing Tweaked Queries

We use a Message Authentication Code (MAC) Existing MAC on card: CVV/CVC - Card Verification Value(/Code) 5 decimal digits Designed to make construction of fake cards more difficult PAN Exp date Service code 0 pad 16 digits max 4 digits 3 digits 9 digits max Block B1 Block B2 2-part DES key K1, K2.

CVVhex := enc(K1,dec(K2,enc(K1,(enc(K1,B1)⊕B2))))

slide-24
SLIDE 24

11/15

CVV’

We add the data required for a verification query to the MAC Dectab Offset/PVV

  • riginal CVV

0 pad 16 digits 4 digits 5 digits 7 digits Block B1’ Block B2’

slide-25
SLIDE 25

12/15

Operation of Scheme

CVV’ is written onto card at issue time CVV’ is sent along with trial PIN from each ATM transaction Intermediate switches simply pass along the CVV’ At the verification facility, the supplied CVV’ is checked against the true derived value instead of full MAC If the CVV’ matches, the query is processed Otherwise, the query is refused

slide-26
SLIDE 26

13/15

Evaluation - Advantages

CVV’ can be calculated in advance

  • can be written to magstripe track 2, just like CVV

Existing infrastructure already passes track 2 through network

  • no need for costly changes to infrastructure

Institutions can choose to upgrade individually

  • no need to await standardization
slide-27
SLIDE 27

14/15

Evaluation - Disadvantages

Low entropy of MAC allows brute force attack

  • though overhead for PIN cracking attacks considerably increased

Does not address translation command attacks

  • that would require point to point MACs, bigger overhead

Change needed to HSM software

  • maybe not a big deal
slide-28
SLIDE 28

14/15

Evaluation - Disadvantages

Low entropy of MAC allows brute force attack

  • though overhead for PIN cracking attacks considerably increased

Does not address translation command attacks

  • that would require point to point MACs, bigger overhead

Change needed to HSM software

  • maybe not a big deal

Circulated in ANSI X.7

slide-29
SLIDE 29

15/15

Further Reading

Wired Magazine, PIN Crackers Nab Holy Grail of Bank Card Security http://www.wired.com/threatlevel/2009/04/pins/

  • G. Steel. Formal analysis of PIN block attacks. Theoretical Computer

Science 367(1-2), 2006.

  • R. Focardi, F

. L. Luccio and G. Steel. Blunting Differential Attacks on PIN Processing APIs. In NordSec’09, LNCS 5838.

  • M. Centenaro, R. Focardi, F

. L. Luccio and G. Steel. Type-based Analysis

  • f PIN Processing APIs. In ESORICS’09, LNCS 5789

Mohammad Mannan, P .C. van Oorschot. Reducing threats from flawed security APIs: The banking PIN case, Computers & Security 28 (6), 2009.