Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

Forum MIFARE general topics and applications KeyA and KeyB and how to protect the contacless card from cloning? Reply To: KeyA and KeyB and how to protect the contacless card from cloning?

Re: KeyA and KeyB and how to protect the contacless card from cloning?

21. February 2016 at 9:49
Hi @mifaresdk,

With the below steps 9 I cannot be able to Authenticate to read card for verification. In step 7 I have new key as:
KeyA = 49DB59CFF2F3 AccesBits = 08778FFF KeyB = 2CBF23931A13

Somewhere in the steps I am making big mistake so I cannot read my data anymore. With my gsm phone I download the mifare classic tool. And you can see the out put
below in this post. As you can see Sector 1 is not readable. ?????

1) Connect
2) LoadKey( 0, FFFFFFFFFFFF ) // default key
3) LoadKey( 1, 1665FE2AE945 ) // your access key A
4) Authenticate( 4, 0 ) // authenticate to block 4 with key store 1 = default key
5) Write( 4, 58523376442200010000000000000000 ) // Write My_data1 to block 4
6) Write( 5, “es56fg87p4f2 ” ) // Write My_data2 to block 5 as ASCII bytes (with space chars at the end)
7) Write( 6, 21530000000000000000000000000000 ) // Write My_data3 to block 6
8) Write( 7, 49DB59CFF2F308778FFF2CBF23931A13 ) // write to sector trailer the new keys
9) Authenticate( 4, 1 ) // authenticate to sector 1/block 4 with the new key A
10) Read( 4, ... ) // read the data back for verifying
11) Read( 5, ... ) // read the data back for verifying
12) Read( 6, ... ) // read the data back for verifying
13) Disconnect


Reading Card with mfare classic tool:

+Sector: 0
F06D371DB7880400C206000000000013
0F0003E103E103E103E103E103E103E1
03E103E103E103E103E103E103E103E1
A0A1A2A3A4A5787788C1FFFFFFFFFFFF
+Sector: 2
0
0
0
FFFFFFFFFFFFFF078069FFFFFFFFFFFF
+Sector: 3
0
0
0
FFFFFFFFFFFFFF078069FFFFFFFFFFFF
+Sector: 4
0
0
0
FFFFFFFFFFFFFF078069FFFFFFFFFFFF


Kind Regards
+ 0  |  - 0