proxmark3
proxmark3 copied to clipboard
Support other MFC JSON Key file formats (Metrodroid)
The app Metrodroid, has its own json key format file. It would be nice if we could load/save to that format aswell
Ref https://github.com/metrodroid/metrodroid/wiki/Importing-MIFARE-Classic-keys
It has some features.
"KeyType": "MifareClassic",
"KeyType": "MifareClassicStatic",
Also some other interesting concepts as
- Transform (to hint to use a specific keygen algo)
- Bundle (to hint that if first key works, try same bundle keys first)
Interesting, but could be hard to re-label existing keys.
Since we don't have a json format for mfc key files yet, we would be very free in the implementation :)
Add all known keygens and groups (bundles) of keys would be time consuming but really nice.. We would get a free ride from Metrodroid stuff :)
I think we can think of general format for storing keys. it can be like this:
"KeyType": "MifareClassicStatic",
"Description": "a human-readable label",
"keys": [
{
"type": "KeyA", /* or "KeyB" */
"key": "010203040506", /* 6 byte, Base16 encoded string of the key for sector 0 */
"sector": 0, /* sector this key applies to. and here can be not only sector... */
"transform": "none" /* default behaviour: perform no transformation */
},
but..
as for mf plus the keys can be 16 bytes long and some of the keys is not belongs to sector they have only key number. needs to add KeyNum
to some keys there
as for mf ultralight - it have 1 key as i remembered
as for ntag - i dont know...
t5577 - 1 key
iso15693 - dont know
- iClass = 8bytes , 2keys,
- MFC Mifare Classic MINI/S50/S70, different amount of keys
- MFU Mifare ultralight type
The "keys" section will always be strongly dependent on the "keytype" section to tell the consuming software how to use the keys included.
there may be 2 type of files:
- key list (here will be no sectors or transformations or key A/B)
- keys from cards with some data (maybe) (here exact sectors and transforms)
I started to extract and refactor the key gen algo functions into common/generator.c
This should enable the idea of transform in a json key template format.