简体   繁体   中英

How to find out if nfc tag is locked without overwriting anything on it already?

I know I could just try to read/write over what is already there, but that would erase anything already there. Is there any specific apdu or similar thing that could show it?

Given your list of Tags you are probably going to handle each type of Tag separately.

For example even on the NTAG 21x family of cards which are just different sizes of the same card you could lock it by the following methods.

  1. Static Lock bytes, which you would read bytes 2 and 3 of Page 02h , this works for all sizes.

  2. Dynamic Lock bytes, which you would need to read 28h or 82h or E2h depending on the size of the card.

  3. Read the AUTH0 config page at 29h or 83h or E3h to see if they have been locked by password, again dependant on the card size.

  4. Read the Capability Container on byte 3 of page 3h as the Ndef data standard for a Type 2 card as this indicates if writing is "locked", though I have Type 2 compatible cards (not fully compliant) ignore this at the hardware level and allow writing even when write access should be prevented by this.

Then all the Mifare Classic series of cards will have a different set of locking mechanism that are again stored all over the Tags.

And some of these methods can partially "lock" a Tag in that they can just restrict portions of a Tag but not the whole Tag.

So possible but a lot of work, to check all the configuration places it is possible to "lock" a Tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM