Libnfc:nfc-mfclassic

From NFC Tools
Revision as of 01:33, 10 December 2012 by Yobibe (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

With this tool a complete MIFARE card can be dumped to / restored from a MIFARE dump file (*.mfd).

Contents

Background

More info will follow...

MIFARE Dump File

A MIFARE dump file (*.mfd) is a binary 4KB image of a MIFARE Classic tag. This image contains the data, keys and access bits on their defined off-set. A Dump file is always 4KB, even when a 1KB tag is dumped. The dump file follows exactly the memory layout as described in the functional specification from NXP.

Interpretation

From the first block, the manufacturer data, can be determined if you are dealing with a 1KB or a 4KB tag. It can be done using the ATQA part of block0 in bytes 8 and 7 (stored in reverse order). Byte 6 contains the SAK (at least for the last part (4 bits)).

Warning: following picture need to be updated.

The first block of 16 bytes in an MFD file.

More info can be found in the MIFARE functional specification from NXP.

Memory Layout

The memory of 1KB and 4KB MIFARE Classic cards is ordered in a similar way. On both cards the first block (block 0) contains the UID, BCC, ATQA and Manufacturer data. This block is locked and cannot be altered.

Memory Layout of MIFARE Classic.

Dumps

This section contains links to some MIFARE Dump (mfd) files generated using nfc-mfclassic utility (available in libnfc tarball).

Empty

It represents a complete dump of a genuine empty MIFARE Classic 1K tag (UID: 0x14f1f9d7).
Note: Please dont try to format your Mifare Classic card using this dump... Please wrote your own code or use mifare-classic-format example available in libfreefare.

With content

There are also different kind of content in these Mifare Classic dumps.

Personal tools
Namespaces

Variants
Actions
Navigation
Documentation
Misc
Toolbox
Partners