CONTACTLESS PAYMENTS
Joeri de Ruiter
University of Birmingham
(some slides borrowed from Tom Chothia)
CONTACTLESS PAYMENTS Joeri de Ruiter University of Birmingham - - PowerPoint PPT Presentation
CONTACTLESS PAYMENTS Joeri de Ruiter University of Birmingham (some slides borrowed from Tom Chothia) Overview EMV Protocol Attacks EMV-Contactless Protocols Attacks Demo Stopping relay attacks What is
(some slides borrowed from Tom Chothia)
–
Protocol
–
Attacks
–
Protocols
–
Attacks
–
skimming
–
stolen credit cards used with forged signatures
–
card-not-present fraud (EMV-CAP)
–
Merchant: if no EMV is used
–
Customer: if PIN is used
–
Book 1 - Application Independent ICC to Terminal Interface Requirements
–
Book 2 - Security and Key Management
–
Book 3 - Application Specification
–
Book 4 - Cardholder, Attendant, and Acquirer Interface Requirements
–
Additional proprietary specifications
–
3 card authentication methods
–
5 cardholder authentication methods
–
2 types of transactions
–
Authenticate transactions to bank
–
Usually bank has master key and card a derived key
–
Authenticate issuers
–
Authenticate cards
–
Authenticate cards/transactions to terminal
–
Payment scheme's public keys
–
Issuer's public key certificate signed by payment scheme
–
Card's public key certificate signed by issuer
–
Commands
–
Responses
CLA INS P1 P2 Lc Data Le Data SW1 SW2
> 00 20 00 80 08 24 12 34 FF FF FF FF FF
< 90 00
–
Contains list of EMV applets on card
–
Processing Options Data Object List (PDOL) returned indicating data the reader must provide to the card
–
Send data specified in PDOL
–
Application Interchange Profile (AIP) and Application File Locator (AFL) returned
–
Static data signed by issuer in Signed Static Authentication Data (SSAD)
–
Data to be included indicated in AFL and optionally the AIP added
READ RECORD Sig((PAN, PAN Seq.nr., …), skBank)
–
Public key cryptography used
–
Challenge/response mechanism
–
Challenge data specified by Dynamic Data Authentication Data Object List (DDOL)
READ RECORD Sig((PAN,..,pkCard), skBank), DDOL INTERNAL AUTH, nonceT Sig((nonceT, nonceK), skCard)
–
Transaction data signed
–
Data from PDOL, CDOL1, (CDOL2) and other data returned in GENERATE AC command
READ RECORD Sig((PAN,..,pkCard), skBank), CDOL1 GENERATE AC, amount, nonceT,.. Sig((amount, nonceT,.., AC), skCard)
–
Offline
–
Online
Rule 0 If unattended cash: Enciphered PIN verified online Apply succeeding CV rule if this CVM is unsuccessful Rule 1 If manual cash: Enciphered PIN verified online Fail cardholder verification if this CVM is unsuccessful Rule 2 If terminal supports CVM: Enciphered PIN verification performed by card Fail cardholder verification if this CVM is unsuccessful Rule 3 If terminal supports CVM: Enciphered PIN verified online Fail cardholder verification if this CVM is unsuccessful Rule 4 Always: Plaintext PIN verification performed by card Fail cardholder verification if this CVM is unsuccessful
VERIFY '1234' OK (9000)
–
Transaction Certificate (TC)
–
Authorisation Request Cryptogram (ARQC)
–
Application Authentication Cryptogram (AAC)
–
Terminal request a TC in the GENERATE AC command
–
Card replies with a TC or AAC
–
Terminal initiated
–
Card initiated
–
Terminal forwards ARQC to the issuer and receives an Authorisation Response Code (ARC) in return
–
The ARC is included in in the EXTERNAL AUTHENTICATE or the second GENERATE AC command to authenticate the issuer to the card
–
Card replies with a TC or AAC
–
Existing hardware used for pay TV and SIM cards
–
Modifying traffic between card and terminal
–
Data on magnetic stripe also on chip
–
Fake e.dentifiers ABN AMRO replaced in branches
–
Possible for offline transactions
–
Only static data authenticated
–
Yes-card
–
SDA no longer allowed for offline capable cards
–
Possible for offline transactions
–
Terminal cannot determine authenticity of a transaction
–
Transaction not connected to card authentication
INTERNAL AUTH, nonceT Sig((nonceT, nonceK), skKaart) GENERATE AC
AC
–
Possible for both offline and online transactions
–
Man-in-the-middle attack
–
All PIN codes accepted
Source: https://www.cl.cam.ac.uk/research/security/banking/nopin/
–
Rollback to plaintext PIN by modifying the CVM List
–
Possible to perform an online transaction in case of failed data authentication
–
Terminals in the Netherlands patched
–
Attack was still possible
–
Book A: Architecture and General Requirements
–
Book B: Entry Point
–
Book C: Kernel Specification
–
Book D: Contactless Communication Protocol
SELECT 2PAY.SYS.DDF01 AIDs of all payment applets SELECT MasterCard PayPass AID PDOL GET PROCESSING OPTION AIP, AFL
READ RECORD PAN, issuer cert., card cert., CDOL1, ... GENERATE AC Unpredictable Number, .. SDAD, ATC Ks=EncKcard(ATC) AC=MACKs(amount,ATC,currency, UN,..) SDAD=Sign(AC,amount,ATC, currency,UN,..) Ks=EncKcard(ATC) AC=MACKs(amount,ATC,currency, UN,..) SDAD=Sign(AC,amount,ATC, currency,UN,..)
–
Unpredictable Number (UN)
–
Application Transaction Counter
–
Secret Key
–
1 to 3 digits in practice
–
To mag-stripe mode
–
To shorter UN
–
Minimises number of messages
–
fDDA
–
No separate command for cryptogram generation
SELECT 2PAY.SYS.DDF01 AIDs of all payment apps. SELECT Visa app ID PDOL
GPO (amount, currency, UN,. . . ) ATC, AC, SDAD, PAN Generate nonce: Nc Session key based on ATC: Ks=EncKbank(ATC) AC=MACKs(amount,currency,UN,..) SDAD=Sign(amount,currency,UN,Nc..) Generate nonce: Nc Session key based on ATC: Ks=EncKbank(ATC) AC=MACKs(amount,currency,UN,..) SDAD=Sign(amount,currency,UN,Nc..)
READ RECORD Certificates READ RECORD PAN, ..., Nc
– Based on account number and transaction counter
–
“The dangers of verify PIN on contactless cards” [Emms et al. 2012]
– Before Android 4.4 using CyanogenMod – Now using host-based card emulation
– Time for card to complete a purchase: 637ms – Time for relay to complete a purchase: 627ms.
SELECT AIDs GPO
ATC,AC, SDAD, PAN
READ1
Static data
SELECT AID PDOL READ2
SSAD,Nc
READ2
SSAD,Nc
SELECT PDOL UN, amount GPO
ATC,AC,SDAD,PAN AC, SDAD Nc
SELECT AIDs GPO
ATC,AC, SDAD, PAN
READ1
Static data
SELECT AID PDOL READ2
SSAD,Nc
READ2
SSAD,Nc
SELECT PDOL UN, amount GPO
ATC,AC,SDAD,PAN AC, SDAD Nc
–
Secure element
–
SIM-card
–
Whitebox crypto