zhovner / mfdread

Mifare 1k/4k dumps parser in human readable format
306 stars 51 forks source link

Binary support #3

Closed osysltd closed 7 years ago

osysltd commented 7 years ago

Dear Pavel, Is it feasible for you to improve the software by binary support of the input file or maybe you want to contribute to the https://github.com/iceman1001/proxmark3 (driven by @iceman1001 btw) directly with this functionality? It really lacks of human display for 4k for example... Lua script supports only 1k layout. Thank you

zhovner commented 7 years ago

I don't understand what you actually ask. My script is for binary dumps. Or you wan't me to add this functionality into proxmark firmware?

osysltd commented 7 years ago

Pasha, Sorry for slightly incorrect description, I've meant support for pm3 binary dumps.

zhovner commented 7 years ago

Can you give an example of how you use proxmark to get mifare dump?

I don't see any reason to use it for regular cards reading, because MFD format us much common and devices supported by libnfc (like PN532) is much cheaper than proxmark.

osysltd commented 7 years ago
pm3 --> hf mf chk *4 ? d /root/pm/k.txt check key[ 0] ffffffffffff check key[ 1] 000000000000 ................................................................................ Time in checkkeys: 211256 ticks 42 seconds Printing keys to binary file dumpkeys.bin...
Found keys have been dumped to file dumpkeys.bin. 0xffffffffffff has been inserted for unknown keys.
pm3 --> hf mf dump
------------------------------------------ ----- Dumping all blocks to file-----

Dumped 64 blocks (1024 bytes) to file dumpdata.bin

Then to reach human readable display one may use htmldump.lua script but it supports only 1k layout though.

iceman1001 commented 7 years ago

Don't know what you are looking for @osysltd but the following luascript htmldump.lua converts 1k or 4k binary dumps to html. http://www.icesql.se/proxmark3/dump4k.html dumptoemul.lua converts binary to EML (same as MFD) emultodump.lua convert EML/MFD to binary

iceman1001 commented 7 years ago

There is already some python scripts in client/ folder. pm3_eml2mfd.py pm3_mfd2eml.py guess what they do :)

osysltd commented 7 years ago

oops, thanks :)

iceman1001 commented 7 years ago

And just because @zhovner 's mfd parsed output looked so nice I added it to my fork. Renamed it to pm3_mfdread so it follows the other python script files names.

osysltd commented 7 years ago

https://github.com/badboy/mfdread/tree/permission-display pretty prints access bits, more human readable btw.

iceman1001 commented 7 years ago

We can wish that @badboy makes a pullrequest and @zhovner merges it...

badboy commented 7 years ago

Oh, someone found my small hack used in a university project. It's not a fully polished version, but it worked for our use case of giving a more detailed and easier to understand view. Now that the university project is over, I can't spend more time on it though.

If someone wants to take it up, please do so. Even sending my code as a PR to the upstream repo here can be done by everyone. Just use the compare view and move along.

osysltd commented 7 years ago

@badboy It's rather a common practice on github to push changes, can you please do?

badboy commented 7 years ago

@osysltd I don't have the time to follow up on a proper PR.

osysltd commented 7 years ago

@badboy That's just a matter of one click :)

iceman1001 commented 7 years ago

Yep, it is just a click away. So I did that and move along. Great additions @badboy !