Salta al contingut principal

Entrades

S'estan mostrant les entrades amb l'etiqueta rfid

Fixing a bricked Mifare Classic 1K RFID card

A very frustrating action when you write an RFID card is to get it bricked, e.g. by overwriting the trailer block with inconsistent values. A 1KB Mifare Classic card has 16 sectors of 4 blocks with 16 bytes per block (64 blocks at 16 bytes). The trailer block is the last block for each sector, so from the 1KB of capacity we must subtract 16 bytes due to the first block (where the identifier is) and the 16 tail blocks (blocks 3,7,11,15... 59, and 63). This block is where the keys A and B for access to the remaining blocks of the sector are stored, as as well as the access bits. It essentially indicates what is readable and writable and what is the password to do so. So the effective capacity is: (64 blocks - 16 trailer - 1 header)*16bytes = 752 usable bytes . 0 E9D517B49F0804006263646566676869 1 00000000000000000000000000000000 2 00000000000000000000000000000000 3 FFFFFFFFFFFFFF078069FFFFFFFFFFFF ← bloque trailer 4 00000000000000000000000000000000 5 00000000000000000000000000000000 6 0...

Reparar una tarjeta RFID Mifare Classic 1K brickeada

Una de las acciones más frustrantes cuando se escribe una tarjeta RFID es bloquearla, por ejemplo al sobrescribir el bloque de cola o bloque trailer con valores incoherentes. Una tarjeta Mifare Classic de 1KB tiene 16 sectores de 4 bloques con 16 bytes por bloque (64 bloques a 16 bytes). El bloque «trailer» es el último bloque de cada sector, de forma que del 1KB de capacidad tenemos que restarle 16 bytes del primer bloque (donde está el identificador) y los 16 bloques de cola (bloques 3,7,11,15... 59, y 63). En este bloque es donde están guardadas las claves A y B de acceso al resto de bloques del sector así como los bits de acceso. Básicamente nos dice qué se puede leer y que se puede escribir y qué será la contraseña para hacerlo. Así que la capacidad real queda en: (64 bloques – 16 trailer – 1 cabecera)*16bytes = 752 bytes útiles. 0 E9D517B49F0804006263646566676869 1 00000000000000000000000000000000 2 00000000000000000000000000000000 3 FFFFFFFFFFFFFF078069FFFFFFFFFFFF ← bloqu...

Reparar una tarjeta RFID Mifare Classic 1K brickejada

Una de les accions més frustrants quan s’escriu una targeta RFID és bloquejar-la, per exemple al sobreescriure el bloc de cua o bloc trailer amb valors incoherents. Una targeta Mifare Classic de 1KB té 16 sectors de 4 blocs amb 16 bytes per bloc (64 blocs a 16 bytes). El bloc «trailer» és l’ultim bloc de cada sector, de forma que del 1KB de capacitat hem de restar-li 16 bytes del primer bloc (on està el identificador) i els 16 blocs de cua (blocs 3,7,11,15... 59, i 63). En aquest bloc és on estan guardades les claus A i B d’accés a la resta de blocs del sector així com els bits d’accés. Bàsicament ens diu què es pot llegir i què es pot escriure i quina serà la contrasenya per a fer-ho. Així que la capacitat real és: (64 blocs – 16 trailer – 1 capçalera)*16bytes = 752 bytes útils. 0 E9D517B49F0804006263646566676869 1 00000000000000000000000000000000 2 00000000000000000000000000000000 3 FFFFFFFFFFFFFF078069FFFFFFFFFFFF ← bloc trailer 4 00000000000000000000000000000000 5 00000000000000...

Getting started with mfrc522cli

 I had seen people copying and writing Skylanders with NFC readers, like the proxmark or the ACR122U, but nowhere had I seen how to clone one of these figurines with an MFRC522. I already had Arduino microcontrollers so choosing an MFRC522 was the cheapest way to go. I didn't find any sketch or example of how to make a generic reading or copy, I mean for each RFID card I had to create a sketch where I included in the code the keys and the writing or reading functions adapted to the one I wanted to do in each occasion. These readers are very cheap, although it is true that you can get them for 1€ or less, you have to be very careful because not all readers/writers are of the same quality. I can confirm that only one of the 2 MFRC522 readers I have can read Skylanders, the other one supposedly fails due to a lack of power. You can make modifications to increase the power but it is always better to buy a tested unit. Anyway, even in the 1€ model we will be able to write our backups on...

Introducció al mfrc522cli

Havia vist gent que copiava i escrivia Skylanders en lectors NFC, com el proxmark o el ACR122U, però en cap lloc havia vist com clonar una d’aquestes figuretes amb un MFRC522. Jo ja disposava de microcontroladors Arduino així que escollir un MFRC522 era el camí més econòmic. Quan per primera vegada vaig intentar fer una copia em vaig trobar amb una barrera, la dificultat per a poder emprar el lector mfrc522 d’una forma versàtil. No vaig trobar cap sketch o exemple de com fer una lectura o còpia de forma genèrica, vull dir que per a cada targeta RFID havia de crear un sketch on s’inclogueren en el codi les claus i les funcions de escriptura o lectura adaptades al que volia fer en cada ocasió. Aquests lectors són molt econòmics, si bé és cert que es poden aconseguir per 1€ o menys s’ha de tindre molta cura ja que no tots els lectors/escriptors tenen la mateixa qualitat. Puc donar fe ja que de 2 lectors MFRC522 que tinc solament un pot llegir els Skylanders, l’altre falla suposadament per...

Make a backup clone of your favourite Skylanders with a mfrc522 and esp8266

  Nowadays there must not be many parents left who don't know the Skylanders video games, they are present on all consoles (Wii, WiiU, 3DS, Nintendo Switch, PS3, PS4, Xbox 360, Xbox One). As a brief introduction, these games are based on figurines called Skylanders like the one in the next image. By placing these Skylanders in the "portal", the digital version will appear in our videogame. In other words, the video game without the figurines are useless. It is quite common to start with a "starter pack", that is, the videogame, the portal and 3 Skylanders, but it is more than usual that our children end up buying new Skylanders (in fact there are stages of the game that can only be played in if you have the right Skylander). In addition, the progress of our Skylander, as it is played, is stored in the figure so that if you take it to a friend's house it will keep all its progress. By the other hand, if a Skylander breaks, we will not ...