无法识别智能卡上的AFL [英] Unable to identify AFL on a smart card

查看:154
本文介绍了无法识别智能卡上的AFL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力使用卡住的AID清单从VISA信用卡中获取有用的数据.

I'm working to get useful data from a VISA (such as PAN, expiry date...) credit card using a list of AIDs I got stuck.

我已经能够手动访问所有数据.使用下一个教程: http://www.openscdp.org/scripts/tutorial/emv/reademv.html

I have been able to access to all the data manually. Using the next tutorial: http://www.openscdp.org/scripts/tutorial/emv/reademv.html

>>00 A4 04 00 07 A0 00 00 00 03 10 10 00

使用ASCII:

<<o<EM>„<BEL> <0><0><0><ETX><DLE><DLE>¥<SO>P<EOT>VISA¿<FF><ENQ>ŸM<STX><VT><LF><0>

十六进制:

<<6F 19 84 07 A0 00 00 00 03 10 10 A5 0E 50 04 56 49 53 41 BF 0C 05 9F 4D 02 0B 0A 90 00

之后,我使用了:

>>33 00 B2 01 0C 00 //sfi1, rec1
...
...
>>33 00 B2 10 FC 00 //sfi31, rec16

我继续学习该教程,并了解到获取数据的正确方法是使用GPO(获取处理选项)命令.并尝试下一个:

I continued with the tutorial and learned that the proper way to obtain the data was using GPO (Get Processing Options) command. And tried that next:

>>80 A8 00 00 0D 83 0B 00 00 00 00 00 00 00 00 00 00 00 00 // pdo = 83 0B 00 00 00 00 00 00 00 00 00 00 00 which suposse to be the correct one for VISA.
<< 69 85

因此不能满足使用条件.

So the condition of use is not satisfied.

>> 80 A8 00 00 02 83 00 00 //pdo= 83 00 that should work with every non visa card
<< 80 0E 3C 00 08 01 01 00 10 01 04 00 18 01 03 01 90 00

如果此响应是正确的,并且对我来说很好,因为它开始于80,结束于90 00,则我无法识别AFL,我认为这使我能够确定PAN的到期日期.有人可以帮我吗?

If this response is correct and it looks quite well for me as it starts by 80 and ends by 90 00, I am not able to identify AFL which I think that would make me possible to determine the PAN, expiry date... Can somebody help me?

推荐答案

您收到的针对选择命令(00 A4 0400 07 A0000000031010 00)的FCI解码为

The FCI that you received in response to the select command (00 A4 0400 07 A0000000031010 00) decodes to


6F 19  (File Control Information (FCI) Template)
    84 07  (Dedicated File (DF) Name)
        A0000000031010
    A5 0E  (File Control Information (FCI) Proprietary Template)
        50 04  (Application Label)
            56495341  ("VISA")
        BF0C 05  (File Control Information (FCI) Issuer Discretionary Data)
            9F4D 02  (Log Entry)
                0B0A  (SFI = 11; # of records = 10)

此FCI不包含任何PDOL(处理选项数据列表).因此,您需要为PDOL假定一个默认值(这是您的卡类型的空列表).因此,"GET PROCESSING OPTIONS"命令中与PDOL相关的数据字段必须为空:

This FCI does not include any PDOL (processing options data list). Consequently, you need to assume a default value for the PDOL (which is an empty list for your card type). Consequently, the PDOL-related data field in the GET PROCESSING OPTIONS command must be empty:


83 00

其中0x83是与PDOL相关的数据的标记,0x00是零字节的长度.

Where 0x83 is the tag for PDOL-related data and 0x00 is a length of zero bytes.

因此,正确的GPO命令是(如您所知):

Thus, the correct GPO command is (as you already found out):


80 A8 0000 02 8300 00

您得到了答复


800E3C00080101001001040018010301 9000

此解码为


80 0E  (Response Message Template Format 1)
    3C00  (Application Interchange Profile)
    08010100 10010400 18010301  (Application File Locator)

因此,应用程序文件定位器包含以下三个条目:

Consequently, the Application File Locator contains the following three entries:

  • 08010100:SFI = 1,第一条记录= 1,最后一条记录= 1,脱机数据身份验证涉及的记录= 0
  • 10010400:SFI = 2,第一条记录= 1,最后一条记录= 4,离线数据身份验证中涉及的记录= 0
  • 18010301:SFI = 3,第一条记录= 1,最后一条记录= 3,涉及脱机数据身份验证的记录= 1
  • 08010100: SFI = 1, first record = 1, last record = 1, records involved in offline data authentication = 0
  • 10010400: SFI = 2, first record = 1, last record = 4, records involved in offline data authentication = 0
  • 18010301: SFI = 3, first record = 1, last record = 3, records involved in offline data authentication = 1

因此,您可以使用READ RECORD命令读取这些记录:

Consequently, you can read those record with the READ RECORD commands:


00 B2 010C 00
00 B2 0114 00
00 B2 0214 00
00 B2 0314 00
00 B2 0414 00
00 B2 011C 00
00 B2 021C 00
00 B2 031C 00

这篇关于无法识别智能卡上的AFL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆