Reading Track2 Data from an EMV Chip Card using Microexpert’s MxAPDUTool

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

Using the MXApduTool application I will show you how to read Track2 data from a chip card, first step is to download our free MXApduTool Application from the resources section under our tools. The MXApduTool is an executable file that can send APDU commands to a chip card.


1. Run MxApduTool.exe found in the zip file. 


mx apdu tool

A command APDU is sent by the reader to the card – it contains
a mandatory 4-byteheader (CLA, INS, P1, P2) and from 0 to 255
bytes of data.

A response APDU is sent by the card to the reader
– it contains from 0 to 65 536 bytes of data, and 2 mandatory
status bytes (SW1, SW2).

 apdu command


2. Select your card reader.
card reader

3. Once you have selected your card reader select the Payment system Environment DDF (Directory Definition File) 1PAY.SYS.DDF01
00A404000E315041592E5359532E4444463031

1pay
Click Send

Card: PC/SC card in OMNIKEY CardMan 5x21 0, protocol T=0, state OK
 Channel is: PC/SC channel
Card Connected....
Response... 6f1a840e315041592e5359532e4444463031a5088801015f2d02656e9000 

9000 = the command was successfully executed.


4. Next we need to read the ADF (Application Directory File) index to get the AID (Application Identification).
00B2010C00

read adf
Click Send

Card: PC/SC card in OMNIKEY CardMan 5x21 0, protocol T=0, state OK
Channel is: PC/SC channel
Card Connected....
Response... 701d611b4f07a00000000310105010424152434c41594341524420564953419000 

AID (Application identificatation) = a0000000031010 7 bytes long with a start tag of 4f70


5. We now need to select the AID that we got from the ADF index.
00A4040007a000000003101000

aid select
Click Send

Card: PC/SC card in OMNIKEY CardMan 5x21 0, protocol T=0, state OK
Channel is: PC/SC channel
Card Connected....
Response... 6f228407a0000000031010a5175010424152434c41594341524420564953415f2d02656e9000

6. Finally read the AID.
00B2010C00

read aid
Click Send

Card: PC/SC card in OMNIKEY CardMan 5x21 0, protocol T=0, state OK
Channel is: PC/SC channel
Card Connected....
Response... 704d5713XXXXXXXXXXXXXXXXd11022010012900000001f5f201a4fXXXXXXXXXX20202020202020202020202020202020202020209f1f183030303030303030303030303030303132393030303030309000 

 

 Tag  Name  Length Value
 70  Data Field 4d(hex), 77(dec), 154 nibbles

5713XXXXXXXXXXXXXXXXd11022010012900000001f5f201a4fXXXXXXXXXX20202020202020202
020202020202020202020209f1f18303030303030303030303030303030313239303030303030

  Tag  Name Length Value
  57  Track 2 Equivalent Data 13(hex), 19(dec), 38 nibbles XXXXXXXXXXXXXXXXd11022010012900000001f
  5f20 Card Holder Name 1a(hex), 26(dec), 52 nibbles 4fXXXXXXXXXX2020202020202020202020202
020202020202020
  9F1F Track 1 Discretionary Data 18(hex), 24(dec), 48 nibbles 303030303030303030303030303030313239303030303030

 
Decoding the hexadecimal text you can use a free online hex converter http://string-functions.com/hex-string.aspx.


Chip Map Overview

 

chip map overview

Latest Tweets

Microexpert Limited
Samsung S8 'eye security' fooled by photo https://t.co/YiddeeK7ke
Microexpert Limited
Victims of last week’s cyberattack may have hope to unlock data lost on their computers https://t.co/FAWYfNQWhs via @WSJ
Follow Microexpert Limited on Twitter