EMV (Chip & PIN) Protocol: Märt Bakhoff Supervised: Arnis Paršovs
EMV (Chip & PIN) Protocol: Märt Bakhoff Supervised: Arnis Paršovs
Märt Bakhoff
Supervised: Arnis Paršovs
Objective
● Osmocom Simtrace
● “upgraded” cardreader
● Visa Electron card
● friendly merchant
Simtrace
MITM board for SIM cards
TERMINAL >
Request:
file '1PAY.SYS.DDF01'
Response:
ShortFileIdentifier of directory element: 1
language preference: et,en,ru,de
00 B2 READ RECORD
Request:
ShortFileIdentifier: 1; record: 1
Response:
application identifier: VISA electron
application priority: 1
00 B2 READ RECORD
Request:
ShortFileIdentifier: 1; record: 2
Response:
File not found
00 C0 GET RESPONSE
Request:
empty
Response:
application id: Visa Electron
application priority: 1
language preference: et,en,ru,de
issuer url: 0x9f4d020b14
80 A8 GET PROCESSING OPTS
Request:
empty list
Response:
dynamic data authentication (DDA) supported,
cardholder verification supported,
perform terminal risk mgmt supported,
issuer authentication supported
locations of data records:
SFI1, record 1-1
SFI2, record 1-6
00 B2 READ RECORD
Request:
SFI:1, record: 1
Response:
card number: xx xx xx xx 37 64 61 73
expiration date: 14 12
cardholder name: BAKHOFF/MART
00 B2 READ RECORD
Request:
SFI:2, record: 1
Response:
Application Effective Date: 12 10 01
Application Expiration Date: 14 12 31
Application Usage Control: all allowed
Primary Account Number: xxxx xxxx 3764 6173
CDOL1, CDOL2, CVM
Issuer country code: 0x0233
00 B2 READ RECORD
Request:
SFI:2, record: 2
Response:
Issuer Public Key Certificate
Issuer Public Key Exponent
Issuer Public Key Remainder
00 B2 READ RECORD
Request:
SFI:2, record: 3
Response:
DDOL
ICC Public Key Exponent
00 B2 READ RECORD
Request:
SFI:2, record: 4
Response:
ICC Public Key Certificate
00 B2 READ RECORD
Request:
SFI:2, record: 5
Response:
ICC PIN Encipherment Public Key Certificate
ICC PIN Encipherment Public Key Exponent
00 B2 READ RECORD
Request:
SFI:2, record: 6
Response:
Application Version Number: 0x008c
Service Code: 0x0221
Application Currency Code: 0x0978
Application Currency Exponent: 2
00 88 INTERNAL AUTHENTICATE
Request:
(DDOL) 4 bytes nonce 0xd6834217
Response:
Signed Dynamic Application Data
80 CA GET DATA
Request:
pin try counter
Response:
PIN Try Counter: 3 remaining
00 84 GET CHALLENGE
Request:
empty
Response:
6e 46 d1 ff 7f 6e 61 30
(8-byte nonce generated by the ICC)
00 20 VERIFY
Request:
encrypted pin
Response:
ok
80 AE GENETATE AC
Request:
request ARQC (online mode)
amount: 0.99
terminal country code: 0x0233
TVR: transaction exeeds floor limit
transaction date: 14 09 25
nonce: 4 bytes
Response:
Application Transaction Counter (ATC): 0x0377
Application Cryptogram: ac 74 08 bb 16 b2 b8 6d
00 82 EXTERNAL AUTHENTICATE
Request:
Issuer Authentication Data:
83 1c 2b df 91 08 e0 70 30 30
Response:
ok
80 AE GENERATE AC
Request:
request transaction certificate
authorization response code: 0x3030
amount: 0.99
terminal country code: 0x0233
TVR: transaction exeeds floor limit
transaction date: 14 09 25
nonce: 4 bytes
Response:
Application Transaction Counter (ATC): 0x0377
Application Cryptogram: c2 f1 92 98 bd 19 a7 fe
Q/A
References
● www.emvco.com/specifications.aspx
● www.level2kernel.com/flow-chart.html
● cotignac.co.nz/emv-offline-data-authentication