permissions - Can I recover a MIFARE Classic card? -


my problem used "read , write" example on arduino re-write rfid card (mifare classic 1k) block block. started writing @ block 4. @ block 7 stopped , can't read sector. wrote zeros each block.

the dumptoserial function prints every sector

pcd_authenticate() failed: timeout in communication.

it can still read uid, sak, , picc type.

did destroy card or can recover it?

some more info:

  • card: mifare classic 1k
  • arduino mega2560 elegoo
  • rc522 starter-kit

with mifare classic 1k, every 4th block sector trailer (each 4 blocks grouped 1 sector). sector trailer contains access keys (key on bytes 0..5, key b on bytes 10..15) , access conditions (access bits on bytes 6..8) sector.

the access conditions protected redundancy mechanism each access bit present multiple times in positive , negative logic. mifare classic card allows overwriting these access conditions invalid values (impossible combinations of access bits). however, once access conditions set such invalid value, security logic of chip disable access wole sector. consequently, writing invalid access conditions sector trailer renders whole sector unusable. state permanent , cannot reverted.

you wrote blocks starting @ block 4 all-zeros. consequently, wrote sector trailer of sector 1 (in block 7) access conditions set all-zeros. invalid value access conditions. therefore, sector 1 permanently unusable. since indicated received errors after writing block 7, might lucky , did not overwrite other sector trailers (e.g. block 11 sector 2). in case, other sectors should still usable. similarly, since started writing @ block 4, first sector (sector 0, blocks 0..3) should still accessible.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -