For a little while now I have been working on a utility to allow you to query and view the contents of the chip on your Chip & PIN / EMV smart card.
I’ve been working in .net which meant lots of P/Invoke calls to the Microsoft Smartcard API’s to access the PC/SC reader hardware. There were a few samples out there and http://www.pinvoke.net/ is always a great resource, but most of the P/Invoke implementations had problems in one way or another, notably using Int rather than IntPtr which meant things didn’t work correctly on 64 bit windows. 🙁
Anyway after a while I managed to create a PCSC interop assembly that allowed me to communicate with my smart card reader correctly in both 32 bit and 64 bit Windows.
Next I had to read through my copies of the EMVCo and ISO 7816 specs and figure out exactly what calls I had to make through my PCSC interop assembly to get all the information. Needless to say I’ve been keeping busy in my spare time. 🙂
Once a card has been read, the results can be saved off into an XML file which looks something like this
<?xml version="1.0" encoding="utf-8"?> <card> <application aid="315041592E5359532E4444463031"> <fileControlInformation> <tlv tag="6F" length="21" value="840E315041592E5359532E4444463031A503880101" description="FCI Template"> <tlv tag="84" length="14" value="315041592E5359532E4444463031" description="Dedicated File (DF) Name" /> <tlv tag="A5" length="3" value="880101" description="FCI Proprietary Template"> <tlv tag="88" length="1" value="01" description="Short File Identifier (SFI)" /> </tlv> </tlv> </fileControlInformation> <elementaryFile sfi="1"> <record number="1"> <tlv tag="70" length="26" value="61184F07A0000000041010500A4D415354455243415244870100" description="Application Elementary File (AEF) Data Template"> <tlv tag="61" length="24" value="4F07A0000000041010500A4D415354455243415244870100" description="Application Template"> <tlv tag="4F" length="7" value="A0000000041010" description="Application Identifier" /> <tlv tag="50" length="10" value="4D415354455243415244" description="Application Label" /> <tlv tag="87" length="1" value="00" description="Application Priority Indicator" /> </tlv> </tlv> </record> </elementaryFile> </application> <application aid="A0000000041010"> <fileControlInformation> <tlv tag="6F" length="26" value="8407A0000000041010A50F500A4D415354455243415244870100" description="FCI Template"> <tlv tag="84" length="7" value="A0000000041010" description="Dedicated File (DF) Name" /> <tlv tag="A5" length="15" value="500A4D415354455243415244870100" description="FCI Proprietary Template"> <tlv tag="50" length="10" value="4D415354455243415244" description="Application Label" /> <tlv tag="87" length="1" value="00" description="Application Priority Indicator" /> </tlv> </tlv> </fileControlInformation> <applicationInterchangeProfile> <tlv tag="77" length="14" value="8202380094080801030010010201" description="Response Message Template Format 2"> <tlv tag="82" length="2" value="3800" description="Application Interchange Profile" /> <tlv tag="94" length="8" value="0801030010010201" description="Application File Locator (AFL)" /> </tlv> </applicationInterchangeProfile> <elementaryFile sfi="1"> <record number="1"> <tlv tag="70" length="75" value="57115126879725594332D1310201000009022F5F200D4841525249532F5420412E4D539F1F2530303030303930323230303030303030303030303030303030303030303030303030303030" description="Application Elementary File (AEF) Data Template"> <tlv tag="57" length="17" value="5126879725594332D1310201000009022F" description="Track 2 Equivalent Data" /> <tlv tag="5F20" length="13" value="4841525249532F5420412E4D53" description="Cardholder Name" /> <tlv tag="9F1F" length="37" value="30303030303930323230303030303030303030303030303030303030303030303030303030" description="Track 1 Discretion Data" /> </tlv> </record> <record number="2"> <tlv tag="70" length="192" value="8F010490819071BC689B75117A4057CF5EB8702B230517242C8688EE14D5E22C59A7B097F5FA530DA0099808427082F06DEE3418E282745F74BAC0CE69F5F9F4FCE1C5D8811589CA586FBA029C9BD24EBDA94DBB90F406F338FD03C3D45773FE7E70FA4F9A60401AF3286B0116E761A287D5B20E8720F61D5A86B0389B0AE63A7C7F4E5519D0EB5CF1A03383F9F32AED0732AB5FF4549F3201039224672FF3648DF7D9D044938C2C7075221FCA1D1C2FD0BE9C6ADBB8CAE04DAA1E630E31C4AB" description="Application Elementary File (AEF) Data Template"> <tlv tag="8F" length="1" value="04" description="Certification Authority Public Key Index" /> <tlv tag="90" length="144" value="71BC689B75117A4057CF5EB8702B230517242C8688EE14D5E22C59A7B097F5FA530DA0099808427082F06DEE3418E282745F74BAC0CE69F5F9F4FCE1C5D8811589CA586FBA029C9BD24EBDA94DBB90F406F338FD03C3D45773FE7E70FA4F9A60401AF3286B0116E761A287D5B20E8720F61D5A86B0389B0AE63A7C7F4E5519D0EB5CF1A03383F9F32AED0732AB5FF454" description="Issuer Public Key Certificate" /> <tlv tag="9F32" length="1" value="03" description="Issuer Public Key Exponent" /> <tlv tag="92" length="36" value="672FF3648DF7D9D044938C2C7075221FCA1D1C2FD0BE9C6ADBB8CAE04DAA1E630E31C4AB" description="Issuer Public Key Remainder" /> </tlv> </record> <record number="3"> <tlv tag="70" length="171" value="9F49039F37049F4681903E6A8D020BA3B7BCE1B04E4E91B0E78A8385191A4A19A8584D29540E24EFC78D7FE736F058BC06B373BF3721DBFFEA423FFF4EDBEFEA88DA5C7FCA69F3FBE304FB03D94E48C01DDEFA4D2307AA96444FE67F8319BCDA5F5077117A59FF142723E7DEBF0D59D55CA8C00089AD8DC12E3845A3D95B89C1012CB4B2F9D0825C75687967D9A76EB55CBE5A31503DEC8D3EC49F4701039F480A7027937B3E8A771F6391" description="Application Elementary File (AEF) Data Template"> <tlv tag="9F49" length="3" value="9F3704" description="Dynamic Data Authentication Data (DDOL)" /> <tlv tag="9F46" length="144" value="3E6A8D020BA3B7BCE1B04E4E91B0E78A8385191A4A19A8584D29540E24EFC78D7FE736F058BC06B373BF3721DBFFEA423FFF4EDBEFEA88DA5C7FCA69F3FBE304FB03D94E48C01DDEFA4D2307AA96444FE67F8319BCDA5F5077117A59FF142723E7DEBF0D59D55CA8C00089AD8DC12E3845A3D95B89C1012CB4B2F9D0825C75687967D9A76EB55CBE5A31503DEC8D3EC4" description="ICC Public Key Certificate" /> <tlv tag="9F47" length="1" value="03" description="ICC Public Key Exponent" /> <tlv tag="9F48" length="10" value="7027937B3E8A771F6391" description="ICC Public Key Remainder" /> </tlv> </record> </elementaryFile> <elementaryFile sfi="2"> <record number="1" staticDataAuthentication="true"> <tlv tag="70" length="133" value="5F25031008015F24031310319F0702FF005A0851268797255943325F3401219F0D05B860AC80009F0E0500100000009F0F05B868BC98005F280208268E120000000000000000420141031E0302031F039F4A01828C219F02069F03069F1A0295055F2A029A039C019F37049F35019F45029F4C089F34038D0C910A8A0295059F37049F4C08" description="Application Elementary File (AEF) Data Template"> <tlv tag="5F25" length="3" value="100801" description="Application Effective Date" /> <tlv tag="5F24" length="3" value="131031" description="Application Expiration Date" /> <tlv tag="9F07" length="2" value="FF00" description="Application Usage Control" /> <tlv tag="5A" length="8" value="5126879725594332" description="Primary Account Number (PAN)" /> <tlv tag="5F34" length="1" value="21" description="Application PAN Sequence Number" /> <tlv tag="9F0D" length="5" value="B860AC8000" description="Issuer Action Code - Default" /> <tlv tag="9F0E" length="5" value="0010000000" description="Issuer Action Code - Denial" /> <tlv tag="9F0F" length="5" value="B868BC9800" description="Issuer Action Code - Online" /> <tlv tag="5F28" length="2" value="0826" description="Issuer Country Code" /> <tlv tag="8E" length="18" value="0000000000000000420141031E0302031F03" description="Cardholder Verification Method (CVM) List" /> <tlv tag="9F4A" length="1" value="82" description="Static Data Authentication Tag List" /> <tlv tag="8C" length="33" value="9F02069F03069F1A0295055F2A029A039C019F37049F35019F45029F4C089F3403" description="Card Risk Management Data 1 (CDOL1)" /> <tlv tag="8D" length="12" value="910A8A0295059F37049F4C08" description="Card Risk Management Data 2 (CDOL2)" /> </tlv> </record> <record number="2"> <tlv tag="70" length="19" value="9F080200029F420208265F300202019F440102" description="Application Elementary File (AEF) Data Template"> <tlv tag="9F08" length="2" value="0002" description="Application Version Number" /> <tlv tag="9F42" length="2" value="0826" description="Application Currency Code" /> <tlv tag="5F30" length="2" value="0201" description="Service Code" /> <tlv tag="9F44" length="1" value="02" description="Application Currency Exponent" /> </tlv> </record> </elementaryFile> </application> </card>
If you have got a PC/SC compliant device in your PC and you are running Windows Vista or later and want to have a play the install package can be found here.
History
•0.0.1-First public release
As a person who works in the smartcard world I would like to say that your PCSC implementation is very good.
Hello, Your product looks great! I have downloaded it. I work in the credit card industry, I hoping to use your product to do a quick audit of our card personalization bureau. Can you recommend a USB card reader; there are so many out there, I just don’t know if one is better than another specifically for EMV cards. Any assistance you can provide is mose helpful.
Sincerely,
Kathryn
Any PC/SC compliant card reader should be fine. I don’t have any USB devices to test with. I use the card reader built into my laptop.
Tried your software not compatible with xp
is there another version available or not.
Hi Nic,
Great tool. Do you perform any contract work for reading EMV cards? It seems like we need some modification done to your tool in order for it to read our card.
Thanks
Hi Sam, I’m not sure what modifications you are looking for, but the source code for the EMV Card browser is available on http://github.com.
We downloaded the source and it seems that our card is not sending back the expected response of 90 and 00 for SW1 and SW2. We also ran the java emv reader found on code.google.com and it too had trouble but it managed to show the unrecognized data on the card including the PAN. I’ll send a dump of the Apdu commands from the java reader later today.
Thanks
Sorry for the delay. Here’s the response from the Java EMV reader (PAN has been Xed out):
Java EMV Reader built on 20121118-0124
Please insert an EMV card into any attached reader.
OK, card found
————————————————
[Step 1] SELECT FILE NONEXISTINGFILE to warm up the card/terminal/connection
————————————————
00 a4 04 00 0f 4e 4f 4e 45 58 49 53 54 49 4e 47
46 49 4c 45 00
response hex :
response SW1SW2 : 6a 82 (File or application not found)
response ascii :
response parsed :
————————————————
[Step 2] SELECT FILE Master File (if available)
————————————————
00 a4 00 00 00 00
response hex :
response SW1SW2 : 6a 86 (Incorrect parameter(s) P1 P2)
response ascii :
————————————————
[Step 3] SELECT FILE Master File by identifier (if available)
————————————————
00 a4 00 00 02 3f 00 00
response hex :
response SW1SW2 : 6a 86 (Incorrect parameter(s) P1 P2)
response ascii :
————————————————
[Step 4] SELECT FILE 1PAY.SYS.DDF01 to get the PSE directory
————————————————
00 a4 04 00 0e 31 50 41 59 2e 53 59 53 2e 44 44
46 30 31 00
response hex :
response SW1SW2 : 6a 82 (File or application not found)
response ascii :
response parsed :
————————————————
[Step 5] SELECT FILE 2PAY.SYS.DDF01 to get the PPSE directory
————————————————
00 a4 04 00 0e 32 50 41 59 2e 53 59 53 2e 44 44
46 30 31 00
response hex :
6f 23 84 0e 32 50 41 59 2e 53 59 53 2e 44 44 46
30 31 a5 11 bf 0c 0e 61 0c 4f 07 a0 00 00 00 04
10 10 87 01 01
response SW1SW2 : 90 00 (Success)
response ascii : o#..2PAY.SYS.DDF01…..a.O………..
response parsed :
6f 23 — File Control Information (FCI) Template
84 0e — Dedicated File (DF) Name
32 50 41 59 2e 53 59 53 2e 44 44 46 30 31 (BINARY)
a5 11 — File Control Information (FCI) Proprietary Template
bf 0c 0e — File Control Information (FCI) Issuer Discretionary Data
61 0c — Application Template
4f 07 — Application Identifier (AID) – card
a0 00 00 00 04 10 10 (BINARY)
87 01 — Application Priority Indicator
01 (BINARY)
————————————————
[Step 6] Select application by AID
————————————————
00 a4 04 00 07 a0 00 00 00 04 10 10 00
response hex :
6f 17 84 07 a0 00 00 00 04 10 10 a5 0c 50 0a 4d
61 73 74 65 72 43 61 72 64
response SW1SW2 : 90 00 (Success)
response ascii : o…………P.MasterCard
response parsed :
6f 17 — File Control Information (FCI) Template
84 07 — Dedicated File (DF) Name
a0 00 00 00 04 10 10 (BINARY)
a5 0c — File Control Information (FCI) Proprietary Template
50 0a — Application Label
4d 61 73 74 65 72 43 61 72 64 (=MasterCard)
————————————————
[Step 7] Send GET PROCESSING OPTIONS command
————————————————
80 a8 00 00 02 83 00 00
response hex :
77 0a 82 02 00 00 94 04 08 01 01 00
response SW1SW2 : 90 00 (Success)
response ascii : w………..
response parsed :
77 0a — Response Message Template Format 2
82 02 — Application Interchange Profile
00 00 (BINARY)
94 04 — Application File Locator (AFL)
08 01 01 00 (BINARY)
————————————————
[Step 8] Send READ RECORD to read SFI 1 record 1
————————————————
00 b2 01 0c 00
response hex :
70 6a 9f 6c 02 00 01 56 29 42 XX XX XX XX XX XX
XX XX XX XX XX XX XX XX XX XX 5e 20 2f 5e 31 38
30 36 31 30 31 30 31 31 30 30 30 30 30 30 30 30
30 30 9f 64 01 04 9f 62 06 00 00 00 00 00 38 9f
63 06 00 00 00 00 03 c6 9f 65 02 00 38 9f 66 02
03 c6 9f 6b 13 63 70 01 10 00 00 61 28 d1 80 61
01 01 10 00 00 00 00 0f 9f 67 01 04
response SW1SW2 : 90 00 (Success)
response ascii : pj.l…V)BXXXXXXXXXXXXXXXX^ /^XXXX1010110000000000.d…b……8.c……..e..8.f….k.cp….a(..a………g..
response parsed :
70 6a — Record Template (EMV Proprietary)
9f 6c 02 — [UNHANDLED TAG]
00 01 (BINARY)
56 29 — [UNHANDLED TAG]
42 XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
XX 5e 20 2f 5e 31 38 30 36 31 30 31 30 31 31 30
30 30 30 30 30 30 30 30 30 (BINARY)
9f 64 01 — [UNHANDLED TAG]
04 (BINARY)
9f 62 06 — [UNHANDLED TAG]
00 00 00 00 00 38 (BINARY)
9f 63 06 — [UNHANDLED TAG]
00 00 00 00 03 c6 (BINARY)
9f 65 02 — Maximum length of data field in command message
00 38 (BINARY)
9f 66 02 — Terminal Transaction Qualifiers
03 c6 (BINARY)
9f 6b 13 — [UNHANDLED TAG]
XX XX XX XX XX XX XX XX d1 80 61 01 01 10 00 00
00 00 0f (BINARY)
9f 67 01 — [UNHANDLED TAG]
04 (BINARY)
————————————————
[Step 9] Send GET DATA command to find the PIN Try Counter
————————————————
80 ca 9f 17 00
response hex :
response SW1SW2 : 6d 00 (Instruction code not supported or invalid)
response ascii :
response parsed :
————————————————
[Step 10] Send GET DATA command to find the Application Transaction Counter (ATC)
————————————————
80 ca 9f 36 00
response hex :
response SW1SW2 : 6d 00 (Instruction code not supported or invalid)
response ascii :
response parsed :
————————————————
[Step 11] Send GET DATA command to find the Last Online ATC Register
————————————————
80 ca 9f 13 00
response hex :
response SW1SW2 : 6d 00 (Instruction code not supported or invalid)
response ascii :
response parsed :
————————————————
[Step 12] Send GET DATA command to find the Log Format
————————————————
80 ca 9f 4f 00
response hex :
response SW1SW2 : 6d 00 (Instruction code not supported or invalid)
response ascii :
response parsed :
————————————————
[Step 13] GET CHALLENGE
————————————————
00 84 00 00 00
response hex :
response SW1SW2 : 6d 00 (Instruction code not supported or invalid)
response ascii :
Finished Processing card.
Now dumping card data in a more readable form:
======================================
[EMVContext]
======================================
Answer To Reset (ATR)
3b 88 80 01 00 00 00 00 00 81 80 00 08
ISO Compliant Answer To Reset (ATR)
Convention – DIRECT
Protocol – T=0
Historical bytes – 00 00 00 00 81 80 00 08
Interface Type: CONTACTLESS
Applications (1 found):
Application
AID: a0 00 00 00 04 10 10 (MasterCard Credit)
RID: a0 00 00 00 04 (Mastercard International [US])
PIX: 10 10
Label: MasterCard
Preferred Name:
Application Priority Indicator
Application may be selected without confirmation of cardholder
Selection Priority: 1 (1 is highest)
Application Interchange Profile
Static Data Authentication (SDA) not supported
Dynamic Data Authentication (DDA) not supported
Cardholder verification is not supported
Terminal risk management does not need to be performed
Issuer authentication is not supported
CDA not supported
Application File Locator
Application Elementary File
Short File Identifier:
1 (Governed by the EMV specification)
Start Record: 1
End Record: 1
Number of Records Involved In Offline Data Authentication: 0
Record: 1
Length: 108
Involved In Offline Data Authentication: false
UNHANDLED APPLICATION RECORDS (9 found):
Tag[9f6c] Name=[UNHANDLED TAG], TagType=PRIMITIVE, ValueType=BINARY, Class=CONTEXT_SPECIFIC BER-TLV[9f6c, 02 (raw 02), 0001]
Tag[56] Name=[UNHANDLED TAG], TagType=PRIMITIVE, ValueType=BINARY, Class=APPLICATION BER-TLV[56, 29 (raw 29), 42XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX5e202f5e3138303631303130313130303030303030303030]
Tag[9f64] Name=[UNHANDLED TAG], TagType=PRIMITIVE, ValueType=BINARY, Class=CONTEXT_SPECIFIC BER-TLV[9f64, 01 (raw 01), 04]
Tag[9f62] Name=[UNHANDLED TAG], TagType=PRIMITIVE, ValueType=BINARY, Class=CONTEXT_SPECIFIC BER-TLV[9f62, 06 (raw 06), 000000000038]
Tag[9f63] Name=[UNHANDLED TAG], TagType=PRIMITIVE, ValueType=BINARY, Class=CONTEXT_SPECIFIC BER-TLV[9f63, 06 (raw 06), 0000000003c6]
Tag[9f65] Name=Maximum length of data field in command message, TagType=PRIMITIVE, ValueType=BINARY, Class=CONTEXT_SPECIFIC BER-TLV[9f65, 02 (raw 02), 0038]
Tag[9f66] Name=Terminal Transaction Qualifiers, TagType=PRIMITIVE, ValueType=BINARY, Class=CONTEXT_SPECIFIC BER-TLV[9f66, 02 (raw 02), 03c6]
Tag[9f6b] Name=[UNHANDLED TAG], TagType=PRIMITIVE, ValueType=BINARY, Class=CONTEXT_SPECIFIC BER-TLV[9f6b, 13 (raw 13), xxxxxxxxxxxxxxxxd18061010110000000000f]
Tag[9f67] Name=[UNHANDLED TAG], TagType=PRIMITIVE, ValueType=BINARY, Class=CONTEXT_SPECIFIC BER-TLV[9f67, 01 (raw 01), 04]
—————————————
FINISHED
—————————————
Hi Sam, the Java code seems to have read the card ok, but I don’t know what the 9f6x tags are, I cant find them in the EMVco specs I have.
The problem I’m have with your Card Browser tool is it can’t find the PPSE directory – Using the same request of 2PAY.SYS.DDF01 in the Java code finds the application. Also tried CardPeek and it too can read get the PPSE dir and read the card ok. Not too concerned that it’s finding unrecognized tags – the card is proprietary and does not follow all of the EMVco specs.
Any thoughts? I’m going to look at the java code to see what library it uses to make the PC/SC calls. Thanks
Hi Sam, I’m not sure why it’s failing with your card. Have your tried checking the ‘Skip PSE directory’ check-box in the Tools menu and seeing if CardBrowser can then read your card? When this item is checked instead of attempting to query the Payment System Environment, CardBrowser should attempt to access a list of known AID’s.
Had the same problem, solved it by adding a “00” suffix to the APDU.
See JAVA Reader Step 6:
00 a4 04 00 07 a0 00 00 00 04 10 10 00
Dear Nic,
I want to implement emv card reader and write application.
Please help me.I’m a new one in the field so that guide and then i will develop.if you have skype id please share me,
Please help me
Thanks & Regards,
Lakshmanakumar
Hi, the source code for EMV Card Browser is available on https://github.com/nicbedford/CardBrowser maybe this can help you?
in this code your not using any api so how is possible
I’m not sure what you mean by ‘not using any API’. EMV is based around the APDU described in ISO 7816-4 spec and EMVCo Book 3 Application Specification. Maybe it will be helpful if you read these documents.
Hi nic
My personalisation vendor gave me this info. What i am trying to find out is how many times offline PIN validation will be attempted before PIN validation is sent to Host Issuer systems for Validation.
Get Data PIN Try Counter
(005) 80 CA 9F 17 00
(006) 9F 17 01 03 90 00
9F17 – PIN Try Counter – 03
Each time a VERIFY command is sent to the card with the wrong PIN, the PIN Try Counter is decremented. When the counter hits 0, the PIN is blocked. At that point, there is no guarantee that the EMV data will be sent to the host. A point-of-sale terminal could be configured to end the transaction then and there if the PIN Try Counter has been exhausted.
Great. But is it possible to write your data from your card to another card? So that you make a working copy of your original card?
No
Nice tool – worked the first time for me.
One thing I would caution – I believe your credit card number appears in the XML data that you displayed (unless you intentionally changed it). But it also looks like your card expired on 10/31 of last year, so the point is largely academic.
Did you check the name on the Track 2 data? The card data is from expired/cancelled cards anyway.
When target platform changed to “x86” (former “AnyCPU”) transmitting a ADPU doesn’t return proper results. My OS is Windows 7 x64. Any Suggestions?
Hello,
Great work, thanks.
Why does the app contact your website on launch?
Name: CardBrowser.exe
Version: Not Available
File Path: C:\Program Files (x86)\EMV Card Browser\CardBrowser.exe
Connection Origin: local initiated
Protocol: TCP
Local Address: 10.36.17.23
Local Port: 53419
Remote Name: nicbedford.co.uk
Remote Address: 198.91.81.2
Remote Port: 80 (HTTP – World Wide Web)
It’s a simple update check. It’s looking for an xml file containing released file versions. The source is published on github if you want to check for yourself…
Hi Nic,
How to proceed to open the XML file with different colors as like u show above? Thks
Any text editor with XML syntax highlighting will show different colours. I use Visual Studio…
how to Send READ RECORD to read SFI 2 record 1?
Nic, how to writer one smart card ?
hello i have been reading your post over and over again and i have been playing around your source code but i dont seem to understand the results saved as i can see on your example it got track1 and 2 but on my read i dont get nothing but this:
wich seems to be random data as i get this on every single card i try so i was wondering if i did something wrong or if your software isnt supporting newer cards or what?
im currently running on windows 7 x64 im also interested on writing them but as i see you dont provide any help so ill look on my own coming from your app
Hi Nic,
I get error “Unexpected response from SELECT command: 0x6700” when reading a card with a SPR532 reader on a Windows 7 x64 system. Do you have a solution for this?
Hi Kern,
try to add a 0x00 at the end of the select command. That worked for me. Some cards ignore the trailing 0x00, some don’t. It’s the same with other commands (e.g. read record).
How and where do I add that 0x00?
Hello Nic,
excellent piece of work; I’m playing with cards and your PCSC library for a little while and I think you flipped Lc and Le in your APDU class… 🙂
According to EMV Application Specification 4.3 what you call ‘Le’ should be ‘Lc’, or I miss something? Anyway really good piece of work. 😉
Hi Sebastian, it’s some time since I worked on this, but Lc should be calculated in APDUCommand.ToArray() in preparation for Transmit. Le is the expected data length of the data in response to the command.
Hi Nic,I just have one question. Is there a way to read or write the PIN from banking credit cards? Thanks
Hi Nic ,
I am able to retrieve the Tags (90,8F,9F32,92,93) for SDA . Could you please help me to know what all step have to performed with these Tag Data for SDA . I have referred EMV Co v 4.3 Book 2 but no go .
Hi Nic ,
I would like to know how SDA is performed . I have retrieved all the Necessary five tags for it . Also referred EMV co manual but no go . Can you please help ?
HI There,
looks we r looking the same tools, read/write EMV card,
track 1,track2 etc…
maybe we can trade
regards,Edgar.
Mexico
Hi Edgar let me know you got maybe we exchange something
any luck mate?
Is really working RFDI???
i have this
MFR120 Mini Portable Reader
MiFare/Felica UID, RFID Reader / Data Collector – 13.56MHz
OMNIKEY 5321 Reader/Writer Mifare / RFID Contact/Contacless
maybe we can trade
regards,Edgar.
Mexico
edgar,
podemos hablar de los programas que tienes ?
im interested in the omnikey softwares and much more
gracias,
venezuela
Dadan,
did you find the software to write data on a card?
I’m looking for one maybe i can buy it off you or something
thank you
have you found the program ?
Edgar definitivamente este soft o sourcr no te servira para escribir pero tengo el rb 2.0 y solo puedes escribir en jcop no en tus tarjetas bancarias actuales y necesitas saber otras cuantas cosas mas si estas interesado contactame 😜
Hello NIC,
When I’m giving all 3 keys after calculation under option
-mac_key and -enc_key, it’s failed. Why?
Why it’s not accepting my values.
I created the card cryptogram by my own and its same as the response of INITIAL_UPDATE COMMAND.
It means value I’m providing in option -enc_key is CORRECT. Why it is happening?
Transmit: 80 50 00 00 08 11 22 33 44 55 66 77 88
Response: (Need help to respond)
Thanks a lot and Best Regards.
Hello ,
I am using your code to read EMV card data, We need to send Le byte as full command is like –
00 a4 04 00 0e 32 50 41 59 2E 53 59 53 2E 44 44 46 30 31 00(Le).
our card is expecting Le but tool is not sending it. how to add le byte in APDU. please reply
Can Someone Help me with retrieving Card number of a EMV card using ACR 38U-I1 Card reader. The SDK provided by them reads the ATR of the card but my requirement is to read the card number(which is embossed on the card) and i am also using magnetic stripe card reader to reader the card number presently. Please help me with it.
Is there a specific code to be written or a command to be sent to retrieve the card number.
Hi.
The EMV Card Browser application retrieve the PAN from American Express card, but not from Visa card. I test the application with four Visa cards, but the result are the same. Can anyone help me to understand why this happend? Thanks in advance!!!
Pingback: Hat jemand mit Revolut Erfahrungen? - Seite 17
You have to select the application and read from the specific TAG.
//SELECT APPLICATION A0000000041010
Command : 00A4040007A0000000041010 (Master Card, change to your preferred AID)
Result : 9000
//READ RECORD 1 OF SFI 28
Command : 00B2012C00
Result : 6C8A
Command : 00B2012C8A
Result : TLV Result, get value of Tag 5A for PAN
Status : 9000
Pingback: bunq - App-Konto/Maestro-Karte in den Niederlanden
how to record the data on the chip card?
Pingback: Got a chip to scratch? – Scrambled Thoughs
GPO Command not works for VISA
Hi,
I had the same issue also, but from what i had found that the VISA card that i have need the PDOL value to be passed to GPO command, so if your selected application FCI contain PDOL (TAG 9F38), then you must process this tag and generate a valid value for it then pass this value to GPO command.
Regards,
Hi nick where can get the software to write on jcop card
Hi Nic,
My Proxicard being proven that it works for testing MasterCard on a different PC with Windows 7. But, It errors out right after I’ve activated transaction. Here are the samples of APDU errors.
I’ve de-installed and reinstalled the Proxicard drivers, and required Windows driver and etc without any luck. What should be my next step to resolve the errors? Thanks a lot.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//////////////////////////////////////////
// ProxiCARD is ready to dialog with a //
// proximity passport reader… //
//////////////////////////////////////////
(Press any key to stop ProxiCARD)
[Unknown APDU]
PCD: 00 A4 04 00 0E 32 50 41 59 2E 53 59 53 2E 44 44
46 30 31 00 (20 bytes)
PICC: 6F 00 (2 bytes)
[Unknown APDU]
PCD: 00 A4 04 00 07 A0 00 00 00 04 10 10 00 (13 bytes)
PICC: 6F 00 (2 bytes)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hello Nic
Thank you for the wonderful solution. It saved my huge amount of time. I have managed to get it working with VISA and Master Card, but not VISA Electron
Below is the XML data
–
–
–
+
–
–
–
–
–
–
–
–
–
Hi,
I am trying to read contents of Bahrain Smart Card. Can you tell me the AID for Bahrain or else what I have to change for reading Bahrain Smart card.
Thanks in advance.
Hi Nic,
Thanks for the great sample, it really helped me build my first EMV Chip encoding app, I am wondering if you have any resources or point me to some resources related to Chip personalization? I am working on a new card issue scenario where I need to update the card with customer name etc.
Thanks
Glad it helped, unfortunately i’m not currently working in this area.
Nic, great work done, it might be naive to ask, but i hope we need a hardware like pcsc complaint hardware ? also just to clarify Tag 57, is displayed as standard value or in HEX ?
Thank you,
Ronald
hi
Friends I want to enter a transaction of 900/000/000/000/000 Rials in my card . I have a skimmer but i dont know how to enter the information. Please help me . thank you
Hi Nic
Have just downloaded your application, however when I press read button, the application closes. Have tried on 2 separate windows laptops. Any suggestions?