nfc-tools / mfoc

Mifare Classic Offline Cracker
GNU General Public License v2.0
1.22k stars 269 forks source link

don't bother cracking KeyB when you can just read it out of data block #18

Closed AdamLaurie closed 9 years ago

AdamLaurie commented 9 years ago

KeyB should always be trivially recoverable if you have KeyA, so this can save a huge amount of time in some cases. I have tested this as much as I can (I am travelling at the moment, so it's an airport lounge job! :)

All KeyB keys recovered this way are testing for valid authentication and if that fails (which it never should), the code will still fall back to the original cracking scheme.

Enjoy!

AdamLaurie commented 9 years ago

Actually, auth may fail for KeyB recovered in this way as the ACL may prevent reading of KeyB so it will be returned as '000000000000'.

neomilium commented 9 years ago

Do you have any patch to test ACL to prevent from false-recovery ?

AdamLaurie commented 9 years ago

No, but since the recovered key is tested, all that will happen is the authentication test will fail so it will fall back to recovery mode, and I have checked that works.